Commit 4a396dc6 authored by Alistair Popple's avatar Alistair Popple Committed by Benjamin Herrenschmidt

powerpc: Little endian fixes for legacy_serial.c

Signed-off-by: default avatarAlistair Popple <alistair@popple.id.au>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent c6296b96
...@@ -152,7 +152,7 @@ static int __init add_legacy_soc_port(struct device_node *np, ...@@ -152,7 +152,7 @@ static int __init add_legacy_soc_port(struct device_node *np,
struct device_node *soc_dev) struct device_node *soc_dev)
{ {
u64 addr; u64 addr;
const u32 *addrp; const __be32 *addrp;
upf_t flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ upf_t flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ
| UPF_FIXED_PORT; | UPF_FIXED_PORT;
struct device_node *tsi = of_get_parent(np); struct device_node *tsi = of_get_parent(np);
...@@ -242,7 +242,7 @@ static int __init add_legacy_pci_port(struct device_node *np, ...@@ -242,7 +242,7 @@ static int __init add_legacy_pci_port(struct device_node *np,
struct device_node *pci_dev) struct device_node *pci_dev)
{ {
u64 addr, base; u64 addr, base;
const u32 *addrp; const __be32 *addrp;
unsigned int flags; unsigned int flags;
int iotype, index = -1, lindex = 0; int iotype, index = -1, lindex = 0;
...@@ -275,7 +275,7 @@ static int __init add_legacy_pci_port(struct device_node *np, ...@@ -275,7 +275,7 @@ static int __init add_legacy_pci_port(struct device_node *np,
if (iotype == UPIO_MEM) if (iotype == UPIO_MEM)
base = addr; base = addr;
else else
base = addrp[2]; base = of_read_number(&addrp[2], 1);
/* Try to guess an index... If we have subdevices of the pci dev, /* Try to guess an index... If we have subdevices of the pci dev,
* we get to their "reg" property * we get to their "reg" property
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment