aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/boot
diff options
context:
space:
mode:
authorJohn Linn <john.linn@xilinx.com>2008-04-03 03:52:14 +1100
committerJosh Boyer <jwboyer@linux.vnet.ibm.com>2008-04-24 13:32:46 -0500
commit2f0b45f846735b486c0383740d3959941c4721a4 (patch)
tree87af793cbf504c8f7ff9174d8707bc6b87672f47 /arch/powerpc/boot
parent884d04cd8d7bba3dc885227ad400f8aea5623cdc (diff)
[POWERPC] Xilinx: boot support for Xilinx uart 16550.
The Xilinx 16550 uart core is not a standard 16550 because it uses word-based addressing rather than byte-based adressing. With additional properties it is compatible with the open firmware 'ns16550' compatible binding. This code updates the ns16550 driver to use the reg-offset property so that the Xilinx UART 16550 can be used with it. The reg-shift was already being handled. Signed-off-by: John Linn <john.linn@xilinx.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Diffstat (limited to 'arch/powerpc/boot')
-rw-r--r--arch/powerpc/boot/ns16550.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/boot/ns16550.c b/arch/powerpc/boot/ns16550.c
index aef3bdc8916..8c9ead94be0 100644
--- a/arch/powerpc/boot/ns16550.c
+++ b/arch/powerpc/boot/ns16550.c
@@ -55,10 +55,15 @@ static u8 ns16550_tstc(void)
int ns16550_console_init(void *devp, struct serial_console_data *scdp)
{
int n;
+ u32 reg_offset;
if (dt_get_virtual_reg(devp, (void **)&reg_base, 1) < 1)
return -1;
+ n = getprop(devp, "reg-offset", &reg_offset, sizeof(reg_offset));
+ if (n == sizeof(reg_offset))
+ reg_base += reg_offset;
+
n = getprop(devp, "reg-shift", &reg_shift, sizeof(reg_shift));
if (n != sizeof(reg_shift))
reg_shift = 0;