aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc')
-rw-r--r--arch/ppc/Kconfig4
-rw-r--r--arch/ppc/kernel/Makefile3
-rw-r--r--arch/ppc/kernel/perfmon.c6
-rw-r--r--arch/ppc/kernel/temp.c1
-rw-r--r--arch/ppc/kernel/time.c1
-rw-r--r--arch/ppc/kernel/vmlinux.lds.S4
-rw-r--r--arch/ppc/lib/Makefile2
-rw-r--r--arch/ppc/lib/dec_and_lock.c38
-rw-r--r--arch/ppc/platforms/chrp_time.c1
-rw-r--r--arch/ppc/platforms/pmac_setup.c10
-rw-r--r--arch/ppc/syslib/Makefile3
-rw-r--r--arch/ppc/syslib/mpc8xx_devices.c224
-rw-r--r--arch/ppc/syslib/mpc8xx_sys.c61
-rw-r--r--arch/ppc/syslib/of_device.c6
-rw-r--r--arch/ppc/syslib/open_pic2.c2
-rw-r--r--arch/ppc/syslib/ppc85xx_setup.c8
-rw-r--r--arch/ppc/syslib/prep_nvram.c1
17 files changed, 313 insertions, 62 deletions
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
index 347ea284140b..776941c75672 100644
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -26,10 +26,6 @@ config GENERIC_CALIBRATE_DELAY
26 bool 26 bool
27 default y 27 default y
28 28
29config HAVE_DEC_LOCK
30 bool
31 default y
32
33config PPC 29config PPC
34 bool 30 bool
35 default y 31 default y
diff --git a/arch/ppc/kernel/Makefile b/arch/ppc/kernel/Makefile
index 1fb92f16acd6..b1457a8a9c0f 100644
--- a/arch/ppc/kernel/Makefile
+++ b/arch/ppc/kernel/Makefile
@@ -15,9 +15,8 @@ extra-y += vmlinux.lds
15obj-y := entry.o traps.o irq.o idle.o time.o misc.o \ 15obj-y := entry.o traps.o irq.o idle.o time.o misc.o \
16 process.o signal.o ptrace.o align.o \ 16 process.o signal.o ptrace.o align.o \
17 semaphore.o syscalls.o setup.o \ 17 semaphore.o syscalls.o setup.o \
18 cputable.o ppc_htab.o 18 cputable.o ppc_htab.o perfmon.o
19obj-$(CONFIG_6xx) += l2cr.o cpu_setup_6xx.o 19obj-$(CONFIG_6xx) += l2cr.o cpu_setup_6xx.o
20obj-$(CONFIG_E500) += perfmon.o
21obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o 20obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o
22obj-$(CONFIG_POWER4) += cpu_setup_power4.o 21obj-$(CONFIG_POWER4) += cpu_setup_power4.o
23obj-$(CONFIG_MODULES) += module.o ppc_ksyms.o 22obj-$(CONFIG_MODULES) += module.o ppc_ksyms.o
diff --git a/arch/ppc/kernel/perfmon.c b/arch/ppc/kernel/perfmon.c
index fa1dad96b830..04c18788e85f 100644
--- a/arch/ppc/kernel/perfmon.c
+++ b/arch/ppc/kernel/perfmon.c
@@ -45,7 +45,7 @@ static void dummy_perf(struct pt_regs *regs)
45 mtpmr(PMRN_PMGC0, pmgc0); 45 mtpmr(PMRN_PMGC0, pmgc0);
46} 46}
47 47
48#else 48#elif CONFIG_6xx
49/* Ensure exceptions are disabled */ 49/* Ensure exceptions are disabled */
50 50
51static void dummy_perf(struct pt_regs *regs) 51static void dummy_perf(struct pt_regs *regs)
@@ -55,6 +55,10 @@ static void dummy_perf(struct pt_regs *regs)
55 mmcr0 &= ~MMCR0_PMXE; 55 mmcr0 &= ~MMCR0_PMXE;
56 mtspr(SPRN_MMCR0, mmcr0); 56 mtspr(SPRN_MMCR0, mmcr0);
57} 57}
58#else
59static void dummy_perf(struct pt_regs *regs)
60{
61}
58#endif 62#endif
59 63
60void (*perf_irq)(struct pt_regs *) = dummy_perf; 64void (*perf_irq)(struct pt_regs *) = dummy_perf;
diff --git a/arch/ppc/kernel/temp.c b/arch/ppc/kernel/temp.c
index fe8bb634ead0..26bd8ea35a4e 100644
--- a/arch/ppc/kernel/temp.c
+++ b/arch/ppc/kernel/temp.c
@@ -21,7 +21,6 @@
21#include <linux/interrupt.h> 21#include <linux/interrupt.h>
22#include <linux/init.h> 22#include <linux/init.h>
23 23
24#include <asm/segment.h>
25#include <asm/io.h> 24#include <asm/io.h>
26#include <asm/reg.h> 25#include <asm/reg.h>
27#include <asm/nvram.h> 26#include <asm/nvram.h>
diff --git a/arch/ppc/kernel/time.c b/arch/ppc/kernel/time.c
index a3c5281a5d2d..22d7fd1e0aea 100644
--- a/arch/ppc/kernel/time.c
+++ b/arch/ppc/kernel/time.c
@@ -58,7 +58,6 @@
58#include <linux/init.h> 58#include <linux/init.h>
59#include <linux/profile.h> 59#include <linux/profile.h>
60 60
61#include <asm/segment.h>
62#include <asm/io.h> 61#include <asm/io.h>
63#include <asm/nvram.h> 62#include <asm/nvram.h>
64#include <asm/cache.h> 63#include <asm/cache.h>
diff --git a/arch/ppc/kernel/vmlinux.lds.S b/arch/ppc/kernel/vmlinux.lds.S
index 9353584fb710..17d2db7e537d 100644
--- a/arch/ppc/kernel/vmlinux.lds.S
+++ b/arch/ppc/kernel/vmlinux.lds.S
@@ -96,6 +96,9 @@ SECTIONS
96 *(.init.text) 96 *(.init.text)
97 _einittext = .; 97 _einittext = .;
98 } 98 }
99 /* .exit.text is discarded at runtime, not link time,
100 to deal with references from __bug_table */
101 .exit.text : { *(.exit.text) }
99 .init.data : { 102 .init.data : {
100 *(.init.data); 103 *(.init.data);
101 __vtop_table_begin = .; 104 __vtop_table_begin = .;
@@ -190,5 +193,6 @@ SECTIONS
190 /* Sections to be discarded. */ 193 /* Sections to be discarded. */
191 /DISCARD/ : { 194 /DISCARD/ : {
192 *(.exitcall.exit) 195 *(.exitcall.exit)
196 *(.exit.data)
193 } 197 }
194} 198}
diff --git a/arch/ppc/lib/Makefile b/arch/ppc/lib/Makefile
index f1e1fb4144f0..50358e4ea159 100644
--- a/arch/ppc/lib/Makefile
+++ b/arch/ppc/lib/Makefile
@@ -2,7 +2,7 @@
2# Makefile for ppc-specific library files.. 2# Makefile for ppc-specific library files..
3# 3#
4 4
5obj-y := checksum.o string.o strcase.o dec_and_lock.o div64.o 5obj-y := checksum.o string.o strcase.o div64.o
6 6
7obj-$(CONFIG_8xx) += rheap.o 7obj-$(CONFIG_8xx) += rheap.o
8obj-$(CONFIG_CPM2) += rheap.o 8obj-$(CONFIG_CPM2) += rheap.o
diff --git a/arch/ppc/lib/dec_and_lock.c b/arch/ppc/lib/dec_and_lock.c
deleted file mode 100644
index b18f0d9a00fc..000000000000
--- a/arch/ppc/lib/dec_and_lock.c
+++ /dev/null
@@ -1,38 +0,0 @@
1#include <linux/module.h>
2#include <linux/spinlock.h>
3#include <asm/atomic.h>
4#include <asm/system.h>
5
6/*
7 * This is an implementation of the notion of "decrement a
8 * reference count, and return locked if it decremented to zero".
9 *
10 * This implementation can be used on any architecture that
11 * has a cmpxchg, and where atomic->value is an int holding
12 * the value of the atomic (i.e. the high bits aren't used
13 * for a lock or anything like that).
14 */
15int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock)
16{
17 int counter;
18 int newcount;
19
20 for (;;) {
21 counter = atomic_read(atomic);
22 newcount = counter - 1;
23 if (!newcount)
24 break; /* do it the slow way */
25
26 newcount = cmpxchg(&atomic->counter, counter, newcount);
27 if (newcount == counter)
28 return 0;
29 }
30
31 spin_lock(lock);
32 if (atomic_dec_and_test(atomic))
33 return 1;
34 spin_unlock(lock);
35 return 0;
36}
37
38EXPORT_SYMBOL(_atomic_dec_and_lock);
diff --git a/arch/ppc/platforms/chrp_time.c b/arch/ppc/platforms/chrp_time.c
index 4864a7de3daa..6037ce7796f5 100644
--- a/arch/ppc/platforms/chrp_time.c
+++ b/arch/ppc/platforms/chrp_time.c
@@ -22,7 +22,6 @@
22#include <linux/init.h> 22#include <linux/init.h>
23#include <linux/bcd.h> 23#include <linux/bcd.h>
24 24
25#include <asm/segment.h>
26#include <asm/io.h> 25#include <asm/io.h>
27#include <asm/nvram.h> 26#include <asm/nvram.h>
28#include <asm/prom.h> 27#include <asm/prom.h>
diff --git a/arch/ppc/platforms/pmac_setup.c b/arch/ppc/platforms/pmac_setup.c
index b392b9a15987..4c56a4734aec 100644
--- a/arch/ppc/platforms/pmac_setup.c
+++ b/arch/ppc/platforms/pmac_setup.c
@@ -719,7 +719,8 @@ pmac_declare_of_platform_devices(void)
719 if (np) { 719 if (np) {
720 for (np = np->child; np != NULL; np = np->sibling) 720 for (np = np->child; np != NULL; np = np->sibling)
721 if (strncmp(np->name, "i2c", 3) == 0) { 721 if (strncmp(np->name, "i2c", 3) == 0) {
722 of_platform_device_create(np, "uni-n-i2c"); 722 of_platform_device_create(np, "uni-n-i2c",
723 NULL);
723 break; 724 break;
724 } 725 }
725 } 726 }
@@ -727,17 +728,18 @@ pmac_declare_of_platform_devices(void)
727 if (np) { 728 if (np) {
728 for (np = np->child; np != NULL; np = np->sibling) 729 for (np = np->child; np != NULL; np = np->sibling)
729 if (strncmp(np->name, "i2c", 3) == 0) { 730 if (strncmp(np->name, "i2c", 3) == 0) {
730 of_platform_device_create(np, "u3-i2c"); 731 of_platform_device_create(np, "u3-i2c",
732 NULL);
731 break; 733 break;
732 } 734 }
733 } 735 }
734 736
735 np = find_devices("valkyrie"); 737 np = find_devices("valkyrie");
736 if (np) 738 if (np)
737 of_platform_device_create(np, "valkyrie"); 739 of_platform_device_create(np, "valkyrie", NULL);
738 np = find_devices("platinum"); 740 np = find_devices("platinum");
739 if (np) 741 if (np)
740 of_platform_device_create(np, "platinum"); 742 of_platform_device_create(np, "platinum", NULL);
741 743
742 return 0; 744 return 0;
743} 745}
diff --git a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile
index 8b9b226005d1..b8d08f33f7ee 100644
--- a/arch/ppc/syslib/Makefile
+++ b/arch/ppc/syslib/Makefile
@@ -34,7 +34,8 @@ ifeq ($(CONFIG_40x),y)
34obj-$(CONFIG_PCI) += indirect_pci.o pci_auto.o ppc405_pci.o 34obj-$(CONFIG_PCI) += indirect_pci.o pci_auto.o ppc405_pci.o
35endif 35endif
36endif 36endif
37obj-$(CONFIG_8xx) += m8xx_setup.o ppc8xx_pic.o $(wdt-mpc8xx-y) 37obj-$(CONFIG_8xx) += m8xx_setup.o ppc8xx_pic.o $(wdt-mpc8xx-y) \
38 ppc_sys.o mpc8xx_devices.o mpc8xx_sys.o
38ifeq ($(CONFIG_8xx),y) 39ifeq ($(CONFIG_8xx),y)
39obj-$(CONFIG_PCI) += qspan_pci.o i8259.o 40obj-$(CONFIG_PCI) += qspan_pci.o i8259.o
40endif 41endif
diff --git a/arch/ppc/syslib/mpc8xx_devices.c b/arch/ppc/syslib/mpc8xx_devices.c
new file mode 100644
index 000000000000..2b5f0e701687
--- /dev/null
+++ b/arch/ppc/syslib/mpc8xx_devices.c
@@ -0,0 +1,224 @@
1/*
2 * arch/ppc/syslib/mpc8xx_devices.c
3 *
4 * MPC8xx Device descriptions
5 *
6 * Maintainer: Kumar Gala <kumar.gala@freescale.com>
7 *
8 * Copyright 2005 MontaVista Software, Inc. by Vitaly Bordug<vbordug@ru.mvista.com>
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 */
15
16#include <linux/init.h>
17#include <linux/module.h>
18#include <linux/device.h>
19#include <linux/serial_8250.h>
20#include <linux/mii.h>
21#include <asm/commproc.h>
22#include <asm/mpc8xx.h>
23#include <asm/irq.h>
24#include <asm/ppc_sys.h>
25
26/* We use offsets for IORESOURCE_MEM to do not set dependences at compile time.
27 * They will get fixed up by mach_mpc8xx_fixup
28 */
29
30struct platform_device ppc_sys_platform_devices[] = {
31 [MPC8xx_CPM_FEC1] = {
32 .name = "fsl-cpm-fec",
33 .id = 1,
34 .num_resources = 2,
35 .resource = (struct resource[]) {
36 {
37 .name = "regs",
38 .start = 0xe00,
39 .end = 0xe88,
40 .flags = IORESOURCE_MEM,
41 },
42 {
43 .name = "interrupt",
44 .start = MPC8xx_INT_FEC1,
45 .end = MPC8xx_INT_FEC1,
46 .flags = IORESOURCE_IRQ,
47 },
48 },
49 },
50 [MPC8xx_CPM_FEC2] = {
51 .name = "fsl-cpm-fec",
52 .id = 2,
53 .num_resources = 2,
54 .resource = (struct resource[]) {
55 {
56 .name = "regs",
57 .start = 0x1e00,
58 .end = 0x1e88,
59 .flags = IORESOURCE_MEM,
60 },
61 {
62 .name = "interrupt",
63 .start = MPC8xx_INT_FEC2,
64 .end = MPC8xx_INT_FEC2,
65 .flags = IORESOURCE_IRQ,
66 },
67 },
68 },
69 [MPC8xx_CPM_SCC1] = {
70 .name = "fsl-cpm-scc",
71 .id = 1,
72 .num_resources = 3,
73 .resource = (struct resource[]) {
74 {
75 .name = "regs",
76 .start = 0xa00,
77 .end = 0xa18,
78 .flags = IORESOURCE_MEM,
79 },
80 {
81 .name = "pram",
82 .start = 0x3c00,
83 .end = 0x3c80,
84 .flags = IORESOURCE_MEM,
85 },
86 {
87 .name = "interrupt",
88 .start = MPC8xx_INT_SCC1,
89 .end = MPC8xx_INT_SCC1,
90 .flags = IORESOURCE_IRQ,
91 },
92 },
93 },
94 [MPC8xx_CPM_SCC2] = {
95 .name = "fsl-cpm-scc",
96 .id = 2,
97 .num_resources = 3,
98 .resource = (struct resource[]) {
99 {
100 .name = "regs",
101 .start = 0xa20,
102 .end = 0xa38,
103 .flags = IORESOURCE_MEM,
104 },
105 {
106 .name = "pram",
107 .start = 0x3d00,
108 .end = 0x3d80,
109 .flags = IORESOURCE_MEM,
110 },
111
112 {
113 .name = "interrupt",
114 .start = MPC8xx_INT_SCC2,
115 .end = MPC8xx_INT_SCC2,
116 .flags = IORESOURCE_IRQ,
117 },
118 },
119 },
120 [MPC8xx_CPM_SCC3] = {
121 .name = "fsl-cpm-scc",
122 .id = 3,
123 .num_resources = 3,
124 .resource = (struct resource[]) {
125 {
126 .name = "regs",
127 .start = 0xa40,
128 .end = 0xa58,
129 .flags = IORESOURCE_MEM,
130 },
131 {
132 .name = "pram",
133 .start = 0x3e00,
134 .end = 0x3e80,
135 .flags = IORESOURCE_MEM,
136 },
137
138 {
139 .name = "interrupt",
140 .start = MPC8xx_INT_SCC3,
141 .end = MPC8xx_INT_SCC3,
142 .flags = IORESOURCE_IRQ,
143 },
144 },
145 },
146 [MPC8xx_CPM_SCC4] = {
147 .name = "fsl-cpm-scc",
148 .id = 4,
149 .num_resources = 3,
150 .resource = (struct resource[]) {
151 {
152 .name = "regs",
153 .start = 0xa60,
154 .end = 0xa78,
155 .flags = IORESOURCE_MEM,
156 },
157 {
158 .name = "pram",
159 .start = 0x3f00,
160 .end = 0x3f80,
161 .flags = IORESOURCE_MEM,
162 },
163
164 {
165 .name = "interrupt",
166 .start = MPC8xx_INT_SCC4,
167 .end = MPC8xx_INT_SCC4,
168 .flags = IORESOURCE_IRQ,
169 },
170 },
171 },
172 [MPC8xx_CPM_SMC1] = {
173 .name = "fsl-cpm-smc",
174 .id = 1,
175 .num_resources = 2,
176 .resource = (struct resource[]) {
177 {
178 .name = "regs",
179 .start = 0xa82,
180 .end = 0xa91,
181 .flags = IORESOURCE_MEM,
182 },
183 {
184 .name = "interrupt",
185 .start = MPC8xx_INT_SMC1,
186 .end = MPC8xx_INT_SMC1,
187 .flags = IORESOURCE_IRQ,
188 },
189 },
190 },
191 [MPC8xx_CPM_SMC2] = {
192 .name = "fsl-cpm-smc",
193 .id = 2,
194 .num_resources = 2,
195 .resource = (struct resource[]) {
196 {
197 .name = "regs",
198 .start = 0xa92,
199 .end = 0xaa1,
200 .flags = IORESOURCE_MEM,
201 },
202 {
203 .name = "interrupt",
204 .start = MPC8xx_INT_SMC2,
205 .end = MPC8xx_INT_SMC2,
206 .flags = IORESOURCE_IRQ,
207 },
208 },
209 },
210};
211
212static int __init mach_mpc8xx_fixup(struct platform_device *pdev)
213{
214 ppc_sys_fixup_mem_resource (pdev, IMAP_ADDR);
215 return 0;
216}
217
218static int __init mach_mpc8xx_init(void)
219{
220 ppc_sys_device_fixup = mach_mpc8xx_fixup;
221 return 0;
222}
223
224postcore_initcall(mach_mpc8xx_init);
diff --git a/arch/ppc/syslib/mpc8xx_sys.c b/arch/ppc/syslib/mpc8xx_sys.c
new file mode 100644
index 000000000000..a532ccc861c0
--- /dev/null
+++ b/arch/ppc/syslib/mpc8xx_sys.c
@@ -0,0 +1,61 @@
1/*
2 * arch/ppc/platforms/mpc8xx_sys.c
3 *
4 * MPC8xx System descriptions
5 *
6 * Maintainer: Kumar Gala <kumar.gala@freescale.com>
7 *
8 * Copyright 2005 MontaVista Software, Inc. by Vitaly Bordug <vbordug@ru.mvista.com>
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 */
15
16#include <linux/init.h>
17#include <linux/module.h>
18#include <linux/device.h>
19#include <asm/ppc_sys.h>
20
21struct ppc_sys_spec *cur_ppc_sys_spec;
22struct ppc_sys_spec ppc_sys_specs[] = {
23 {
24 .ppc_sys_name = "MPC86X",
25 .mask = 0xFFFFFFFF,
26 .value = 0x00000000,
27 .num_devices = 2,
28 .device_list = (enum ppc_sys_devices[])
29 {
30 MPC8xx_CPM_FEC1,
31 MPC8xx_CPM_SCC1,
32 MPC8xx_CPM_SCC2,
33 MPC8xx_CPM_SCC3,
34 MPC8xx_CPM_SCC4,
35 MPC8xx_CPM_SMC1,
36 MPC8xx_CPM_SMC2,
37 },
38 },
39 {
40 .ppc_sys_name = "MPC885",
41 .mask = 0xFFFFFFFF,
42 .value = 0x00000000,
43 .num_devices = 3,
44 .device_list = (enum ppc_sys_devices[])
45 {
46 MPC8xx_CPM_FEC1,
47 MPC8xx_CPM_FEC2,
48 MPC8xx_CPM_SCC1,
49 MPC8xx_CPM_SCC2,
50 MPC8xx_CPM_SCC3,
51 MPC8xx_CPM_SCC4,
52 MPC8xx_CPM_SMC1,
53 MPC8xx_CPM_SMC2,
54 },
55 },
56 { /* default match */
57 .ppc_sys_name = "",
58 .mask = 0x00000000,
59 .value = 0x00000000,
60 },
61};
diff --git a/arch/ppc/syslib/of_device.c b/arch/ppc/syslib/of_device.c
index da8a0f2128dc..93c7231ea709 100644
--- a/arch/ppc/syslib/of_device.c
+++ b/arch/ppc/syslib/of_device.c
@@ -234,7 +234,9 @@ void of_device_unregister(struct of_device *ofdev)
234 device_unregister(&ofdev->dev); 234 device_unregister(&ofdev->dev);
235} 235}
236 236
237struct of_device* of_platform_device_create(struct device_node *np, const char *bus_id) 237struct of_device* of_platform_device_create(struct device_node *np,
238 const char *bus_id,
239 struct device *parent)
238{ 240{
239 struct of_device *dev; 241 struct of_device *dev;
240 u32 *reg; 242 u32 *reg;
@@ -247,7 +249,7 @@ struct of_device* of_platform_device_create(struct device_node *np, const char *
247 dev->node = of_node_get(np); 249 dev->node = of_node_get(np);
248 dev->dma_mask = 0xffffffffUL; 250 dev->dma_mask = 0xffffffffUL;
249 dev->dev.dma_mask = &dev->dma_mask; 251 dev->dev.dma_mask = &dev->dma_mask;
250 dev->dev.parent = NULL; 252 dev->dev.parent = parent;
251 dev->dev.bus = &of_platform_bus_type; 253 dev->dev.bus = &of_platform_bus_type;
252 dev->dev.release = of_release_dev; 254 dev->dev.release = of_release_dev;
253 255
diff --git a/arch/ppc/syslib/open_pic2.c b/arch/ppc/syslib/open_pic2.c
index 2e0ea92144f6..9a7e8748e2b2 100644
--- a/arch/ppc/syslib/open_pic2.c
+++ b/arch/ppc/syslib/open_pic2.c
@@ -575,7 +575,7 @@ static void openpic2_cached_disable_irq(u_int irq)
575 * we need something better to deal with that... Maybe switch to S1 for 575 * we need something better to deal with that... Maybe switch to S1 for
576 * cpufreq changes 576 * cpufreq changes
577 */ 577 */
578int openpic2_suspend(struct sys_device *sysdev, u32 state) 578int openpic2_suspend(struct sys_device *sysdev, pm_message_t state)
579{ 579{
580 int i; 580 int i;
581 unsigned long flags; 581 unsigned long flags;
diff --git a/arch/ppc/syslib/ppc85xx_setup.c b/arch/ppc/syslib/ppc85xx_setup.c
index b7242f1bd931..832b8bf99ae7 100644
--- a/arch/ppc/syslib/ppc85xx_setup.c
+++ b/arch/ppc/syslib/ppc85xx_setup.c
@@ -184,8 +184,8 @@ mpc85xx_setup_pci1(struct pci_controller *hose)
184 pci->powar1 = 0x80044000 | 184 pci->powar1 = 0x80044000 |
185 (__ilog2(MPC85XX_PCI1_UPPER_MEM - MPC85XX_PCI1_LOWER_MEM + 1) - 1); 185 (__ilog2(MPC85XX_PCI1_UPPER_MEM - MPC85XX_PCI1_LOWER_MEM + 1) - 1);
186 186
187 /* Setup outboud IO windows @ MPC85XX_PCI1_IO_BASE */ 187 /* Setup outbound IO windows @ MPC85XX_PCI1_IO_BASE */
188 pci->potar2 = 0x00000000; 188 pci->potar2 = (MPC85XX_PCI1_LOWER_IO >> 12) & 0x000fffff;
189 pci->potear2 = 0x00000000; 189 pci->potear2 = 0x00000000;
190 pci->powbar2 = (MPC85XX_PCI1_IO_BASE >> 12) & 0x000fffff; 190 pci->powbar2 = (MPC85XX_PCI1_IO_BASE >> 12) & 0x000fffff;
191 /* Enable, IO R/W */ 191 /* Enable, IO R/W */
@@ -235,8 +235,8 @@ mpc85xx_setup_pci2(struct pci_controller *hose)
235 pci->powar1 = 0x80044000 | 235 pci->powar1 = 0x80044000 |
236 (__ilog2(MPC85XX_PCI2_UPPER_MEM - MPC85XX_PCI2_LOWER_MEM + 1) - 1); 236 (__ilog2(MPC85XX_PCI2_UPPER_MEM - MPC85XX_PCI2_LOWER_MEM + 1) - 1);
237 237
238 /* Setup outboud IO windows @ MPC85XX_PCI2_IO_BASE */ 238 /* Setup outbound IO windows @ MPC85XX_PCI2_IO_BASE */
239 pci->potar2 = 0x00000000; 239 pci->potar2 = (MPC85XX_PCI2_LOWER_IO >> 12) & 0x000fffff;;
240 pci->potear2 = 0x00000000; 240 pci->potear2 = 0x00000000;
241 pci->powbar2 = (MPC85XX_PCI2_IO_BASE >> 12) & 0x000fffff; 241 pci->powbar2 = (MPC85XX_PCI2_IO_BASE >> 12) & 0x000fffff;
242 /* Enable, IO R/W */ 242 /* Enable, IO R/W */
diff --git a/arch/ppc/syslib/prep_nvram.c b/arch/ppc/syslib/prep_nvram.c
index 2bcf8a16d1c9..8599850ca772 100644
--- a/arch/ppc/syslib/prep_nvram.c
+++ b/arch/ppc/syslib/prep_nvram.c
@@ -15,7 +15,6 @@
15#include <linux/ioport.h> 15#include <linux/ioport.h>
16 16
17#include <asm/sections.h> 17#include <asm/sections.h>
18#include <asm/segment.h>
19#include <asm/io.h> 18#include <asm/io.h>
20#include <asm/machdep.h> 19#include <asm/machdep.h>
21#include <asm/prep_nvram.h> 20#include <asm/prep_nvram.h>