aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/mediabay.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2005-12-13 02:01:21 -0500
committerPaul Mackerras <paulus@samba.org>2006-01-08 22:53:55 -0500
commitcc5d0189b9ba95260857a5018a1c2fef90008507 (patch)
tree1202c94b6b3cb81a96d0a0e54424cad10eef68bb /drivers/macintosh/mediabay.c
parent9cf84d7c97992dbe5360b241327341c07ce30fc9 (diff)
[PATCH] powerpc: Remove device_node addrs/n_addr
The pre-parsed addrs/n_addrs fields in struct device_node are finally gone. Remove the dodgy heuristics that did that parsing at boot and remove the fields themselves since we now have a good replacement with the new OF parsing code. This patch also fixes a bunch of drivers to use the new code instead, so that at least pmac32, pseries, iseries and g5 defconfigs build. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/macintosh/mediabay.c')
-rw-r--r--drivers/macintosh/mediabay.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c
index b856bb67169c..8dbf2852bae0 100644
--- a/drivers/macintosh/mediabay.c
+++ b/drivers/macintosh/mediabay.c
@@ -647,6 +647,7 @@ static int __devinit media_bay_attach(struct macio_dev *mdev, const struct of_de
647 struct media_bay_info* bay; 647 struct media_bay_info* bay;
648 u32 __iomem *regbase; 648 u32 __iomem *regbase;
649 struct device_node *ofnode; 649 struct device_node *ofnode;
650 unsigned long base;
650 int i; 651 int i;
651 652
652 ofnode = mdev->ofdev.node; 653 ofnode = mdev->ofdev.node;
@@ -656,10 +657,11 @@ static int __devinit media_bay_attach(struct macio_dev *mdev, const struct of_de
656 if (macio_request_resources(mdev, "media-bay")) 657 if (macio_request_resources(mdev, "media-bay"))
657 return -EBUSY; 658 return -EBUSY;
658 /* Media bay registers are located at the beginning of the 659 /* Media bay registers are located at the beginning of the
659 * mac-io chip, we get the parent address for now (hrm...) 660 * mac-io chip, for now, we trick and align down the first
661 * resource passed in
660 */ 662 */
661 regbase = (u32 __iomem *) 663 base = macio_resource_start(mdev, 0) & 0xffff0000u;
662 ioremap(ofnode->parent->addrs[0].address, 0x100); 664 regbase = (u32 __iomem *)ioremap(base, 0x100);
663 if (regbase == NULL) { 665 if (regbase == NULL) {
664 macio_release_resources(mdev); 666 macio_release_resources(mdev);
665 return -ENOMEM; 667 return -ENOMEM;