Commit 36874579 authored by David Woodhouse's avatar David Woodhouse Committed by Paul Mackerras

[PATCH] powerpc: macio-adb build fix

This makes macio-adb.c build again. Entirely untested.
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 575e3216
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/system.h> #include <asm/system.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/ioport.h>
struct preg { struct preg {
unsigned char r; unsigned char r;
...@@ -88,24 +89,26 @@ int macio_probe(void) ...@@ -88,24 +89,26 @@ int macio_probe(void)
int macio_init(void) int macio_init(void)
{ {
struct device_node *adbs; struct device_node *adbs;
struct resource r;
adbs = find_compatible_devices("adb", "chrp,adb0"); adbs = find_compatible_devices("adb", "chrp,adb0");
if (adbs == 0) if (adbs == 0)
return -ENXIO; return -ENXIO;
#if 0 #if 0
{ int i; { int i = 0;
printk("macio_adb_init: node = %p, addrs =", adbs->node); printk("macio_adb_init: node = %p, addrs =", adbs->node);
for (i = 0; i < adbs->n_addrs; ++i) while(!of_address_to_resource(adbs, i, &r))
printk(" %x(%x)", adbs->addrs[i].address, adbs->addrs[i].size); printk(" %x(%x)", r.start, r.end - r.start);
printk(", intrs ="); printk(", intrs =");
for (i = 0; i < adbs->n_intrs; ++i) for (i = 0; i < adbs->n_intrs; ++i)
printk(" %x", adbs->intrs[i].line); printk(" %x", adbs->intrs[i].line);
printk("\n"); } printk("\n"); }
#endif #endif
if (of_address_to_resource(adbs, 0, &r))
adb = ioremap(adbs->addrs->address, sizeof(struct adb_regs)); return -ENXIO;
adb = ioremap(r.start, sizeof(struct adb_regs));
out_8(&adb->ctrl.r, 0); out_8(&adb->ctrl.r, 0);
out_8(&adb->intr.r, 0); out_8(&adb->intr.r, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment