8 #include <linux/kernel.h>
9 #include <linux/slab.h>
12 #include <asm/oplib.h>
27 if (ssnode != 0 && (
s32)ssnode != -1)
33 return upa_readl(0x1fff40000d0UL);
55 unsigned long treg_base,
hwmid,
i;
59 prom_printf(
"starfire_hookup: No memory, this is insane.\n");
62 treg_base = 0x100fc000000
UL;
63 hwmid = ((upaid & 0x3c) << 1) |
64 ((upaid & 0x40) >> 4) |
67 treg_base += (hwmid << 33
UL);
69 for (i = 0; i < 32; i++) {
71 p->
tregs[
i] = treg_base + (i * 0x10
UL);
73 if (upa_readl(p->
tregs[i]) != 0)
85 unsigned int bus_hwmid;
88 bus_hwmid = (((
unsigned long)imap) >> 33) & 0x7f;
89 for (p = sflist; p !=
NULL; p = p->
next)
90 if (p->
hwmid == bus_hwmid)
93 prom_printf(
"XFIRE: Cannot find irqinfo for imap %016lx\n",
94 ((
unsigned long)imap));
97 for (i = 0; i < 32; i++) {
103 printk(
"starfire_translate: Are you kidding me?\n");
104 panic(
"Lucy in the sky....");
109 upaid = (((upaid & 0x3c) << 1) |
110 ((upaid & 0x40) >> 4) |
113 upa_writel(upaid, p->
tregs[i]);