aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68knommu
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68knommu')
-rw-r--r--arch/m68knommu/Kconfig12
-rw-r--r--arch/m68knommu/kernel/process.c34
-rw-r--r--arch/m68knommu/kernel/setup.c3
-rw-r--r--arch/m68knommu/kernel/sys_m68k.c23
-rw-r--r--arch/m68knommu/kernel/traps.c13
-rw-r--r--arch/m68knommu/platform/5307/head.S20
-rw-r--r--arch/m68knommu/platform/68360/head-ram.S3
7 files changed, 74 insertions, 34 deletions
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index c1bc22c6d0d8..aa70dde54228 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -173,7 +173,7 @@ config CLOCK_DIV
173 On many SoC style CPUs the master CPU clock is also used to drive 173 On many SoC style CPUs the master CPU clock is also used to drive
174 on-chip peripherals. The clock that is distributed to these 174 on-chip peripherals. The clock that is distributed to these
175 peripherals is sometimes a fixed ratio of the master clock 175 peripherals is sometimes a fixed ratio of the master clock
176 frequency. If so then set this to the divider ration of the 176 frequency. If so then set this to the divider ratio of the
177 master clock to the peripheral clock. If not sure then select 1. 177 master clock to the peripheral clock. If not sure then select 1.
178 178
179config OLDMASK 179config OLDMASK
@@ -192,7 +192,7 @@ config PILOT3
192 Support for the Palm Pilot 1000/5000, Personal/Pro and PalmIII. 192 Support for the Palm Pilot 1000/5000, Personal/Pro and PalmIII.
193 193
194config XCOPILOT_BUGS 194config XCOPILOT_BUGS
195 bool " (X)Copilot support" 195 bool "(X)Copilot support"
196 depends on PILOT3 196 depends on PILOT3
197 help 197 help
198 Support the bugs of Xcopilot. 198 Support the bugs of Xcopilot.
@@ -216,20 +216,20 @@ config DRAGEN2
216 Support for the DragenEngine II board. 216 Support for the DragenEngine II board.
217 217
218config DIRECT_IO_ACCESS 218config DIRECT_IO_ACCESS
219 bool " Allow user to access IO directly" 219 bool "Allow user to access IO directly"
220 depends on (UCSIMM || UCDIMM || DRAGEN2) 220 depends on (UCSIMM || UCDIMM || DRAGEN2)
221 help 221 help
222 Disable the CPU internal registers protection in user mode, 222 Disable the CPU internal registers protection in user mode,
223 to allow a user application to read/write them. 223 to allow a user application to read/write them.
224 224
225config INIT_LCD 225config INIT_LCD
226 bool " Initialize LCD" 226 bool "Initialize LCD"
227 depends on (UCSIMM || UCDIMM || DRAGEN2) 227 depends on (UCSIMM || UCDIMM || DRAGEN2)
228 help 228 help
229 Initialize the LCD controller of the 68x328 processor. 229 Initialize the LCD controller of the 68x328 processor.
230 230
231config MEMORY_RESERVE 231config MEMORY_RESERVE
232 int " Memory reservation (MiB)" 232 int "Memory reservation (MiB)"
233 depends on (UCSIMM || UCDIMM) 233 depends on (UCSIMM || UCDIMM)
234 help 234 help
235 Reserve certain memory regions on 68x328 based boards. 235 Reserve certain memory regions on 68x328 based boards.
@@ -409,7 +409,7 @@ config MOD5272
409 Support for the Netburner MOD-5272 board. 409 Support for the Netburner MOD-5272 board.
410 410
411config ROMFS_FROM_ROM 411config ROMFS_FROM_ROM
412 bool " ROMFS image not RAM resident" 412 bool "ROMFS image not RAM resident"
413 depends on (NETtel || SNAPGEAR) 413 depends on (NETtel || SNAPGEAR)
414 help 414 help
415 The ROMfs filesystem will stay resident in the FLASH/ROM, not be 415 The ROMfs filesystem will stay resident in the FLASH/ROM, not be
diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c
index c18a83306953..941955dc3b7c 100644
--- a/arch/m68knommu/kernel/process.c
+++ b/arch/m68knommu/kernel/process.c
@@ -290,7 +290,7 @@ void dump(struct pt_regs *fp)
290 unsigned char *tp; 290 unsigned char *tp;
291 int i; 291 int i;
292 292
293 printk(KERN_EMERG "\nCURRENT PROCESS:\n\n"); 293 printk(KERN_EMERG "\n" KERN_EMERG "CURRENT PROCESS:\n" KERN_EMERG "\n");
294 printk(KERN_EMERG "COMM=%s PID=%d\n", current->comm, current->pid); 294 printk(KERN_EMERG "COMM=%s PID=%d\n", current->comm, current->pid);
295 295
296 if (current->mm) { 296 if (current->mm) {
@@ -301,7 +301,8 @@ void dump(struct pt_regs *fp)
301 (int) current->mm->end_data, 301 (int) current->mm->end_data,
302 (int) current->mm->end_data, 302 (int) current->mm->end_data,
303 (int) current->mm->brk); 303 (int) current->mm->brk);
304 printk(KERN_EMERG "USER-STACK=%08x KERNEL-STACK=%08x\n\n", 304 printk(KERN_EMERG "USER-STACK=%08x KERNEL-STACK=%08x\n"
305 KERN_EMERG "\n",
305 (int) current->mm->start_stack, 306 (int) current->mm->start_stack,
306 (int)(((unsigned long) current) + THREAD_SIZE)); 307 (int)(((unsigned long) current) + THREAD_SIZE));
307 } 308 }
@@ -312,36 +313,35 @@ void dump(struct pt_regs *fp)
312 fp->d0, fp->d1, fp->d2, fp->d3); 313 fp->d0, fp->d1, fp->d2, fp->d3);
313 printk(KERN_EMERG "d4: %08lx d5: %08lx a0: %08lx a1: %08lx\n", 314 printk(KERN_EMERG "d4: %08lx d5: %08lx a0: %08lx a1: %08lx\n",
314 fp->d4, fp->d5, fp->a0, fp->a1); 315 fp->d4, fp->d5, fp->a0, fp->a1);
315 printk(KERN_EMERG "\nUSP: %08x TRAPFRAME: %08x\n", (unsigned int) rdusp(), 316 printk(KERN_EMERG "\n" KERN_EMERG "USP: %08x TRAPFRAME: %08x\n",
316 (unsigned int) fp); 317 (unsigned int) rdusp(), (unsigned int) fp);
317 318
318 printk(KERN_EMERG "\nCODE:"); 319 printk(KERN_EMERG "\n" KERN_EMERG "CODE:");
319 tp = ((unsigned char *) fp->pc) - 0x20; 320 tp = ((unsigned char *) fp->pc) - 0x20;
320 for (sp = (unsigned long *) tp, i = 0; (i < 0x40); i += 4) { 321 for (sp = (unsigned long *) tp, i = 0; (i < 0x40); i += 4) {
321 if ((i % 0x10) == 0) 322 if ((i % 0x10) == 0)
322 printk(KERN_EMERG "\n%08x: ", (int) (tp + i)); 323 printk("\n" KERN_EMERG "%08x: ", (int) (tp + i));
323 printk(KERN_EMERG "%08x ", (int) *sp++); 324 printk("%08x ", (int) *sp++);
324 } 325 }
325 printk(KERN_EMERG "\n"); 326 printk("\n" KERN_EMERG "\n");
326 327
327 printk(KERN_EMERG "\nKERNEL STACK:"); 328 printk(KERN_EMERG "KERNEL STACK:");
328 tp = ((unsigned char *) fp) - 0x40; 329 tp = ((unsigned char *) fp) - 0x40;
329 for (sp = (unsigned long *) tp, i = 0; (i < 0xc0); i += 4) { 330 for (sp = (unsigned long *) tp, i = 0; (i < 0xc0); i += 4) {
330 if ((i % 0x10) == 0) 331 if ((i % 0x10) == 0)
331 printk(KERN_EMERG "\n%08x: ", (int) (tp + i)); 332 printk("\n" KERN_EMERG "%08x: ", (int) (tp + i));
332 printk(KERN_EMERG "%08x ", (int) *sp++); 333 printk("%08x ", (int) *sp++);
333 } 334 }
334 printk(KERN_EMERG "\n"); 335 printk("\n" KERN_EMERG "\n");
335 printk(KERN_EMERG "\n");
336 336
337 printk(KERN_EMERG "\nUSER STACK:"); 337 printk(KERN_EMERG "USER STACK:");
338 tp = (unsigned char *) (rdusp() - 0x10); 338 tp = (unsigned char *) (rdusp() - 0x10);
339 for (sp = (unsigned long *) tp, i = 0; (i < 0x80); i += 4) { 339 for (sp = (unsigned long *) tp, i = 0; (i < 0x80); i += 4) {
340 if ((i % 0x10) == 0) 340 if ((i % 0x10) == 0)
341 printk(KERN_EMERG "\n%08x: ", (int) (tp + i)); 341 printk("\n" KERN_EMERG "%08x: ", (int) (tp + i));
342 printk(KERN_EMERG "%08x ", (int) *sp++); 342 printk("%08x ", (int) *sp++);
343 } 343 }
344 printk(KERN_EMERG "\n\n"); 344 printk("\n" KERN_EMERG "\n");
345} 345}
346 346
347/* 347/*
diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c
index 7b21959eaeae..9cf2e4d1fc77 100644
--- a/arch/m68knommu/kernel/setup.c
+++ b/arch/m68knommu/kernel/setup.c
@@ -36,10 +36,7 @@
36#include <asm/setup.h> 36#include <asm/setup.h>
37#include <asm/irq.h> 37#include <asm/irq.h>
38#include <asm/machdep.h> 38#include <asm/machdep.h>
39
40#ifdef CONFIG_BLK_DEV_INITRD
41#include <asm/pgtable.h> 39#include <asm/pgtable.h>
42#endif
43 40
44unsigned long memory_start; 41unsigned long memory_start;
45unsigned long memory_end; 42unsigned long memory_end;
diff --git a/arch/m68knommu/kernel/sys_m68k.c b/arch/m68knommu/kernel/sys_m68k.c
index c3494b8447d1..3265b2d734db 100644
--- a/arch/m68knommu/kernel/sys_m68k.c
+++ b/arch/m68knommu/kernel/sys_m68k.c
@@ -137,7 +137,7 @@ asmlinkage int old_select(struct sel_arg_struct *arg)
137asmlinkage int sys_ipc (uint call, int first, int second, 137asmlinkage int sys_ipc (uint call, int first, int second,
138 int third, void *ptr, long fifth) 138 int third, void *ptr, long fifth)
139{ 139{
140 int version; 140 int version, ret;
141 141
142 version = call >> 16; /* hack for backward compatibility */ 142 version = call >> 16; /* hack for backward compatibility */
143 call &= 0xffff; 143 call &= 0xffff;
@@ -190,6 +190,27 @@ asmlinkage int sys_ipc (uint call, int first, int second,
190 default: 190 default:
191 return -EINVAL; 191 return -EINVAL;
192 } 192 }
193 if (call <= SHMCTL)
194 switch (call) {
195 case SHMAT:
196 switch (version) {
197 default: {
198 ulong raddr;
199 ret = do_shmat (first, ptr, second, &raddr);
200 if (ret)
201 return ret;
202 return put_user (raddr, (ulong __user *) third);
203 }
204 }
205 case SHMDT:
206 return sys_shmdt (ptr);
207 case SHMGET:
208 return sys_shmget (first, second, third);
209 case SHMCTL:
210 return sys_shmctl (first, second, ptr);
211 default:
212 return -ENOSYS;
213 }
193 214
194 return -EINVAL; 215 return -EINVAL;
195} 216}
diff --git a/arch/m68knommu/kernel/traps.c b/arch/m68knommu/kernel/traps.c
index 17649d2543ef..9129b3a5258b 100644
--- a/arch/m68knommu/kernel/traps.c
+++ b/arch/m68knommu/kernel/traps.c
@@ -127,11 +127,12 @@ void show_stack(struct task_struct *task, unsigned long *stack)
127 if (stack + 1 > endstack) 127 if (stack + 1 > endstack)
128 break; 128 break;
129 if (i % 8 == 0) 129 if (i % 8 == 0)
130 printk(KERN_EMERG "\n "); 130 printk("\n" KERN_EMERG " ");
131 printk(KERN_EMERG " %08lx", *stack++); 131 printk(" %08lx", *stack++);
132 } 132 }
133 printk("\n");
133 134
134 printk(KERN_EMERG "\nCall Trace:"); 135 printk(KERN_EMERG "Call Trace:");
135 i = 0; 136 i = 0;
136 while (stack + 1 <= endstack) { 137 while (stack + 1 <= endstack) {
137 addr = *stack++; 138 addr = *stack++;
@@ -146,12 +147,12 @@ void show_stack(struct task_struct *task, unsigned long *stack)
146 if (((addr >= (unsigned long) &_start) && 147 if (((addr >= (unsigned long) &_start) &&
147 (addr <= (unsigned long) &_etext))) { 148 (addr <= (unsigned long) &_etext))) {
148 if (i % 4 == 0) 149 if (i % 4 == 0)
149 printk(KERN_EMERG "\n "); 150 printk("\n" KERN_EMERG " ");
150 printk(KERN_EMERG " [<%08lx>]", addr); 151 printk(" [<%08lx>]", addr);
151 i++; 152 i++;
152 } 153 }
153 } 154 }
154 printk(KERN_EMERG "\n"); 155 printk("\n");
155} 156}
156 157
157void bad_super_trap(struct frame *fp) 158void bad_super_trap(struct frame *fp)
diff --git a/arch/m68knommu/platform/5307/head.S b/arch/m68knommu/platform/5307/head.S
index f2edb6498cd9..b9aa0ca29bfb 100644
--- a/arch/m68knommu/platform/5307/head.S
+++ b/arch/m68knommu/platform/5307/head.S
@@ -64,6 +64,26 @@
64 negl %d0 /* negate bits */ 64 negl %d0 /* negate bits */
65.endm 65.endm
66 66
67#elif defined(CONFIG_M520x)
68.macro GET_MEM_SIZE
69 clrl %d0
70 movel MCF_MBAR+MCFSIM_SDCS0, %d2 /* Get SDRAM chip select 0 config */
71 andl #0x1f, %d2 /* Get only the chip select size */
72 beq 3f /* Check if it is enabled */
73 addql #1, %d2 /* Form exponent */
74 moveql #1, %d0
75 lsll %d2, %d0 /* 2 ^ exponent */
763:
77 movel MCF_MBAR+MCFSIM_SDCS1, %d2 /* Get SDRAM chip select 1 config */
78 andl #0x1f, %d2 /* Get only the chip select size */
79 beq 4f /* Check if it is enabled */
80 addql #1, %d2 /* Form exponent */
81 moveql #1, %d1
82 lsll %d2, %d1 /* 2 ^ exponent */
83 addl %d1, %d0 /* Total size of SDRAM in d0 */
844:
85.endm
86
67#else 87#else
68#error "ERROR: I don't know how to probe your boards memory size?" 88#error "ERROR: I don't know how to probe your boards memory size?"
69#endif 89#endif
diff --git a/arch/m68knommu/platform/68360/head-ram.S b/arch/m68knommu/platform/68360/head-ram.S
index 2ea51479f13a..2ef06242398b 100644
--- a/arch/m68knommu/platform/68360/head-ram.S
+++ b/arch/m68knommu/platform/68360/head-ram.S
@@ -25,6 +25,7 @@
25.global _periph_base 25.global _periph_base
26 26
27#define RAMEND (CONFIG_RAMBASE + CONFIG_RAMSIZE) 27#define RAMEND (CONFIG_RAMBASE + CONFIG_RAMSIZE)
28#define ROMEND (CONFIG_ROMBASE + CONFIG_ROMSIZE)
28 29
29#define REGB 0x1000 30#define REGB 0x1000
30#define PEPAR (_dprbase + REGB + 0x0016) 31#define PEPAR (_dprbase + REGB + 0x0016)
@@ -175,7 +176,7 @@ configure_chip_select_0:
175 move.l %d0, BR0 176 move.l %d0, BR0
176 177
177configure_chip_select_1: 178configure_chip_select_1:
178 move.l #__rom_end, %d0 179 move.l #ROMEND, %d0
179 subi.l #__rom_start, %d0 180 subi.l #__rom_start, %d0
180 subq.l #0x01, %d0 181 subq.l #0x01, %d0
181 eori.l #SIM_OR_MASK, %d0 182 eori.l #SIM_OR_MASK, %d0