diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/hvc_vio.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/macio_asic.c | 7 | ||||
-rw-r--r-- | drivers/macintosh/therm_pm72.c | 30 | ||||
-rw-r--r-- | drivers/of/address.c | 54 | ||||
-rw-r--r-- | drivers/ps3/Makefile | 2 | ||||
-rw-r--r-- | drivers/rtc/rtc-cmos.c | 3 |
6 files changed, 40 insertions, 58 deletions
diff --git a/drivers/char/hvc_vio.c b/drivers/char/hvc_vio.c index 27370e99c66f..5e2f52b33327 100644 --- a/drivers/char/hvc_vio.c +++ b/drivers/char/hvc_vio.c | |||
@@ -39,7 +39,7 @@ | |||
39 | 39 | ||
40 | #include "hvc_console.h" | 40 | #include "hvc_console.h" |
41 | 41 | ||
42 | char hvc_driver_name[] = "hvc_console"; | 42 | static const char hvc_driver_name[] = "hvc_console"; |
43 | 43 | ||
44 | static struct vio_device_id hvc_driver_table[] __devinitdata = { | 44 | static struct vio_device_id hvc_driver_table[] __devinitdata = { |
45 | {"serial", "hvterm1"}, | 45 | {"serial", "hvterm1"}, |
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c index b6e7ddc09d76..4daf9e5a7736 100644 --- a/drivers/macintosh/macio_asic.c +++ b/drivers/macintosh/macio_asic.c | |||
@@ -387,11 +387,10 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip, | |||
387 | /* Set the DMA ops to the ones from the PCI device, this could be | 387 | /* Set the DMA ops to the ones from the PCI device, this could be |
388 | * fishy if we didn't know that on PowerMac it's always direct ops | 388 | * fishy if we didn't know that on PowerMac it's always direct ops |
389 | * or iommu ops that will work fine | 389 | * or iommu ops that will work fine |
390 | * | ||
391 | * To get all the fields, copy all archdata | ||
390 | */ | 392 | */ |
391 | dev->ofdev.dev.archdata.dma_ops = | 393 | dev->ofdev.dev.archdata = chip->lbus.pdev->dev.archdata; |
392 | chip->lbus.pdev->dev.archdata.dma_ops; | ||
393 | dev->ofdev.dev.archdata.dma_data = | ||
394 | chip->lbus.pdev->dev.archdata.dma_data; | ||
395 | #endif /* CONFIG_PCI */ | 394 | #endif /* CONFIG_PCI */ |
396 | 395 | ||
397 | #ifdef DEBUG | 396 | #ifdef DEBUG |
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c index 44549272333c..2e041fd0a00c 100644 --- a/drivers/macintosh/therm_pm72.c +++ b/drivers/macintosh/therm_pm72.c | |||
@@ -2213,6 +2213,9 @@ static void fcu_lookup_fans(struct device_node *fcu_node) | |||
2213 | static int fcu_of_probe(struct platform_device* dev, const struct of_device_id *match) | 2213 | static int fcu_of_probe(struct platform_device* dev, const struct of_device_id *match) |
2214 | { | 2214 | { |
2215 | state = state_detached; | 2215 | state = state_detached; |
2216 | of_dev = dev; | ||
2217 | |||
2218 | dev_info(&dev->dev, "PowerMac G5 Thermal control driver %s\n", VERSION); | ||
2216 | 2219 | ||
2217 | /* Lookup the fans in the device tree */ | 2220 | /* Lookup the fans in the device tree */ |
2218 | fcu_lookup_fans(dev->dev.of_node); | 2221 | fcu_lookup_fans(dev->dev.of_node); |
@@ -2235,6 +2238,7 @@ static const struct of_device_id fcu_match[] = | |||
2235 | }, | 2238 | }, |
2236 | {}, | 2239 | {}, |
2237 | }; | 2240 | }; |
2241 | MODULE_DEVICE_TABLE(of, fcu_match); | ||
2238 | 2242 | ||
2239 | static struct of_platform_driver fcu_of_platform_driver = | 2243 | static struct of_platform_driver fcu_of_platform_driver = |
2240 | { | 2244 | { |
@@ -2252,8 +2256,6 @@ static struct of_platform_driver fcu_of_platform_driver = | |||
2252 | */ | 2256 | */ |
2253 | static int __init therm_pm72_init(void) | 2257 | static int __init therm_pm72_init(void) |
2254 | { | 2258 | { |
2255 | struct device_node *np; | ||
2256 | |||
2257 | rackmac = of_machine_is_compatible("RackMac3,1"); | 2259 | rackmac = of_machine_is_compatible("RackMac3,1"); |
2258 | 2260 | ||
2259 | if (!of_machine_is_compatible("PowerMac7,2") && | 2261 | if (!of_machine_is_compatible("PowerMac7,2") && |
@@ -2261,34 +2263,12 @@ static int __init therm_pm72_init(void) | |||
2261 | !rackmac) | 2263 | !rackmac) |
2262 | return -ENODEV; | 2264 | return -ENODEV; |
2263 | 2265 | ||
2264 | printk(KERN_INFO "PowerMac G5 Thermal control driver %s\n", VERSION); | 2266 | return of_register_platform_driver(&fcu_of_platform_driver); |
2265 | |||
2266 | np = of_find_node_by_type(NULL, "fcu"); | ||
2267 | if (np == NULL) { | ||
2268 | /* Some machines have strangely broken device-tree */ | ||
2269 | np = of_find_node_by_path("/u3@0,f8000000/i2c@f8001000/fan@15e"); | ||
2270 | if (np == NULL) { | ||
2271 | printk(KERN_ERR "Can't find FCU in device-tree !\n"); | ||
2272 | return -ENODEV; | ||
2273 | } | ||
2274 | } | ||
2275 | of_dev = of_platform_device_create(np, "temperature", NULL); | ||
2276 | if (of_dev == NULL) { | ||
2277 | printk(KERN_ERR "Can't register FCU platform device !\n"); | ||
2278 | return -ENODEV; | ||
2279 | } | ||
2280 | |||
2281 | of_register_platform_driver(&fcu_of_platform_driver); | ||
2282 | |||
2283 | return 0; | ||
2284 | } | 2267 | } |
2285 | 2268 | ||
2286 | static void __exit therm_pm72_exit(void) | 2269 | static void __exit therm_pm72_exit(void) |
2287 | { | 2270 | { |
2288 | of_unregister_platform_driver(&fcu_of_platform_driver); | 2271 | of_unregister_platform_driver(&fcu_of_platform_driver); |
2289 | |||
2290 | if (of_dev) | ||
2291 | of_device_unregister(of_dev); | ||
2292 | } | 2272 | } |
2293 | 2273 | ||
2294 | module_init(therm_pm72_init); | 2274 | module_init(therm_pm72_init); |
diff --git a/drivers/of/address.c b/drivers/of/address.c index 3a1c7e70b192..b4559c58c095 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c | |||
@@ -12,13 +12,13 @@ | |||
12 | (ns) > 0) | 12 | (ns) > 0) |
13 | 13 | ||
14 | static struct of_bus *of_match_bus(struct device_node *np); | 14 | static struct of_bus *of_match_bus(struct device_node *np); |
15 | static int __of_address_to_resource(struct device_node *dev, const u32 *addrp, | 15 | static int __of_address_to_resource(struct device_node *dev, |
16 | u64 size, unsigned int flags, | 16 | const __be32 *addrp, u64 size, unsigned int flags, |
17 | struct resource *r); | 17 | struct resource *r); |
18 | 18 | ||
19 | /* Debug utility */ | 19 | /* Debug utility */ |
20 | #ifdef DEBUG | 20 | #ifdef DEBUG |
21 | static void of_dump_addr(const char *s, const u32 *addr, int na) | 21 | static void of_dump_addr(const char *s, const __be32 *addr, int na) |
22 | { | 22 | { |
23 | printk(KERN_DEBUG "%s", s); | 23 | printk(KERN_DEBUG "%s", s); |
24 | while (na--) | 24 | while (na--) |
@@ -26,7 +26,7 @@ static void of_dump_addr(const char *s, const u32 *addr, int na) | |||
26 | printk("\n"); | 26 | printk("\n"); |
27 | } | 27 | } |
28 | #else | 28 | #else |
29 | static void of_dump_addr(const char *s, const u32 *addr, int na) { } | 29 | static void of_dump_addr(const char *s, const __be32 *addr, int na) { } |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | /* Callbacks for bus specific translators */ | 32 | /* Callbacks for bus specific translators */ |
@@ -36,10 +36,10 @@ struct of_bus { | |||
36 | int (*match)(struct device_node *parent); | 36 | int (*match)(struct device_node *parent); |
37 | void (*count_cells)(struct device_node *child, | 37 | void (*count_cells)(struct device_node *child, |
38 | int *addrc, int *sizec); | 38 | int *addrc, int *sizec); |
39 | u64 (*map)(u32 *addr, const u32 *range, | 39 | u64 (*map)(u32 *addr, const __be32 *range, |
40 | int na, int ns, int pna); | 40 | int na, int ns, int pna); |
41 | int (*translate)(u32 *addr, u64 offset, int na); | 41 | int (*translate)(u32 *addr, u64 offset, int na); |
42 | unsigned int (*get_flags)(const u32 *addr); | 42 | unsigned int (*get_flags)(const __be32 *addr); |
43 | }; | 43 | }; |
44 | 44 | ||
45 | /* | 45 | /* |
@@ -55,7 +55,7 @@ static void of_bus_default_count_cells(struct device_node *dev, | |||
55 | *sizec = of_n_size_cells(dev); | 55 | *sizec = of_n_size_cells(dev); |
56 | } | 56 | } |
57 | 57 | ||
58 | static u64 of_bus_default_map(u32 *addr, const u32 *range, | 58 | static u64 of_bus_default_map(u32 *addr, const __be32 *range, |
59 | int na, int ns, int pna) | 59 | int na, int ns, int pna) |
60 | { | 60 | { |
61 | u64 cp, s, da; | 61 | u64 cp, s, da; |
@@ -85,7 +85,7 @@ static int of_bus_default_translate(u32 *addr, u64 offset, int na) | |||
85 | return 0; | 85 | return 0; |
86 | } | 86 | } |
87 | 87 | ||
88 | static unsigned int of_bus_default_get_flags(const u32 *addr) | 88 | static unsigned int of_bus_default_get_flags(const __be32 *addr) |
89 | { | 89 | { |
90 | return IORESOURCE_MEM; | 90 | return IORESOURCE_MEM; |
91 | } | 91 | } |
@@ -110,10 +110,10 @@ static void of_bus_pci_count_cells(struct device_node *np, | |||
110 | *sizec = 2; | 110 | *sizec = 2; |
111 | } | 111 | } |
112 | 112 | ||
113 | static unsigned int of_bus_pci_get_flags(const u32 *addr) | 113 | static unsigned int of_bus_pci_get_flags(const __be32 *addr) |
114 | { | 114 | { |
115 | unsigned int flags = 0; | 115 | unsigned int flags = 0; |
116 | u32 w = addr[0]; | 116 | u32 w = be32_to_cpup(addr); |
117 | 117 | ||
118 | switch((w >> 24) & 0x03) { | 118 | switch((w >> 24) & 0x03) { |
119 | case 0x01: | 119 | case 0x01: |
@@ -129,7 +129,8 @@ static unsigned int of_bus_pci_get_flags(const u32 *addr) | |||
129 | return flags; | 129 | return flags; |
130 | } | 130 | } |
131 | 131 | ||
132 | static u64 of_bus_pci_map(u32 *addr, const u32 *range, int na, int ns, int pna) | 132 | static u64 of_bus_pci_map(u32 *addr, const __be32 *range, int na, int ns, |
133 | int pna) | ||
133 | { | 134 | { |
134 | u64 cp, s, da; | 135 | u64 cp, s, da; |
135 | unsigned int af, rf; | 136 | unsigned int af, rf; |
@@ -160,7 +161,7 @@ static int of_bus_pci_translate(u32 *addr, u64 offset, int na) | |||
160 | return of_bus_default_translate(addr + 1, offset, na - 1); | 161 | return of_bus_default_translate(addr + 1, offset, na - 1); |
161 | } | 162 | } |
162 | 163 | ||
163 | const u32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size, | 164 | const __be32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size, |
164 | unsigned int *flags) | 165 | unsigned int *flags) |
165 | { | 166 | { |
166 | const __be32 *prop; | 167 | const __be32 *prop; |
@@ -207,7 +208,7 @@ EXPORT_SYMBOL(of_get_pci_address); | |||
207 | int of_pci_address_to_resource(struct device_node *dev, int bar, | 208 | int of_pci_address_to_resource(struct device_node *dev, int bar, |
208 | struct resource *r) | 209 | struct resource *r) |
209 | { | 210 | { |
210 | const u32 *addrp; | 211 | const __be32 *addrp; |
211 | u64 size; | 212 | u64 size; |
212 | unsigned int flags; | 213 | unsigned int flags; |
213 | 214 | ||
@@ -237,12 +238,13 @@ static void of_bus_isa_count_cells(struct device_node *child, | |||
237 | *sizec = 1; | 238 | *sizec = 1; |
238 | } | 239 | } |
239 | 240 | ||
240 | static u64 of_bus_isa_map(u32 *addr, const u32 *range, int na, int ns, int pna) | 241 | static u64 of_bus_isa_map(u32 *addr, const __be32 *range, int na, int ns, |
242 | int pna) | ||
241 | { | 243 | { |
242 | u64 cp, s, da; | 244 | u64 cp, s, da; |
243 | 245 | ||
244 | /* Check address type match */ | 246 | /* Check address type match */ |
245 | if ((addr[0] ^ range[0]) & 0x00000001) | 247 | if ((addr[0] ^ range[0]) & cpu_to_be32(1)) |
246 | return OF_BAD_ADDR; | 248 | return OF_BAD_ADDR; |
247 | 249 | ||
248 | /* Read address values, skipping high cell */ | 250 | /* Read address values, skipping high cell */ |
@@ -264,10 +266,10 @@ static int of_bus_isa_translate(u32 *addr, u64 offset, int na) | |||
264 | return of_bus_default_translate(addr + 1, offset, na - 1); | 266 | return of_bus_default_translate(addr + 1, offset, na - 1); |
265 | } | 267 | } |
266 | 268 | ||
267 | static unsigned int of_bus_isa_get_flags(const u32 *addr) | 269 | static unsigned int of_bus_isa_get_flags(const __be32 *addr) |
268 | { | 270 | { |
269 | unsigned int flags = 0; | 271 | unsigned int flags = 0; |
270 | u32 w = addr[0]; | 272 | u32 w = be32_to_cpup(addr); |
271 | 273 | ||
272 | if (w & 1) | 274 | if (w & 1) |
273 | flags |= IORESOURCE_IO; | 275 | flags |= IORESOURCE_IO; |
@@ -330,7 +332,7 @@ static int of_translate_one(struct device_node *parent, struct of_bus *bus, | |||
330 | struct of_bus *pbus, u32 *addr, | 332 | struct of_bus *pbus, u32 *addr, |
331 | int na, int ns, int pna, const char *rprop) | 333 | int na, int ns, int pna, const char *rprop) |
332 | { | 334 | { |
333 | const u32 *ranges; | 335 | const __be32 *ranges; |
334 | unsigned int rlen; | 336 | unsigned int rlen; |
335 | int rone; | 337 | int rone; |
336 | u64 offset = OF_BAD_ADDR; | 338 | u64 offset = OF_BAD_ADDR; |
@@ -398,7 +400,7 @@ static int of_translate_one(struct device_node *parent, struct of_bus *bus, | |||
398 | * that can be mapped to a cpu physical address). This is not really specified | 400 | * that can be mapped to a cpu physical address). This is not really specified |
399 | * that way, but this is traditionally the way IBM at least do things | 401 | * that way, but this is traditionally the way IBM at least do things |
400 | */ | 402 | */ |
401 | u64 __of_translate_address(struct device_node *dev, const u32 *in_addr, | 403 | u64 __of_translate_address(struct device_node *dev, const __be32 *in_addr, |
402 | const char *rprop) | 404 | const char *rprop) |
403 | { | 405 | { |
404 | struct device_node *parent = NULL; | 406 | struct device_node *parent = NULL; |
@@ -475,22 +477,22 @@ u64 __of_translate_address(struct device_node *dev, const u32 *in_addr, | |||
475 | return result; | 477 | return result; |
476 | } | 478 | } |
477 | 479 | ||
478 | u64 of_translate_address(struct device_node *dev, const u32 *in_addr) | 480 | u64 of_translate_address(struct device_node *dev, const __be32 *in_addr) |
479 | { | 481 | { |
480 | return __of_translate_address(dev, in_addr, "ranges"); | 482 | return __of_translate_address(dev, in_addr, "ranges"); |
481 | } | 483 | } |
482 | EXPORT_SYMBOL(of_translate_address); | 484 | EXPORT_SYMBOL(of_translate_address); |
483 | 485 | ||
484 | u64 of_translate_dma_address(struct device_node *dev, const u32 *in_addr) | 486 | u64 of_translate_dma_address(struct device_node *dev, const __be32 *in_addr) |
485 | { | 487 | { |
486 | return __of_translate_address(dev, in_addr, "dma-ranges"); | 488 | return __of_translate_address(dev, in_addr, "dma-ranges"); |
487 | } | 489 | } |
488 | EXPORT_SYMBOL(of_translate_dma_address); | 490 | EXPORT_SYMBOL(of_translate_dma_address); |
489 | 491 | ||
490 | const u32 *of_get_address(struct device_node *dev, int index, u64 *size, | 492 | const __be32 *of_get_address(struct device_node *dev, int index, u64 *size, |
491 | unsigned int *flags) | 493 | unsigned int *flags) |
492 | { | 494 | { |
493 | const u32 *prop; | 495 | const __be32 *prop; |
494 | unsigned int psize; | 496 | unsigned int psize; |
495 | struct device_node *parent; | 497 | struct device_node *parent; |
496 | struct of_bus *bus; | 498 | struct of_bus *bus; |
@@ -525,8 +527,8 @@ const u32 *of_get_address(struct device_node *dev, int index, u64 *size, | |||
525 | } | 527 | } |
526 | EXPORT_SYMBOL(of_get_address); | 528 | EXPORT_SYMBOL(of_get_address); |
527 | 529 | ||
528 | static int __of_address_to_resource(struct device_node *dev, const u32 *addrp, | 530 | static int __of_address_to_resource(struct device_node *dev, |
529 | u64 size, unsigned int flags, | 531 | const __be32 *addrp, u64 size, unsigned int flags, |
530 | struct resource *r) | 532 | struct resource *r) |
531 | { | 533 | { |
532 | u64 taddr; | 534 | u64 taddr; |
@@ -564,7 +566,7 @@ static int __of_address_to_resource(struct device_node *dev, const u32 *addrp, | |||
564 | int of_address_to_resource(struct device_node *dev, int index, | 566 | int of_address_to_resource(struct device_node *dev, int index, |
565 | struct resource *r) | 567 | struct resource *r) |
566 | { | 568 | { |
567 | const u32 *addrp; | 569 | const __be32 *addrp; |
568 | u64 size; | 570 | u64 size; |
569 | unsigned int flags; | 571 | unsigned int flags; |
570 | 572 | ||
diff --git a/drivers/ps3/Makefile b/drivers/ps3/Makefile index ccea15c11c19..50cb1e1b4a12 100644 --- a/drivers/ps3/Makefile +++ b/drivers/ps3/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | obj-$(CONFIG_PS3_VUART) += ps3-vuart.o | 1 | obj-$(CONFIG_PS3_VUART) += ps3-vuart.o |
2 | obj-$(CONFIG_PS3_PS3AV) += ps3av_mod.o | 2 | obj-$(CONFIG_PS3_PS3AV) += ps3av_mod.o |
3 | ps3av_mod-objs += ps3av.o ps3av_cmd.o | 3 | ps3av_mod-y := ps3av.o ps3av_cmd.o |
4 | obj-$(CONFIG_PPC_PS3) += sys-manager-core.o | 4 | obj-$(CONFIG_PPC_PS3) += sys-manager-core.o |
5 | obj-$(CONFIG_PS3_SYS_MANAGER) += ps3-sys-manager.o | 5 | obj-$(CONFIG_PS3_SYS_MANAGER) += ps3-sys-manager.o |
6 | obj-$(CONFIG_PS3_STORAGE) += ps3stor_lib.o | 6 | obj-$(CONFIG_PS3_STORAGE) += ps3stor_lib.o |
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index 5856167a0c90..7e6ce626b7f1 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c | |||
@@ -687,7 +687,8 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq) | |||
687 | #if defined(CONFIG_ATARI) | 687 | #if defined(CONFIG_ATARI) |
688 | address_space = 64; | 688 | address_space = 64; |
689 | #elif defined(__i386__) || defined(__x86_64__) || defined(__arm__) \ | 689 | #elif defined(__i386__) || defined(__x86_64__) || defined(__arm__) \ |
690 | || defined(__sparc__) || defined(__mips__) | 690 | || defined(__sparc__) || defined(__mips__) \ |
691 | || defined(__powerpc__) | ||
691 | address_space = 128; | 692 | address_space = 128; |
692 | #else | 693 | #else |
693 | #warning Assuming 128 bytes of RTC+NVRAM address space, not 64 bytes. | 694 | #warning Assuming 128 bytes of RTC+NVRAM address space, not 64 bytes. |