Skip to content

Commit

Permalink
powerpc/legacy_serial: Bail if reg-offset/shift properties are present
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
John Linn authored and Grant Likely committed Jul 1, 2008
1 parent 5d1a041 commit 1e6d1f2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/powerpc/kernel/legacy_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1e6d1f2

Please sign in to comment.