]> err.no Git - linux-2.6/commitdiff
powerpc/legacy_serial: Bail if reg-offset/shift properties are present
authorJohn Linn <john.linn@xilinx.com>
Tue, 1 Jul 2008 17:52:41 +0000 (10:52 -0700)
committerGrant Likely <grant.likely@secretlab.ca>
Tue, 1 Jul 2008 21:12:37 +0000 (15:12 -0600)
The legacy serial driver does not work with an 8250 type UART that is
described in the device tree with the reg-offset and reg-shift
properties.  This change makes legacy_serial ignore these devices.

Signed-off-by: John Linn <john.linn@xilinx.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
arch/powerpc/kernel/legacy_serial.c

index 61dd17449ddceb06267babf5373505984f7abd9c..cf37f5ca4b71e6b30c2a3d7bb46fb17f8bf66f50 100644 (file)
@@ -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 or 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;