aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc')
-rw-r--r--arch/ppc/kernel/Makefile4
-rw-r--r--arch/ppc/kernel/align.c410
-rw-r--r--arch/ppc/kernel/pci.c1
-rw-r--r--arch/ppc/kernel/setup.c14
-rw-r--r--arch/ppc/mm/init.c23
-rw-r--r--arch/ppc/platforms/85xx/mpc85xx_ads_common.h2
-rw-r--r--arch/ppc/platforms/85xx/stx_gp3.h2
-rw-r--r--arch/ppc/syslib/mpc83xx_sys.c28
-rw-r--r--arch/ppc/xmon/start.c5
9 files changed, 58 insertions, 431 deletions
diff --git a/arch/ppc/kernel/Makefile b/arch/ppc/kernel/Makefile
index 17a4da65e275..0bb23fce4293 100644
--- a/arch/ppc/kernel/Makefile
+++ b/arch/ppc/kernel/Makefile
@@ -13,7 +13,7 @@ extra-$(CONFIG_POWER4) += idle_power4.o
13extra-y += vmlinux.lds 13extra-y += vmlinux.lds
14 14
15obj-y := entry.o traps.o idle.o time.o misc.o \ 15obj-y := entry.o traps.o idle.o time.o misc.o \
16 process.o align.o \ 16 process.o \
17 setup.o \ 17 setup.o \
18 ppc_htab.o 18 ppc_htab.o
19obj-$(CONFIG_6xx) += l2cr.o cpu_setup_6xx.o 19obj-$(CONFIG_6xx) += l2cr.o cpu_setup_6xx.o
@@ -38,7 +38,7 @@ endif
38# These are here while we do the architecture merge 38# These are here while we do the architecture merge
39 39
40else 40else
41obj-y := idle.o align.o 41obj-y := idle.o
42obj-$(CONFIG_6xx) += l2cr.o cpu_setup_6xx.o 42obj-$(CONFIG_6xx) += l2cr.o cpu_setup_6xx.o
43obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o 43obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o
44obj-$(CONFIG_MODULES) += module.o 44obj-$(CONFIG_MODULES) += module.o
diff --git a/arch/ppc/kernel/align.c b/arch/ppc/kernel/align.c
deleted file mode 100644
index ab398c4b70b6..000000000000
--- a/arch/ppc/kernel/align.c
+++ /dev/null
@@ -1,410 +0,0 @@
1/*
2 * align.c - handle alignment exceptions for the Power PC.
3 *
4 * Copyright (c) 1996 Paul Mackerras <paulus@cs.anu.edu.au>
5 * Copyright (c) 1998-1999 TiVo, Inc.
6 * PowerPC 403GCX modifications.
7 * Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
8 * PowerPC 403GCX/405GP modifications.
9 */
10#include <linux/config.h>
11#include <linux/kernel.h>
12#include <linux/mm.h>
13#include <asm/ptrace.h>
14#include <asm/processor.h>
15#include <asm/uaccess.h>
16#include <asm/system.h>
17#include <asm/cache.h>
18
19struct aligninfo {
20 unsigned char len;
21 unsigned char flags;
22};
23
24#if defined(CONFIG_4xx) || defined(CONFIG_POWER4) || defined(CONFIG_BOOKE)
25#define OPCD(inst) (((inst) & 0xFC000000) >> 26)
26#define RS(inst) (((inst) & 0x03E00000) >> 21)
27#define RA(inst) (((inst) & 0x001F0000) >> 16)
28#define IS_XFORM(code) ((code) == 31)
29#endif
30
31#define INVALID { 0, 0 }
32
33#define LD 1 /* load */
34#define ST 2 /* store */
35#define SE 4 /* sign-extend value */
36#define F 8 /* to/from fp regs */
37#define U 0x10 /* update index register */
38#define M 0x20 /* multiple load/store */
39#define S 0x40 /* single-precision fp, or byte-swap value */
40#define SX 0x40 /* byte count in XER */
41#define HARD 0x80 /* string, stwcx. */
42
43#define DCBZ 0x5f /* 8xx/82xx dcbz faults when cache not enabled */
44
45/*
46 * The PowerPC stores certain bits of the instruction that caused the
47 * alignment exception in the DSISR register. This array maps those
48 * bits to information about the operand length and what the
49 * instruction would do.
50 */
51static struct aligninfo aligninfo[128] = {
52 { 4, LD }, /* 00 0 0000: lwz / lwarx */
53 INVALID, /* 00 0 0001 */
54 { 4, ST }, /* 00 0 0010: stw */
55 INVALID, /* 00 0 0011 */
56 { 2, LD }, /* 00 0 0100: lhz */
57 { 2, LD+SE }, /* 00 0 0101: lha */
58 { 2, ST }, /* 00 0 0110: sth */
59 { 4, LD+M }, /* 00 0 0111: lmw */
60 { 4, LD+F+S }, /* 00 0 1000: lfs */
61 { 8, LD+F }, /* 00 0 1001: lfd */
62 { 4, ST+F+S }, /* 00 0 1010: stfs */
63 { 8, ST+F }, /* 00 0 1011: stfd */
64 INVALID, /* 00 0 1100 */
65 INVALID, /* 00 0 1101: ld/ldu/lwa */
66 INVALID, /* 00 0 1110 */
67 INVALID, /* 00 0 1111: std/stdu */
68 { 4, LD+U }, /* 00 1 0000: lwzu */
69 INVALID, /* 00 1 0001 */
70 { 4, ST+U }, /* 00 1 0010: stwu */
71 INVALID, /* 00 1 0011 */
72 { 2, LD+U }, /* 00 1 0100: lhzu */
73 { 2, LD+SE+U }, /* 00 1 0101: lhau */
74 { 2, ST+U }, /* 00 1 0110: sthu */
75 { 4, ST+M }, /* 00 1 0111: stmw */
76 { 4, LD+F+S+U }, /* 00 1 1000: lfsu */
77 { 8, LD+F+U }, /* 00 1 1001: lfdu */
78 { 4, ST+F+S+U }, /* 00 1 1010: stfsu */
79 { 8, ST+F+U }, /* 00 1 1011: stfdu */
80 INVALID, /* 00 1 1100 */
81 INVALID, /* 00 1 1101 */
82 INVALID, /* 00 1 1110 */
83 INVALID, /* 00 1 1111 */
84 INVALID, /* 01 0 0000: ldx */
85 INVALID, /* 01 0 0001 */
86 INVALID, /* 01 0 0010: stdx */
87 INVALID, /* 01 0 0011 */
88 INVALID, /* 01 0 0100 */
89 INVALID, /* 01 0 0101: lwax */
90 INVALID, /* 01 0 0110 */
91 INVALID, /* 01 0 0111 */
92 { 4, LD+M+HARD+SX }, /* 01 0 1000: lswx */
93 { 4, LD+M+HARD }, /* 01 0 1001: lswi */
94 { 4, ST+M+HARD+SX }, /* 01 0 1010: stswx */
95 { 4, ST+M+HARD }, /* 01 0 1011: stswi */
96 INVALID, /* 01 0 1100 */
97 INVALID, /* 01 0 1101 */
98 INVALID, /* 01 0 1110 */
99 INVALID, /* 01 0 1111 */
100 INVALID, /* 01 1 0000: ldux */
101 INVALID, /* 01 1 0001 */
102 INVALID, /* 01 1 0010: stdux */
103 INVALID, /* 01 1 0011 */
104 INVALID, /* 01 1 0100 */
105 INVALID, /* 01 1 0101: lwaux */
106 INVALID, /* 01 1 0110 */
107 INVALID, /* 01 1 0111 */
108 INVALID, /* 01 1 1000 */
109 INVALID, /* 01 1 1001 */
110 INVALID, /* 01 1 1010 */
111 INVALID, /* 01 1 1011 */
112 INVALID, /* 01 1 1100 */
113 INVALID, /* 01 1 1101 */
114 INVALID, /* 01 1 1110 */
115 INVALID, /* 01 1 1111 */
116 INVALID, /* 10 0 0000 */
117 INVALID, /* 10 0 0001 */
118 { 0, ST+HARD }, /* 10 0 0010: stwcx. */
119 INVALID, /* 10 0 0011 */
120 INVALID, /* 10 0 0100 */
121 INVALID, /* 10 0 0101 */
122 INVALID, /* 10 0 0110 */
123 INVALID, /* 10 0 0111 */
124 { 4, LD+S }, /* 10 0 1000: lwbrx */
125 INVALID, /* 10 0 1001 */
126 { 4, ST+S }, /* 10 0 1010: stwbrx */
127 INVALID, /* 10 0 1011 */
128 { 2, LD+S }, /* 10 0 1100: lhbrx */
129 INVALID, /* 10 0 1101 */
130 { 2, ST+S }, /* 10 0 1110: sthbrx */
131 INVALID, /* 10 0 1111 */
132 INVALID, /* 10 1 0000 */
133 INVALID, /* 10 1 0001 */
134 INVALID, /* 10 1 0010 */
135 INVALID, /* 10 1 0011 */
136 INVALID, /* 10 1 0100 */
137 INVALID, /* 10 1 0101 */
138 INVALID, /* 10 1 0110 */
139 INVALID, /* 10 1 0111 */
140 INVALID, /* 10 1 1000 */
141 INVALID, /* 10 1 1001 */
142 INVALID, /* 10 1 1010 */
143 INVALID, /* 10 1 1011 */
144 INVALID, /* 10 1 1100 */
145 INVALID, /* 10 1 1101 */
146 INVALID, /* 10 1 1110 */
147 { 0, ST+HARD }, /* 10 1 1111: dcbz */
148 { 4, LD }, /* 11 0 0000: lwzx */
149 INVALID, /* 11 0 0001 */
150 { 4, ST }, /* 11 0 0010: stwx */
151 INVALID, /* 11 0 0011 */
152 { 2, LD }, /* 11 0 0100: lhzx */
153 { 2, LD+SE }, /* 11 0 0101: lhax */
154 { 2, ST }, /* 11 0 0110: sthx */
155 INVALID, /* 11 0 0111 */
156 { 4, LD+F+S }, /* 11 0 1000: lfsx */
157 { 8, LD+F }, /* 11 0 1001: lfdx */
158 { 4, ST+F+S }, /* 11 0 1010: stfsx */
159 { 8, ST+F }, /* 11 0 1011: stfdx */
160 INVALID, /* 11 0 1100 */
161 INVALID, /* 11 0 1101: lmd */
162 INVALID, /* 11 0 1110 */
163 INVALID, /* 11 0 1111: stmd */
164 { 4, LD+U }, /* 11 1 0000: lwzux */
165 INVALID, /* 11 1 0001 */
166 { 4, ST+U }, /* 11 1 0010: stwux */
167 INVALID, /* 11 1 0011 */
168 { 2, LD+U }, /* 11 1 0100: lhzux */
169 { 2, LD+SE+U }, /* 11 1 0101: lhaux */
170 { 2, ST+U }, /* 11 1 0110: sthux */
171 INVALID, /* 11 1 0111 */
172 { 4, LD+F+S+U }, /* 11 1 1000: lfsux */
173 { 8, LD+F+U }, /* 11 1 1001: lfdux */
174 { 4, ST+F+S+U }, /* 11 1 1010: stfsux */
175 { 8, ST+F+U }, /* 11 1 1011: stfdux */
176 INVALID, /* 11 1 1100 */
177 INVALID, /* 11 1 1101 */
178 INVALID, /* 11 1 1110 */
179 INVALID, /* 11 1 1111 */
180};
181
182#define SWAP(a, b) (t = (a), (a) = (b), (b) = t)
183
184int
185fix_alignment(struct pt_regs *regs)
186{
187 int instr, nb, flags;
188#if defined(CONFIG_4xx) || defined(CONFIG_POWER4) || defined(CONFIG_BOOKE)
189 int opcode, f1, f2, f3;
190#endif
191 int i, t;
192 int reg, areg;
193 int offset, nb0;
194 unsigned char __user *addr;
195 unsigned char *rptr;
196 union {
197 long l;
198 float f;
199 double d;
200 unsigned char v[8];
201 } data;
202
203 CHECK_FULL_REGS(regs);
204
205#if defined(CONFIG_4xx) || defined(CONFIG_POWER4) || defined(CONFIG_BOOKE)
206 /* The 4xx-family & Book-E processors have no DSISR register,
207 * so we emulate it.
208 * The POWER4 has a DSISR register but doesn't set it on
209 * an alignment fault. -- paulus
210 */
211
212 if (__get_user(instr, (unsigned int __user *) regs->nip))
213 return 0;
214 opcode = OPCD(instr);
215 reg = RS(instr);
216 areg = RA(instr);
217
218 if (!IS_XFORM(opcode)) {
219 f1 = 0;
220 f2 = (instr & 0x04000000) >> 26;
221 f3 = (instr & 0x78000000) >> 27;
222 } else {
223 f1 = (instr & 0x00000006) >> 1;
224 f2 = (instr & 0x00000040) >> 6;
225 f3 = (instr & 0x00000780) >> 7;
226 }
227
228 instr = ((f1 << 5) | (f2 << 4) | f3);
229#else
230 reg = (regs->dsisr >> 5) & 0x1f; /* source/dest register */
231 areg = regs->dsisr & 0x1f; /* register to update */
232 instr = (regs->dsisr >> 10) & 0x7f;
233#endif
234
235 nb = aligninfo[instr].len;
236 if (nb == 0) {
237 long __user *p;
238 int i;
239
240 if (instr != DCBZ)
241 return 0; /* too hard or invalid instruction */
242 /*
243 * The dcbz (data cache block zero) instruction
244 * gives an alignment fault if used on non-cacheable
245 * memory. We handle the fault mainly for the
246 * case when we are running with the cache disabled
247 * for debugging.
248 */
249 p = (long __user *) (regs->dar & -L1_CACHE_BYTES);
250 if (user_mode(regs)
251 && !access_ok(VERIFY_WRITE, p, L1_CACHE_BYTES))
252 return -EFAULT;
253 for (i = 0; i < L1_CACHE_BYTES / sizeof(long); ++i)
254 if (__put_user(0, p+i))
255 return -EFAULT;
256 return 1;
257 }
258
259 flags = aligninfo[instr].flags;
260 if ((flags & (LD|ST)) == 0)
261 return 0;
262
263 /* For the 4xx-family & Book-E processors, the 'dar' field of the
264 * pt_regs structure is overloaded and is really from the DEAR.
265 */
266
267 addr = (unsigned char __user *)regs->dar;
268
269 if (flags & M) {
270 /* lmw, stmw, lswi/x, stswi/x */
271 nb0 = 0;
272 if (flags & HARD) {
273 if (flags & SX) {
274 nb = regs->xer & 127;
275 if (nb == 0)
276 return 1;
277 } else {
278 if (__get_user(instr,
279 (unsigned int __user *)regs->nip))
280 return 0;
281 nb = (instr >> 11) & 0x1f;
282 if (nb == 0)
283 nb = 32;
284 }
285 if (nb + reg * 4 > 128) {
286 nb0 = nb + reg * 4 - 128;
287 nb = 128 - reg * 4;
288 }
289 } else {
290 /* lwm, stmw */
291 nb = (32 - reg) * 4;
292 }
293
294 if (!access_ok((flags & ST? VERIFY_WRITE: VERIFY_READ), addr, nb+nb0))
295 return -EFAULT; /* bad address */
296
297 rptr = (unsigned char *) &regs->gpr[reg];
298 if (flags & LD) {
299 for (i = 0; i < nb; ++i)
300 if (__get_user(rptr[i], addr+i))
301 return -EFAULT;
302 if (nb0 > 0) {
303 rptr = (unsigned char *) &regs->gpr[0];
304 addr += nb;
305 for (i = 0; i < nb0; ++i)
306 if (__get_user(rptr[i], addr+i))
307 return -EFAULT;
308 }
309 for (; (i & 3) != 0; ++i)
310 rptr[i] = 0;
311 } else {
312 for (i = 0; i < nb; ++i)
313 if (__put_user(rptr[i], addr+i))
314 return -EFAULT;
315 if (nb0 > 0) {
316 rptr = (unsigned char *) &regs->gpr[0];
317 addr += nb;
318 for (i = 0; i < nb0; ++i)
319 if (__put_user(rptr[i], addr+i))
320 return -EFAULT;
321 }
322 }
323 return 1;
324 }
325
326 offset = 0;
327 if (nb < 4) {
328 /* read/write the least significant bits */
329 data.l = 0;
330 offset = 4 - nb;
331 }
332
333 /* Verify the address of the operand */
334 if (user_mode(regs)) {
335 if (!access_ok((flags & ST? VERIFY_WRITE: VERIFY_READ), addr, nb))
336 return -EFAULT; /* bad address */
337 }
338
339 if (flags & F) {
340 preempt_disable();
341 if (regs->msr & MSR_FP)
342 giveup_fpu(current);
343 preempt_enable();
344 }
345
346 /* If we read the operand, copy it in, else get register values */
347 if (flags & LD) {
348 for (i = 0; i < nb; ++i)
349 if (__get_user(data.v[offset+i], addr+i))
350 return -EFAULT;
351 } else if (flags & F) {
352 data.d = current->thread.fpr[reg];
353 } else {
354 data.l = regs->gpr[reg];
355 }
356
357 switch (flags & ~U) {
358 case LD+SE: /* sign extend */
359 if (data.v[2] >= 0x80)
360 data.v[0] = data.v[1] = -1;
361 break;
362
363 case LD+S: /* byte-swap */
364 case ST+S:
365 if (nb == 2) {
366 SWAP(data.v[2], data.v[3]);
367 } else {
368 SWAP(data.v[0], data.v[3]);
369 SWAP(data.v[1], data.v[2]);
370 }
371 break;
372
373 /* Single-precision FP load and store require conversions... */
374 case LD+F+S:
375#ifdef CONFIG_PPC_FPU
376 preempt_disable();
377 enable_kernel_fp();
378 cvt_fd(&data.f, &data.d, &current->thread);
379 preempt_enable();
380#else
381 return 0;
382#endif
383 break;
384 case ST+F+S:
385#ifdef CONFIG_PPC_FPU
386 preempt_disable();
387 enable_kernel_fp();
388 cvt_df(&data.d, &data.f, &current->thread);
389 preempt_enable();
390#else
391 return 0;
392#endif
393 break;
394 }
395
396 if (flags & ST) {
397 for (i = 0; i < nb; ++i)
398 if (__put_user(data.v[offset+i], addr+i))
399 return -EFAULT;
400 } else if (flags & F) {
401 current->thread.fpr[reg] = data.d;
402 } else {
403 regs->gpr[reg] = data.l;
404 }
405
406 if (flags & U)
407 regs->gpr[areg] = regs->dar;
408
409 return 1;
410}
diff --git a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c
index 48ed58f995c0..f7fae5f153b2 100644
--- a/arch/ppc/kernel/pci.c
+++ b/arch/ppc/kernel/pci.c
@@ -45,7 +45,6 @@ static void update_bridge_base(struct pci_bus *bus, int i);
45static void pcibios_fixup_resources(struct pci_dev* dev); 45static void pcibios_fixup_resources(struct pci_dev* dev);
46static void fixup_broken_pcnet32(struct pci_dev* dev); 46static void fixup_broken_pcnet32(struct pci_dev* dev);
47static int reparent_resources(struct resource *parent, struct resource *res); 47static int reparent_resources(struct resource *parent, struct resource *res);
48static void fixup_rev1_53c810(struct pci_dev* dev);
49static void fixup_cpc710_pci64(struct pci_dev* dev); 48static void fixup_cpc710_pci64(struct pci_dev* dev);
50#ifdef CONFIG_PPC_OF 49#ifdef CONFIG_PPC_OF
51static u8* pci_to_OF_bus_map; 50static u8* pci_to_OF_bus_map;
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c
index dc55e1abc45b..0eb0b7085e6a 100644
--- a/arch/ppc/kernel/setup.c
+++ b/arch/ppc/kernel/setup.c
@@ -602,7 +602,19 @@ void parse_bootinfo(struct bi_record *rec)
602#endif /* CONFIG_BLK_DEV_INITRD */ 602#endif /* CONFIG_BLK_DEV_INITRD */
603#ifdef CONFIG_PPC_MULTIPLATFORM 603#ifdef CONFIG_PPC_MULTIPLATFORM
604 case BI_MACHTYPE: 604 case BI_MACHTYPE:
605 _machine = data[0]; 605 /* Machine types changed with the merge. Since the
606 * bootinfo are now deprecated, we can just hard code
607 * the appropriate conversion here for when we are
608 * called with yaboot which passes us a machine type
609 * this way.
610 */
611 switch(data[0]) {
612 case 1: _machine = _MACH_prep; break;
613 case 2: _machine = _MACH_Pmac; break;
614 case 4: _machine = _MACH_chrp; break;
615 default:
616 _machine = data[0];
617 }
606 break; 618 break;
607#endif 619#endif
608 case BI_MEMSIZE: 620 case BI_MEMSIZE:
diff --git a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c
index 99b48abd3296..45f0782059f1 100644
--- a/arch/ppc/mm/init.c
+++ b/arch/ppc/mm/init.c
@@ -597,21 +597,20 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
597 597
598 if (pfn_valid(pfn)) { 598 if (pfn_valid(pfn)) {
599 struct page *page = pfn_to_page(pfn); 599 struct page *page = pfn_to_page(pfn);
600 if (!PageReserved(page)
601 && !test_bit(PG_arch_1, &page->flags)) {
602 if (vma->vm_mm == current->active_mm) {
603#ifdef CONFIG_8xx 600#ifdef CONFIG_8xx
604 /* On 8xx, cache control instructions (particularly 601 /* On 8xx, the TLB handlers work in 2 stages:
605 * "dcbst" from flush_dcache_icache) fault as write 602 * First, a zeroed entry is loaded by TLBMiss handler,
606 * operation if there is an unpopulated TLB entry 603 * which causes the TLBError handler to be triggered.
607 * for the address in question. To workaround that, 604 * That means the zeroed TLB has to be invalidated
608 * we invalidate the TLB here, thus avoiding dcbst 605 * whenever a page miss occurs.
609 * misbehaviour. 606 */
610 */ 607 _tlbie(address);
611 _tlbie(address);
612#endif 608#endif
609 if (!PageReserved(page)
610 && !test_bit(PG_arch_1, &page->flags)) {
611 if (vma->vm_mm == current->active_mm)
613 __flush_dcache_icache((void *) address); 612 __flush_dcache_icache((void *) address);
614 } else 613 else
615 flush_dcache_icache_page(page); 614 flush_dcache_icache_page(page);
616 set_bit(PG_arch_1, &page->flags); 615 set_bit(PG_arch_1, &page->flags);
617 } 616 }
diff --git a/arch/ppc/platforms/85xx/mpc85xx_ads_common.h b/arch/ppc/platforms/85xx/mpc85xx_ads_common.h
index 7b26bcc5d10d..198a6a02cde8 100644
--- a/arch/ppc/platforms/85xx/mpc85xx_ads_common.h
+++ b/arch/ppc/platforms/85xx/mpc85xx_ads_common.h
@@ -25,6 +25,8 @@
25#define BCSR_ADDR ((uint)0xf8000000) 25#define BCSR_ADDR ((uint)0xf8000000)
26#define BCSR_SIZE ((uint)(32 * 1024)) 26#define BCSR_SIZE ((uint)(32 * 1024))
27 27
28struct seq_file;
29
28extern int mpc85xx_ads_show_cpuinfo(struct seq_file *m); 30extern int mpc85xx_ads_show_cpuinfo(struct seq_file *m);
29extern void mpc85xx_ads_init_IRQ(void) __init; 31extern void mpc85xx_ads_init_IRQ(void) __init;
30extern void mpc85xx_ads_map_io(void) __init; 32extern void mpc85xx_ads_map_io(void) __init;
diff --git a/arch/ppc/platforms/85xx/stx_gp3.h b/arch/ppc/platforms/85xx/stx_gp3.h
index 7bcc6c35a417..2f25b5195152 100644
--- a/arch/ppc/platforms/85xx/stx_gp3.h
+++ b/arch/ppc/platforms/85xx/stx_gp3.h
@@ -21,7 +21,6 @@
21 21
22#include <linux/config.h> 22#include <linux/config.h>
23#include <linux/init.h> 23#include <linux/init.h>
24#include <linux/seq_file.h>
25#include <asm/ppcboot.h> 24#include <asm/ppcboot.h>
26 25
27#define BOARD_CCSRBAR ((uint)0xe0000000) 26#define BOARD_CCSRBAR ((uint)0xe0000000)
@@ -43,7 +42,6 @@ extern void mpc85xx_setup_hose(void) __init;
43extern void mpc85xx_restart(char *cmd); 42extern void mpc85xx_restart(char *cmd);
44extern void mpc85xx_power_off(void); 43extern void mpc85xx_power_off(void);
45extern void mpc85xx_halt(void); 44extern void mpc85xx_halt(void);
46extern int mpc85xx_show_cpuinfo(struct seq_file *m);
47extern void mpc85xx_init_IRQ(void) __init; 45extern void mpc85xx_init_IRQ(void) __init;
48extern unsigned long mpc85xx_find_end_of_memory(void) __init; 46extern unsigned long mpc85xx_find_end_of_memory(void) __init;
49extern void mpc85xx_calibrate_decr(void) __init; 47extern void mpc85xx_calibrate_decr(void) __init;
diff --git a/arch/ppc/syslib/mpc83xx_sys.c b/arch/ppc/syslib/mpc83xx_sys.c
index a1523989aff4..82cf3ab77f4a 100644
--- a/arch/ppc/syslib/mpc83xx_sys.c
+++ b/arch/ppc/syslib/mpc83xx_sys.c
@@ -69,9 +69,33 @@ struct ppc_sys_spec ppc_sys_specs[] = {
69 }, 69 },
70 }, 70 },
71 { 71 {
72 .ppc_sys_name = "8343E", 72 .ppc_sys_name = "8347E",
73 .mask = 0xFFFF0000, 73 .mask = 0xFFFF0000,
74 .value = 0x80540000, 74 .value = 0x80540000,
75 .num_devices = 9,
76 .device_list = (enum ppc_sys_devices[])
77 {
78 MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1,
79 MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2,
80 MPC83xx_USB2_DR, MPC83xx_USB2_MPH, MPC83xx_MDIO
81 },
82 },
83 {
84 .ppc_sys_name = "8347",
85 .mask = 0xFFFF0000,
86 .value = 0x80550000,
87 .num_devices = 8,
88 .device_list = (enum ppc_sys_devices[])
89 {
90 MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1,
91 MPC83xx_IIC2, MPC83xx_DUART,
92 MPC83xx_USB2_DR, MPC83xx_USB2_MPH, MPC83xx_MDIO
93 },
94 },
95 {
96 .ppc_sys_name = "8343E",
97 .mask = 0xFFFF0000,
98 .value = 0x80560000,
75 .num_devices = 8, 99 .num_devices = 8,
76 .device_list = (enum ppc_sys_devices[]) 100 .device_list = (enum ppc_sys_devices[])
77 { 101 {
@@ -83,7 +107,7 @@ struct ppc_sys_spec ppc_sys_specs[] = {
83 { 107 {
84 .ppc_sys_name = "8343", 108 .ppc_sys_name = "8343",
85 .mask = 0xFFFF0000, 109 .mask = 0xFFFF0000,
86 .value = 0x80550000, 110 .value = 0x80570000,
87 .num_devices = 7, 111 .num_devices = 7,
88 .device_list = (enum ppc_sys_devices[]) 112 .device_list = (enum ppc_sys_devices[])
89 { 113 {
diff --git a/arch/ppc/xmon/start.c b/arch/ppc/xmon/start.c
index 98612d420346..c80177f8ec04 100644
--- a/arch/ppc/xmon/start.c
+++ b/arch/ppc/xmon/start.c
@@ -184,7 +184,9 @@ xmon_map_scc(void)
184 sccc = base + (addr & ~PAGE_MASK); 184 sccc = base + (addr & ~PAGE_MASK);
185 sccd = sccc + 0x10; 185 sccd = sccc + 0x10;
186 186
187 } else { 187 }
188#ifdef CONFIG_PPC_CHRP
189 else {
188 base = (volatile unsigned char *) isa_io_base; 190 base = (volatile unsigned char *) isa_io_base;
189 if (_machine == _MACH_chrp) 191 if (_machine == _MACH_chrp)
190 base = (volatile unsigned char *) 192 base = (volatile unsigned char *)
@@ -200,6 +202,7 @@ xmon_map_scc(void)
200 RXRDY = 1; 202 RXRDY = 1;
201 DLAB = 0x80; 203 DLAB = 0x80;
202 } 204 }
205#endif /* CONFIG_PPC_CHRP */
203#elif defined(CONFIG_GEMINI) 206#elif defined(CONFIG_GEMINI)
204 /* should already be mapped by the kernel boot */ 207 /* should already be mapped by the kernel boot */
205 sccc = (volatile unsigned char *) 0xffeffb0d; 208 sccc = (volatile unsigned char *) 0xffeffb0d;