[PATCH] powerpc: legacy_serial: reg-offset & shift aren't used

John Linn john.linn at xilinx.com
Wed Jul 2 02:31:54 EST 2008


The legacy serial driver does not work with an 8250
type UART that uses reg-offset and reg-shift. This
change updates the driver so it doesn't find the UART
when those properties are present on the UART in the
device tree for soc devices.

Signed-off-by: John Linn <john.linn at xilinx.com>
Acked-by: Grant Likely <grant.likely at secretlab.ca>
---

 arch/powerpc/kernel/legacy_serial.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c
index 61dd174..b43235f 100644
--- a/arch/powerpc/kernel/legacy_serial.c
+++ b/arch/powerpc/kernel/legacy_serial.c
@@ -136,6 +136,11 @@ static int __init add_legacy_soc_port(struct device_node *np,
 	if (of_get_property(np, "clock-frequency", NULL) == NULL)
 		return -1;
 
+	/* if reg-shift and offset, don't try to use it */
+	if ((of_get_property(np, "reg-shift", NULL) != NULL) &&
+		(of_get_property(np, "reg-offset", NULL) != NULL))
+		return -1;
+
 	/* if rtas uses this device, don't try to use it as well */
 	if (of_get_property(np, "used-by-rtas", NULL) != NULL)
 		return -1;
-- 
1.5.2.1



This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.





More information about the Linuxppc-dev mailing list