linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] SPCR: check bit width for the 16550 UART
@ 2016-12-05 13:05 Aleksey Makarov
  2016-12-05 18:51 ` Duc Dang
  0 siblings, 1 reply; 16+ messages in thread
From: Aleksey Makarov @ 2016-12-05 13:05 UTC (permalink / raw)
  To: Rafael J . Wysocki
  Cc: linux-acpi, linux-serial, linux-kernel, Greg Kroah-Hartman,
	Russell King, Peter Hurley, Aleksey Makarov, Jon Masters,
	Mark Salter, Duc Dang, Graeme Gregory, Len Brown

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 with is defined
by the Interface Type field of the SPCR table.

For discussion:

https://lkml.kernel.org/r/7fa523de-3fbb-1566-f521-927143f73d1e@redhat.com

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(+)

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)
 		break;
 	case ACPI_DBG2_16550_COMPATIBLE:
 	case ACPI_DBG2_16550_SUBSET:
+		if (table->serial_port.space_id ==
+			ACPI_ADR_SPACE_SYSTEM_MEMORY &&
+		    table->serial_port.bit_width == 32)
+			iotype = "mmio32";
 		uart = "uart";
 		break;
 	default:
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-04-30 21:39 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-05 13:05 [PATCH] SPCR: check bit width for the 16550 UART Aleksey Makarov
2016-12-05 18:51 ` Duc Dang
2016-12-05 23:27   ` Jon Masters
2016-12-05 23:52     ` Duc Dang
2016-12-06  0:03       ` Jon Masters
2016-12-06  0:05       ` Jon Masters
2016-12-06  0:31       ` Duc Dang
2016-12-06  2:27         ` Jon Masters
2016-12-06  3:55           ` Duc Dang
2016-12-06  6:34             ` Jon Masters
2016-12-06  6:53               ` Jon Masters
2016-12-06  7:13                 ` Jon Masters
2016-12-06  8:40                   ` Aleksey Makarov
2016-12-07 15:23               ` Mark Salter
2016-12-13  6:20                 ` Jon Masters
2017-04-30 21:39                   ` Jon Masters

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).