1f73373
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
Jeremy Cline d1b6f8c
From: Mark Salter <msalter@redhat.com>
Jeremy Cline d1b6f8c
Date: Thu, 10 May 2018 17:38:44 -0400
Jeremy Cline d1b6f8c
Subject: [PATCH] aarch64: acpi scan: Fix regression related to X-Gene UARTs
Jeremy Cline d1b6f8c
Jeremy Cline d1b6f8c
Message-id: <20180510173844.29580-4-msalter@redhat.com>
Jeremy Cline d1b6f8c
Patchwork-id: 214381
Jeremy Cline d1b6f8c
O-Subject: [RHEL-8 BZ1519554 3/3] aarch64: acpi scan: Fix regression related to X-Gene UARTs
Jeremy Cline d1b6f8c
Bugzilla: 1519554
Jeremy Cline d1b6f8c
RH-Acked-by: Al Stone <astone@redhat.com>
Jeremy Cline d1b6f8c
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
Jeremy Cline d1b6f8c
Jeremy Cline d1b6f8c
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1519554
Jeremy Cline d1b6f8c
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=16144520
Jeremy Cline d1b6f8c
Jeremy Cline d1b6f8c
Commit e361d1f85855 ("ACPI / scan: Fix enumeration for special UART
Jeremy Cline d1b6f8c
devices") caused a regression with some X-Gene based platforms (Mustang
Jeremy Cline d1b6f8c
and M400) with invalid DSDT. The DSDT makes it appear that the UART
Jeremy Cline d1b6f8c
device is also a slave device attached to itself. With the above commit
Jeremy Cline d1b6f8c
the UART won't be enumerated by ACPI scan (slave serial devices shouldn't
Jeremy Cline d1b6f8c
be). So check for X-Gene UART device and skip slace device check on it.
Jeremy Cline d1b6f8c
Jeremy Cline d1b6f8c
Upstream Status: RHEL only
Jeremy Cline d1b6f8c
Signed-off-by: Mark Salter <msalter@redhat.com>
Jeremy Cline d1b6f8c
Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
Jeremy Cline d1b6f8c
---
Jeremy Cline d1b6f8c
 drivers/acpi/scan.c | 9 +++++++++
Jeremy Cline d1b6f8c
 1 file changed, 9 insertions(+)
Jeremy Cline d1b6f8c
Jeremy Cline d1b6f8c
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
e9f1331
index 8777faced51a..2e60d792005f 100644
Jeremy Cline d1b6f8c
--- a/drivers/acpi/scan.c
Jeremy Cline d1b6f8c
+++ b/drivers/acpi/scan.c
e9f1331
@@ -1572,6 +1572,15 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
Jeremy Cline d1b6f8c
 	if (!acpi_match_device_ids(device, i2c_multi_instantiate_ids))
Jeremy Cline d1b6f8c
 		return false;
6c2cc50
Jeremy Cline d1b6f8c
+	/*
Jeremy Cline d1b6f8c
+	 * Firmware on some arm64 X-Gene platforms will make the UART
Jeremy Cline d1b6f8c
+	 * device appear as both a UART and a slave of that UART. Just
Jeremy Cline d1b6f8c
+	 * bail out here for X-Gene UARTs.
Jeremy Cline d1b6f8c
+	 */
Jeremy Cline d1b6f8c
+	if (IS_ENABLED(CONFIG_ARM64) &&
Jeremy Cline d1b6f8c
+	    !strcmp(acpi_device_hid(device), "APMC0D08"))
Jeremy Cline d1b6f8c
+		return false;
Jeremy Cline d1b6f8c
+
Jeremy Cline d1b6f8c
 	INIT_LIST_HEAD(&resource_list);
Jeremy Cline d1b6f8c
 	acpi_dev_get_resources(device, &resource_list,
Jeremy Cline d1b6f8c
 			       acpi_check_serial_bus_slave,
Jeremy Cline d1b6f8c
-- 
6c2cc50
2.26.2
Jeremy Cline d1b6f8c