aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-11 19:31:41 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-11 19:31:41 -0500
commit5a62f995446be44811fefa48f91f9efb7ea172d7 (patch)
treee297371f0d513dc6278bb67d582d2216eb7d74ed /drivers/macintosh
parentf1d6d6cd9029daa7e7d4a0b14347b5392320f22a (diff)
parent5d7d8072edc11080a7cf6cc37c9f4e61ca1e93c9 (diff)
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (72 commits) powerpc/pseries: Fix build of topology stuff without CONFIG_NUMA powerpc/pseries: Fix VPHN build errors on non-SMP systems powerpc/83xx: add mpc8308_p1m DMA controller device-tree node powerpc/83xx: add DMA controller to mpc8308 device-tree node powerpc/512x: try to free dma descriptors in case of allocation failure powerpc/512x: add MPC8308 dma support powerpc/512x: fix the hanged dma transfer issue powerpc/512x: scatter/gather dma fix powerpc/powermac: Make auto-loading of therm_pm72 possible of/address: Use propper endianess in get_flags powerpc/pci: Use printf extension %pR for struct resource powerpc: Remove unnecessary casts of void ptr powerpc: Disable VPHN polling during a suspend operation powerpc/pseries: Poll VPA for topology changes and update NUMA maps powerpc: iommu: Add device name to iommu error printks powerpc: Record vma->phys_addr in ioremap() powerpc: Update compat_arch_ptrace powerpc: Fix PPC_PTRACE_SETHWDEBUG on PPC_BOOK3S powerpc/time: printk time stamp init not correct powerpc: Minor cleanups for machdep.h ...
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/macio_asic.c7
-rw-r--r--drivers/macintosh/therm_pm72.c30
2 files changed, 8 insertions, 29 deletions
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)
2213static int fcu_of_probe(struct platform_device* dev, const struct of_device_id *match) 2213static 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};
2241MODULE_DEVICE_TABLE(of, fcu_match);
2238 2242
2239static struct of_platform_driver fcu_of_platform_driver = 2243static 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 */
2253static int __init therm_pm72_init(void) 2257static 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
2286static void __exit therm_pm72_exit(void) 2269static 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
2294module_init(therm_pm72_init); 2274module_init(therm_pm72_init);