aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/ns16550.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/boot/ns16550.c')
-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 aef3bdc89160..8c9ead94be06 100644
--- a/arch/powerpc/boot/ns16550.c
+++ b/arch/powerpc/boot/ns16550.c
@@ -55,10 +55,15 @@ static u8 ns16550_tstc(void)
55int ns16550_console_init(void *devp, struct serial_console_data *scdp) 55int ns16550_console_init(void *devp, struct serial_console_data *scdp)
56{ 56{
57 int n; 57 int n;
58 u32 reg_offset;
58 59
59 if (dt_get_virtual_reg(devp, (void **)&reg_base, 1) < 1) 60 if (dt_get_virtual_reg(devp, (void **)&reg_base, 1) < 1)
60 return -1; 61 return -1;
61 62
63 n = getprop(devp, "reg-offset", &reg_offset, sizeof(reg_offset));
64 if (n == sizeof(reg_offset))
65 reg_base += reg_offset;
66
62 n = getprop(devp, "reg-shift", &reg_shift, sizeof(reg_shift)); 67 n = getprop(devp, "reg-shift", &reg_shift, sizeof(reg_shift));
63 if (n != sizeof(reg_shift)) 68 if (n != sizeof(reg_shift))
64 reg_shift = 0; 69 reg_shift = 0;