[RFC,v2,1/4] ACPI: SPCR: check bit width for the 16550 UART

Message ID 20161206175830.6989-2-aleksey.makarov@linaro.org
State New
Headers show

Commit Message

Aleksey Makarov Dec. 6, 2016, 5:58 p.m.
Check the 'Register Bit Width' field of the ACPI Generic Address
Structure that specifies the address of the UART registers to
decide if the driver should use "mmio32" access instead of "mmio".

If the driver is other than 16550 the access width is defined
by the Interface Type field of the SPCR table.

Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>

Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>

Reported-by: Heyi Guo <heyi.guo@linaro.org>
 drivers/acpi/spcr.c | 4 ++++
 1 file changed, 4 insertions(+)


To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


diff --git a/drivers/acpi/spcr.c b/drivers/acpi/spcr.c
index e8d7bc7..6c6710b 100644
--- a/drivers/acpi/spcr.c
+++ b/drivers/acpi/spcr.c
@@ -70,6 +70,10 @@  int __init parse_spcr(bool earlycon)
 	case ACPI_DBG2_16550_COMPATIBLE:
 	case ACPI_DBG2_16550_SUBSET:
+		if (table->serial_port.space_id ==
+		    table->serial_port.bit_width == 32)
+			iotype = "mmio32";
 		uart = "uart";