Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ACPI: SPCR: work around clock issue on xgene UART

xgene v1/v2 8250 UARTs don't run at the standard clock rate expected by
the driver and there is no information on clocking available from the
SPCR table. As there has been no progress on relevant vendors updating
DBG2/SPCR specifications to fix this work around this using the previous
xgene quirk handling to avoid setting a baud rate and therefore using
the UART as configured by firmware.

Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
Tested-by: Mark Salter <msalter@redhat.com>
Reviewed-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Graeme Gregory and committed by
Rafael J. Wysocki
03c3876f dee82bc1

+11 -3
+11 -3
drivers/acpi/spcr.c
··· 188 188 uart = "qdf2400_e44"; 189 189 } 190 190 191 - if (xgene_8250_erratum_present(table)) 191 + if (xgene_8250_erratum_present(table)) { 192 192 iotype = "mmio32"; 193 193 194 - snprintf(opts, sizeof(opts), "%s,%s,0x%llx,%d", uart, iotype, 195 - table->serial_port.address, baud_rate); 194 + /* for xgene v1 and v2 we don't know the clock rate of the 195 + * UART so don't attempt to change to the baud rate state 196 + * in the table because driver cannot calculate the dividers 197 + */ 198 + snprintf(opts, sizeof(opts), "%s,%s,0x%llx", uart, iotype, 199 + table->serial_port.address); 200 + } else { 201 + snprintf(opts, sizeof(opts), "%s,%s,0x%llx,%d", uart, iotype, 202 + table->serial_port.address, baud_rate); 203 + } 196 204 197 205 pr_info("console: %s\n", opts); 198 206