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.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/powerpc/boot/ns16550.c b/arch/powerpc/boot/ns16550.c
index 1ffe72e35cdc..f8f1b2f31412 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 unsigned long reg_phys;
58 59
59 n = getprop(devp, "virtual-reg", &reg_base, sizeof(reg_base)); 60 n = getprop(devp, "virtual-reg", &reg_base, sizeof(reg_base));
60 if (n != sizeof(reg_base)) 61 if (n != sizeof(reg_base)) {
61 return -1; 62 if (!dt_xlate_reg(devp, 0, &reg_phys, NULL))
63 return -1;
64
65 reg_base = (void *)reg_phys;
66 }
62 67
63 n = getprop(devp, "reg-shift", &reg_shift, sizeof(reg_shift)); 68 n = getprop(devp, "reg-shift", &reg_shift, sizeof(reg_shift));
64 if (n != sizeof(reg_shift)) 69 if (n != sizeof(reg_shift))