diff options
author | Paul Mackerras <paulus@samba.org> | 2007-07-10 23:28:26 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-07-10 23:28:26 -0400 |
commit | bf22f6fe2d72b4d7e9035be8ceb340414cf490e3 (patch) | |
tree | 14085d90de0428316479fe6de8a0c6d32e6e65e2 /arch/powerpc/platforms/52xx/efika.c | |
parent | 4eb6bf6bfb580afaf1e1a1d30cba17a078530cf4 (diff) | |
parent | 93ab471889c6662b42ce7da257f31f24c08d7d9e (diff) |
Merge branch 'for-2.6.23' into merge
Diffstat (limited to 'arch/powerpc/platforms/52xx/efika.c')
-rw-r--r-- | arch/powerpc/platforms/52xx/efika.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/52xx/efika.c b/arch/powerpc/platforms/52xx/efika.c index f591a9fc19b9..4be6e7a17b66 100644 --- a/arch/powerpc/platforms/52xx/efika.c +++ b/arch/powerpc/platforms/52xx/efika.c | |||
@@ -54,7 +54,7 @@ static int rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset, | |||
54 | struct pci_controller *hose = bus->sysdata; | 54 | struct pci_controller *hose = bus->sysdata; |
55 | unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8) | 55 | unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8) |
56 | | (((bus->number - hose->first_busno) & 0xff) << 16) | 56 | | (((bus->number - hose->first_busno) & 0xff) << 16) |
57 | | (hose->index << 24); | 57 | | (hose->global_number << 24); |
58 | int ret = -1; | 58 | int ret = -1; |
59 | int rval; | 59 | int rval; |
60 | 60 | ||
@@ -69,7 +69,7 @@ static int rtas_write_config(struct pci_bus *bus, unsigned int devfn, | |||
69 | struct pci_controller *hose = bus->sysdata; | 69 | struct pci_controller *hose = bus->sysdata; |
70 | unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8) | 70 | unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8) |
71 | | (((bus->number - hose->first_busno) & 0xff) << 16) | 71 | | (((bus->number - hose->first_busno) & 0xff) << 16) |
72 | | (hose->index << 24); | 72 | | (hose->global_number << 24); |
73 | int rval; | 73 | int rval; |
74 | 74 | ||
75 | rval = rtas_call(rtas_token("write-pci-config"), 3, 1, NULL, | 75 | rval = rtas_call(rtas_token("write-pci-config"), 3, 1, NULL, |
@@ -83,7 +83,7 @@ static struct pci_ops rtas_pci_ops = { | |||
83 | }; | 83 | }; |
84 | 84 | ||
85 | 85 | ||
86 | void __init efika_pcisetup(void) | 86 | static void __init efika_pcisetup(void) |
87 | { | 87 | { |
88 | const int *bus_range; | 88 | const int *bus_range; |
89 | int len; | 89 | int len; |
@@ -128,7 +128,7 @@ void __init efika_pcisetup(void) | |||
128 | printk(" controlled by %s\n", pcictrl->full_name); | 128 | printk(" controlled by %s\n", pcictrl->full_name); |
129 | printk("\n"); | 129 | printk("\n"); |
130 | 130 | ||
131 | hose = pcibios_alloc_controller(); | 131 | hose = pcibios_alloc_controller(of_node_get(pcictrl)); |
132 | if (!hose) { | 132 | if (!hose) { |
133 | printk(KERN_WARNING EFIKA_PLATFORM_NAME | 133 | printk(KERN_WARNING EFIKA_PLATFORM_NAME |
134 | ": Can't allocate PCI controller structure for %s\n", | 134 | ": Can't allocate PCI controller structure for %s\n", |
@@ -136,7 +136,6 @@ void __init efika_pcisetup(void) | |||
136 | return; | 136 | return; |
137 | } | 137 | } |
138 | 138 | ||
139 | hose->arch_data = of_node_get(pcictrl); | ||
140 | hose->first_busno = bus_range[0]; | 139 | hose->first_busno = bus_range[0]; |
141 | hose->last_busno = bus_range[1]; | 140 | hose->last_busno = bus_range[1]; |
142 | hose->ops = &rtas_pci_ops; | 141 | hose->ops = &rtas_pci_ops; |
@@ -145,7 +144,7 @@ void __init efika_pcisetup(void) | |||
145 | } | 144 | } |
146 | 145 | ||
147 | #else | 146 | #else |
148 | void __init efika_pcisetup(void) | 147 | static void __init efika_pcisetup(void) |
149 | {} | 148 | {} |
150 | #endif | 149 | #endif |
151 | 150 | ||
@@ -252,6 +251,8 @@ define_machine(efika) | |||
252 | .progress = rtas_progress, | 251 | .progress = rtas_progress, |
253 | .get_boot_time = rtas_get_boot_time, | 252 | .get_boot_time = rtas_get_boot_time, |
254 | .calibrate_decr = generic_calibrate_decr, | 253 | .calibrate_decr = generic_calibrate_decr, |
254 | #ifdef CONFIG_PCI | ||
255 | .phys_mem_access_prot = pci_phys_mem_access_prot, | 255 | .phys_mem_access_prot = pci_phys_mem_access_prot, |
256 | #endif | ||
256 | }; | 257 | }; |
257 | 258 | ||