Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

John Linn and committed by
Josh Boyer
2f0b45f8 884d04cd

+5
+5
arch/powerpc/boot/ns16550.c
··· 55 55 int ns16550_console_init(void *devp, struct serial_console_data *scdp) 56 56 { 57 57 int n; 58 + u32 reg_offset; 58 59 59 60 if (dt_get_virtual_reg(devp, (void **)&reg_base, 1) < 1) 60 61 return -1; 62 + 63 + n = getprop(devp, "reg-offset", &reg_offset, sizeof(reg_offset)); 64 + if (n == sizeof(reg_offset)) 65 + reg_base += reg_offset; 61 66 62 67 n = getprop(devp, "reg-shift", &reg_shift, sizeof(reg_shift)); 63 68 if (n != sizeof(reg_shift))