diff options
Diffstat (limited to 'drivers/of/address.c')
-rw-r--r-- | drivers/of/address.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/of/address.c b/drivers/of/address.c index 72e496f1e9b0..0125524c08c4 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c | |||
@@ -37,9 +37,9 @@ struct of_bus { | |||
37 | int (*match)(struct device_node *parent); | 37 | int (*match)(struct device_node *parent); |
38 | void (*count_cells)(struct device_node *child, | 38 | void (*count_cells)(struct device_node *child, |
39 | int *addrc, int *sizec); | 39 | int *addrc, int *sizec); |
40 | u64 (*map)(u32 *addr, const __be32 *range, | 40 | u64 (*map)(__be32 *addr, const __be32 *range, |
41 | int na, int ns, int pna); | 41 | int na, int ns, int pna); |
42 | int (*translate)(u32 *addr, u64 offset, int na); | 42 | int (*translate)(__be32 *addr, u64 offset, int na); |
43 | unsigned int (*get_flags)(const __be32 *addr); | 43 | unsigned int (*get_flags)(const __be32 *addr); |
44 | }; | 44 | }; |
45 | 45 | ||
@@ -56,7 +56,7 @@ static void of_bus_default_count_cells(struct device_node *dev, | |||
56 | *sizec = of_n_size_cells(dev); | 56 | *sizec = of_n_size_cells(dev); |
57 | } | 57 | } |
58 | 58 | ||
59 | static u64 of_bus_default_map(u32 *addr, const __be32 *range, | 59 | static u64 of_bus_default_map(__be32 *addr, const __be32 *range, |
60 | int na, int ns, int pna) | 60 | int na, int ns, int pna) |
61 | { | 61 | { |
62 | u64 cp, s, da; | 62 | u64 cp, s, da; |
@@ -82,7 +82,7 @@ static u64 of_bus_default_map(u32 *addr, const __be32 *range, | |||
82 | return da - cp; | 82 | return da - cp; |
83 | } | 83 | } |
84 | 84 | ||
85 | static int of_bus_default_translate(u32 *addr, u64 offset, int na) | 85 | static int of_bus_default_translate(__be32 *addr, u64 offset, int na) |
86 | { | 86 | { |
87 | u64 a = of_read_number(addr, na); | 87 | u64 a = of_read_number(addr, na); |
88 | memset(addr, 0, na * 4); | 88 | memset(addr, 0, na * 4); |
@@ -138,7 +138,7 @@ static unsigned int of_bus_pci_get_flags(const __be32 *addr) | |||
138 | return flags; | 138 | return flags; |
139 | } | 139 | } |
140 | 140 | ||
141 | static u64 of_bus_pci_map(u32 *addr, const __be32 *range, int na, int ns, | 141 | static u64 of_bus_pci_map(__be32 *addr, const __be32 *range, int na, int ns, |
142 | int pna) | 142 | int pna) |
143 | { | 143 | { |
144 | u64 cp, s, da; | 144 | u64 cp, s, da; |
@@ -165,7 +165,7 @@ static u64 of_bus_pci_map(u32 *addr, const __be32 *range, int na, int ns, | |||
165 | return da - cp; | 165 | return da - cp; |
166 | } | 166 | } |
167 | 167 | ||
168 | static int of_bus_pci_translate(u32 *addr, u64 offset, int na) | 168 | static int of_bus_pci_translate(__be32 *addr, u64 offset, int na) |
169 | { | 169 | { |
170 | return of_bus_default_translate(addr + 1, offset, na - 1); | 170 | return of_bus_default_translate(addr + 1, offset, na - 1); |
171 | } | 171 | } |
@@ -247,7 +247,7 @@ static void of_bus_isa_count_cells(struct device_node *child, | |||
247 | *sizec = 1; | 247 | *sizec = 1; |
248 | } | 248 | } |
249 | 249 | ||
250 | static u64 of_bus_isa_map(u32 *addr, const __be32 *range, int na, int ns, | 250 | static u64 of_bus_isa_map(__be32 *addr, const __be32 *range, int na, int ns, |
251 | int pna) | 251 | int pna) |
252 | { | 252 | { |
253 | u64 cp, s, da; | 253 | u64 cp, s, da; |
@@ -270,7 +270,7 @@ static u64 of_bus_isa_map(u32 *addr, const __be32 *range, int na, int ns, | |||
270 | return da - cp; | 270 | return da - cp; |
271 | } | 271 | } |
272 | 272 | ||
273 | static int of_bus_isa_translate(u32 *addr, u64 offset, int na) | 273 | static int of_bus_isa_translate(__be32 *addr, u64 offset, int na) |
274 | { | 274 | { |
275 | return of_bus_default_translate(addr + 1, offset, na - 1); | 275 | return of_bus_default_translate(addr + 1, offset, na - 1); |
276 | } | 276 | } |
@@ -338,7 +338,7 @@ static struct of_bus *of_match_bus(struct device_node *np) | |||
338 | } | 338 | } |
339 | 339 | ||
340 | static int of_translate_one(struct device_node *parent, struct of_bus *bus, | 340 | static int of_translate_one(struct device_node *parent, struct of_bus *bus, |
341 | struct of_bus *pbus, u32 *addr, | 341 | struct of_bus *pbus, __be32 *addr, |
342 | int na, int ns, int pna, const char *rprop) | 342 | int na, int ns, int pna, const char *rprop) |
343 | { | 343 | { |
344 | const __be32 *ranges; | 344 | const __be32 *ranges; |
@@ -409,12 +409,12 @@ static int of_translate_one(struct device_node *parent, struct of_bus *bus, | |||
409 | * that can be mapped to a cpu physical address). This is not really specified | 409 | * that can be mapped to a cpu physical address). This is not really specified |
410 | * that way, but this is traditionally the way IBM at least do things | 410 | * that way, but this is traditionally the way IBM at least do things |
411 | */ | 411 | */ |
412 | u64 __of_translate_address(struct device_node *dev, const __be32 *in_addr, | 412 | static u64 __of_translate_address(struct device_node *dev, |
413 | const char *rprop) | 413 | const __be32 *in_addr, const char *rprop) |
414 | { | 414 | { |
415 | struct device_node *parent = NULL; | 415 | struct device_node *parent = NULL; |
416 | struct of_bus *bus, *pbus; | 416 | struct of_bus *bus, *pbus; |
417 | u32 addr[OF_MAX_ADDR_CELLS]; | 417 | __be32 addr[OF_MAX_ADDR_CELLS]; |
418 | int na, ns, pna, pns; | 418 | int na, ns, pna, pns; |
419 | u64 result = OF_BAD_ADDR; | 419 | u64 result = OF_BAD_ADDR; |
420 | 420 | ||