summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-01-13 21:24:55 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-13 21:24:55 -0800
commit87530db5ec7d519c7ba334e414307c5130ae2da8 (patch)
treea1720bb29998d8d658e91ed106263561a8101bf0 /drivers
parenta148058c5cf72ad23fb6c4cf9828f7276e13151c (diff)
parentd5f079000b20887bfbc84d772a27709c5665e652 (diff)
downloadop-kernel-dev-87530db5ec7d519c7ba334e414307c5130ae2da8.zip
op-kernel-dev-87530db5ec7d519c7ba334e414307c5130ae2da8.tar.gz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge
Diffstat (limited to 'drivers')
-rw-r--r--drivers/macintosh/macio-adb.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/macintosh/macio-adb.c b/drivers/macintosh/macio-adb.c
index cf6a6f2..314fc08 100644
--- a/drivers/macintosh/macio-adb.c
+++ b/drivers/macintosh/macio-adb.c
@@ -17,6 +17,7 @@
#include <asm/irq.h>
#include <asm/system.h>
#include <linux/init.h>
+#include <linux/ioport.h>
struct preg {
unsigned char r;
@@ -88,24 +89,26 @@ int macio_probe(void)
int macio_init(void)
{
struct device_node *adbs;
+ struct resource r;
adbs = find_compatible_devices("adb", "chrp,adb0");
if (adbs == 0)
return -ENXIO;
#if 0
- { int i;
+ { int i = 0;
printk("macio_adb_init: node = %p, addrs =", adbs->node);
- for (i = 0; i < adbs->n_addrs; ++i)
- printk(" %x(%x)", adbs->addrs[i].address, adbs->addrs[i].size);
+ while(!of_address_to_resource(adbs, i, &r))
+ printk(" %x(%x)", r.start, r.end - r.start);
printk(", intrs =");
for (i = 0; i < adbs->n_intrs; ++i)
printk(" %x", adbs->intrs[i].line);
printk("\n"); }
#endif
-
- adb = ioremap(adbs->addrs->address, sizeof(struct adb_regs));
+ if (of_address_to_resource(adbs, 0, &r))
+ return -ENXIO;
+ adb = ioremap(r.start, sizeof(struct adb_regs));
out_8(&adb->ctrl.r, 0);
out_8(&adb->intr.r, 0);
OpenPOWER on IntegriCloud