aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68knommu
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68knommu')
-rw-r--r--arch/m68knommu/Kconfig24
-rw-r--r--arch/m68knommu/kernel/m68k_ksyms.c2
-rw-r--r--arch/m68knommu/kernel/process.c34
-rw-r--r--arch/m68knommu/kernel/setup.c5
-rw-r--r--arch/m68knommu/kernel/sys_m68k.c23
-rw-r--r--arch/m68knommu/kernel/time.c2
-rw-r--r--arch/m68knommu/kernel/traps.c13
-rw-r--r--arch/m68knommu/kernel/vmlinux.lds.S9
-rw-r--r--arch/m68knommu/lib/checksum.c28
-rw-r--r--arch/m68knommu/platform/5307/head.S20
-rw-r--r--arch/m68knommu/platform/5307/ints.c17
-rw-r--r--arch/m68knommu/platform/5307/timers.c16
-rw-r--r--arch/m68knommu/platform/68360/config.c2
-rw-r--r--arch/m68knommu/platform/68360/head-ram.S3
14 files changed, 124 insertions, 74 deletions
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index 6d920d4bdc3d..25993c2a8fbb 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -25,6 +25,14 @@ config RWSEM_XCHGADD_ALGORITHM
25 bool 25 bool
26 default n 26 default n
27 27
28config ARCH_HAS_ILOG2_U32
29 bool
30 default n
31
32config ARCH_HAS_ILOG2_U64
33 bool
34 default n
35
28config GENERIC_FIND_NEXT_BIT 36config GENERIC_FIND_NEXT_BIT
29 bool 37 bool
30 default y 38 default y
@@ -173,7 +181,7 @@ config CLOCK_DIV
173 On many SoC style CPUs the master CPU clock is also used to drive 181 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 182 on-chip peripherals. The clock that is distributed to these
175 peripherals is sometimes a fixed ratio of the master clock 183 peripherals is sometimes a fixed ratio of the master clock
176 frequency. If so then set this to the divider ration of the 184 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. 185 master clock to the peripheral clock. If not sure then select 1.
178 186
179config OLDMASK 187config OLDMASK
@@ -192,7 +200,7 @@ config PILOT3
192 Support for the Palm Pilot 1000/5000, Personal/Pro and PalmIII. 200 Support for the Palm Pilot 1000/5000, Personal/Pro and PalmIII.
193 201
194config XCOPILOT_BUGS 202config XCOPILOT_BUGS
195 bool " (X)Copilot support" 203 bool "(X)Copilot support"
196 depends on PILOT3 204 depends on PILOT3
197 help 205 help
198 Support the bugs of Xcopilot. 206 Support the bugs of Xcopilot.
@@ -216,20 +224,20 @@ config DRAGEN2
216 Support for the DragenEngine II board. 224 Support for the DragenEngine II board.
217 225
218config DIRECT_IO_ACCESS 226config DIRECT_IO_ACCESS
219 bool " Allow user to access IO directly" 227 bool "Allow user to access IO directly"
220 depends on (UCSIMM || UCDIMM || DRAGEN2) 228 depends on (UCSIMM || UCDIMM || DRAGEN2)
221 help 229 help
222 Disable the CPU internal registers protection in user mode, 230 Disable the CPU internal registers protection in user mode,
223 to allow a user application to read/write them. 231 to allow a user application to read/write them.
224 232
225config INIT_LCD 233config INIT_LCD
226 bool " Initialize LCD" 234 bool "Initialize LCD"
227 depends on (UCSIMM || UCDIMM || DRAGEN2) 235 depends on (UCSIMM || UCDIMM || DRAGEN2)
228 help 236 help
229 Initialize the LCD controller of the 68x328 processor. 237 Initialize the LCD controller of the 68x328 processor.
230 238
231config MEMORY_RESERVE 239config MEMORY_RESERVE
232 int " Memory reservation (MiB)" 240 int "Memory reservation (MiB)"
233 depends on (UCSIMM || UCDIMM) 241 depends on (UCSIMM || UCDIMM)
234 help 242 help
235 Reserve certain memory regions on 68x328 based boards. 243 Reserve certain memory regions on 68x328 based boards.
@@ -409,7 +417,7 @@ config MOD5272
409 Support for the Netburner MOD-5272 board. 417 Support for the Netburner MOD-5272 board.
410 418
411config ROMFS_FROM_ROM 419config ROMFS_FROM_ROM
412 bool " ROMFS image not RAM resident" 420 bool "ROMFS image not RAM resident"
413 depends on (NETtel || SNAPGEAR) 421 depends on (NETtel || SNAPGEAR)
414 help 422 help
415 The ROMfs filesystem will stay resident in the FLASH/ROM, not be 423 The ROMfs filesystem will stay resident in the FLASH/ROM, not be
@@ -565,7 +573,7 @@ config ROMVEC
565 depends on ROM 573 depends on ROM
566 help 574 help
567 This is almost always the same as the base of the ROM. Since on all 575 This is almost always the same as the base of the ROM. Since on all
568 68000 type varients the vectors are at the base of the boot device 576 68000 type variants the vectors are at the base of the boot device
569 on system startup. 577 on system startup.
570 578
571config ROMVECSIZE 579config ROMVECSIZE
@@ -574,7 +582,7 @@ config ROMVECSIZE
574 depends on ROM 582 depends on ROM
575 help 583 help
576 Define the size of the vector region in ROM. For most 68000 584 Define the size of the vector region in ROM. For most 68000
577 varients this would be 0x400 bytes in size. Set to 0 if you do 585 variants this would be 0x400 bytes in size. Set to 0 if you do
578 not want a vector region at the start of the ROM. 586 not want a vector region at the start of the ROM.
579 587
580config ROMSTART 588config ROMSTART
diff --git a/arch/m68knommu/kernel/m68k_ksyms.c b/arch/m68knommu/kernel/m68k_ksyms.c
index 1e62150f3588..25327c9eadd7 100644
--- a/arch/m68knommu/kernel/m68k_ksyms.c
+++ b/arch/m68knommu/kernel/m68k_ksyms.c
@@ -38,7 +38,7 @@ EXPORT_SYMBOL(ip_fast_csum);
38EXPORT_SYMBOL(kernel_thread); 38EXPORT_SYMBOL(kernel_thread);
39 39
40/* Networking helper routines. */ 40/* Networking helper routines. */
41EXPORT_SYMBOL(csum_partial_copy); 41EXPORT_SYMBOL(csum_partial_copy_nocheck);
42 42
43/* The following are special because they're not called 43/* The following are special because they're not called
44 explicitly (the C compiler generates them). Fortunately, 44 explicitly (the C compiler generates them). Fortunately,
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 bde9811cf98c..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;
@@ -62,7 +59,7 @@ int (*mach_kbdrate) (struct kbd_repeat *);
62void (*mach_kbd_leds) (unsigned int); 59void (*mach_kbd_leds) (unsigned int);
63/* machine dependent irq functions */ 60/* machine dependent irq functions */
64void (*mach_init_IRQ) (void); 61void (*mach_init_IRQ) (void);
65irqreturn_t (*(*mach_default_handler)[]) (int, void *, struct pt_regs *); 62irq_handler_t mach_default_handler;
66int (*mach_get_irq_list) (struct seq_file *, void *); 63int (*mach_get_irq_list) (struct seq_file *, void *);
67void (*mach_process_int) (int irq, struct pt_regs *fp); 64void (*mach_process_int) (int irq, struct pt_regs *fp);
68void (*mach_trap_init) (void); 65void (*mach_trap_init) (void);
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/time.c b/arch/m68knommu/kernel/time.c
index c5667bdddd5e..9226264abf1a 100644
--- a/arch/m68knommu/kernel/time.c
+++ b/arch/m68knommu/kernel/time.c
@@ -54,7 +54,7 @@ static irqreturn_t timer_interrupt(int irq, void *dummy, struct pt_regs * regs)
54 update_process_times(user_mode(regs)); 54 update_process_times(user_mode(regs));
55#endif 55#endif
56 if (current->pid) 56 if (current->pid)
57 profile_tick(CPU_PROFILING, regs); 57 profile_tick(CPU_PROFILING);
58 58
59 /* 59 /*
60 * If we have an externally synchronized Linux clock, then update 60 * If we have an externally synchronized Linux clock, then update
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/kernel/vmlinux.lds.S b/arch/m68knommu/kernel/vmlinux.lds.S
index ccd2ceb05cfb..2b2a10da64a4 100644
--- a/arch/m68knommu/kernel/vmlinux.lds.S
+++ b/arch/m68knommu/kernel/vmlinux.lds.S
@@ -60,6 +60,7 @@ SECTIONS {
60#endif 60#endif
61 61
62 .text : { 62 .text : {
63 _text = .;
63 _stext = . ; 64 _stext = . ;
64 *(.text) 65 *(.text)
65 SCHED_TEXT 66 SCHED_TEXT
@@ -140,13 +141,7 @@ SECTIONS {
140 *(.init.setup) 141 *(.init.setup)
141 __setup_end = .; 142 __setup_end = .;
142 __initcall_start = .; 143 __initcall_start = .;
143 *(.initcall1.init) 144 INITCALLS
144 *(.initcall2.init)
145 *(.initcall3.init)
146 *(.initcall4.init)
147 *(.initcall5.init)
148 *(.initcall6.init)
149 *(.initcall7.init)
150 __initcall_end = .; 145 __initcall_end = .;
151 __con_initcall_start = .; 146 __con_initcall_start = .;
152 *(.con_initcall.init) 147 *(.con_initcall.init)
diff --git a/arch/m68knommu/lib/checksum.c b/arch/m68knommu/lib/checksum.c
index 7bec6fdee34b..269d83bfbbe1 100644
--- a/arch/m68knommu/lib/checksum.c
+++ b/arch/m68knommu/lib/checksum.c
@@ -96,9 +96,9 @@ out:
96 * This is a version of ip_compute_csum() optimized for IP headers, 96 * This is a version of ip_compute_csum() optimized for IP headers,
97 * which always checksum on 4 octet boundaries. 97 * which always checksum on 4 octet boundaries.
98 */ 98 */
99unsigned short ip_fast_csum(unsigned char * iph, unsigned int ihl) 99__sum16 ip_fast_csum(const void *iph, unsigned int ihl)
100{ 100{
101 return ~do_csum(iph,ihl*4); 101 return (__force __sum16)~do_csum(iph,ihl*4);
102} 102}
103 103
104/* 104/*
@@ -113,15 +113,15 @@ unsigned short ip_fast_csum(unsigned char * iph, unsigned int ihl)
113 * 113 *
114 * it's best to have buff aligned on a 32-bit boundary 114 * it's best to have buff aligned on a 32-bit boundary
115 */ 115 */
116unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum) 116__wsum csum_partial(const void *buff, int len, __wsum sum)
117{ 117{
118 unsigned int result = do_csum(buff, len); 118 unsigned int result = do_csum(buff, len);
119 119
120 /* add in old sum, and carry.. */ 120 /* add in old sum, and carry.. */
121 result += sum; 121 result += (__force u32)sum;
122 if (sum > result) 122 if ((__force u32)sum > result)
123 result += 1; 123 result += 1;
124 return result; 124 return (__force __wsum)result;
125} 125}
126 126
127EXPORT_SYMBOL(csum_partial); 127EXPORT_SYMBOL(csum_partial);
@@ -130,21 +130,21 @@ EXPORT_SYMBOL(csum_partial);
130 * this routine is used for miscellaneous IP-like checksums, mainly 130 * this routine is used for miscellaneous IP-like checksums, mainly
131 * in icmp.c 131 * in icmp.c
132 */ 132 */
133unsigned short ip_compute_csum(const unsigned char * buff, int len) 133__sum16 ip_compute_csum(const void *buff, int len)
134{ 134{
135 return ~do_csum(buff,len); 135 return (__force __sum16)~do_csum(buff,len);
136} 136}
137 137
138/* 138/*
139 * copy from fs while checksumming, otherwise like csum_partial 139 * copy from fs while checksumming, otherwise like csum_partial
140 */ 140 */
141 141
142unsigned int 142__wsum
143csum_partial_copy_from_user(const unsigned char *src, unsigned char *dst, 143csum_partial_copy_from_user(const void __user *src, void *dst,
144 int len, int sum, int *csum_err) 144 int len, __wsum sum, int *csum_err)
145{ 145{
146 if (csum_err) *csum_err = 0; 146 if (csum_err) *csum_err = 0;
147 memcpy(dst, src, len); 147 memcpy(dst, (__force const void *)src, len);
148 return csum_partial(dst, len, sum); 148 return csum_partial(dst, len, sum);
149} 149}
150 150
@@ -152,8 +152,8 @@ csum_partial_copy_from_user(const unsigned char *src, unsigned char *dst,
152 * copy from ds while checksumming, otherwise like csum_partial 152 * copy from ds while checksumming, otherwise like csum_partial
153 */ 153 */
154 154
155unsigned int 155__wsum
156csum_partial_copy(const unsigned char *src, unsigned char *dst, int len, int sum) 156csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum)
157{ 157{
158 memcpy(dst, src, len); 158 memcpy(dst, src, len);
159 return csum_partial(dst, len, sum); 159 return csum_partial(dst, len, sum);
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/5307/ints.c b/arch/m68knommu/platform/5307/ints.c
index b4b55093ae7e..a57239ec6c8c 100644
--- a/arch/m68knommu/platform/5307/ints.c
+++ b/arch/m68knommu/platform/5307/ints.c
@@ -33,7 +33,7 @@
33/* 33/*
34 * This table stores the address info for each vector handler. 34 * This table stores the address info for each vector handler.
35 */ 35 */
36irq_handler_t irq_list[SYS_IRQS]; 36struct irq_entry irq_list[SYS_IRQS];
37 37
38#define NUM_IRQ_NODES 16 38#define NUM_IRQ_NODES 16
39static irq_node_t nodes[NUM_IRQ_NODES]; 39static irq_node_t nodes[NUM_IRQ_NODES];
@@ -44,7 +44,7 @@ volatile unsigned int num_spurious;
44unsigned int local_bh_count[NR_CPUS]; 44unsigned int local_bh_count[NR_CPUS];
45unsigned int local_irq_count[NR_CPUS]; 45unsigned int local_irq_count[NR_CPUS];
46 46
47static irqreturn_t default_irq_handler(int irq, void *ptr, struct pt_regs *regs) 47static irqreturn_t default_irq_handler(int irq, void *ptr)
48{ 48{
49#if 1 49#if 1
50 printk(KERN_INFO "%s(%d): default irq handler vec=%d [0x%x]\n", 50 printk(KERN_INFO "%s(%d): default irq handler vec=%d [0x%x]\n",
@@ -70,7 +70,7 @@ void __init init_IRQ(void)
70 70
71 for (i = 0; i < SYS_IRQS; i++) { 71 for (i = 0; i < SYS_IRQS; i++) {
72 if (mach_default_handler) 72 if (mach_default_handler)
73 irq_list[i].handler = (*mach_default_handler)[i]; 73 irq_list[i].handler = mach_default_handler;
74 else 74 else
75 irq_list[i].handler = default_irq_handler; 75 irq_list[i].handler = default_irq_handler;
76 irq_list[i].flags = IRQ_FLG_STD; 76 irq_list[i].flags = IRQ_FLG_STD;
@@ -100,7 +100,7 @@ irq_node_t *new_irq_node(void)
100 100
101int request_irq( 101int request_irq(
102 unsigned int irq, 102 unsigned int irq,
103 irqreturn_t (*handler)(int, void *, struct pt_regs *), 103 irq_handler_t handler,
104 unsigned long flags, 104 unsigned long flags,
105 const char *devname, 105 const char *devname,
106 void *dev_id) 106 void *dev_id)
@@ -157,7 +157,7 @@ void free_irq(unsigned int irq, void *dev_id)
157 } 157 }
158 158
159 if (mach_default_handler) 159 if (mach_default_handler)
160 irq_list[irq].handler = (*mach_default_handler)[irq]; 160 irq_list[irq].handler = mach_default_handler;
161 else 161 else
162 irq_list[irq].handler = default_irq_handler; 162 irq_list[irq].handler = default_irq_handler;
163 irq_list[irq].flags = IRQ_FLG_STD; 163 irq_list[irq].flags = IRQ_FLG_STD;
@@ -168,8 +168,7 @@ void free_irq(unsigned int irq, void *dev_id)
168EXPORT_SYMBOL(free_irq); 168EXPORT_SYMBOL(free_irq);
169 169
170 170
171int sys_request_irq(unsigned int irq, 171int sys_request_irq(unsigned int irq, irq_handler_t handler,
172 irqreturn_t (*handler)(int, void *, struct pt_regs *),
173 unsigned long flags, const char *devname, void *dev_id) 172 unsigned long flags, const char *devname, void *dev_id)
174{ 173{
175 if (irq > IRQ7) { 174 if (irq > IRQ7) {
@@ -211,7 +210,7 @@ void sys_free_irq(unsigned int irq, void *dev_id)
211 printk(KERN_WARNING "%s: Removing probably wrong IRQ %d from %s\n", 210 printk(KERN_WARNING "%s: Removing probably wrong IRQ %d from %s\n",
212 __FUNCTION__, irq, irq_list[irq].devname); 211 __FUNCTION__, irq, irq_list[irq].devname);
213 212
214 irq_list[irq].handler = (*mach_default_handler)[irq]; 213 irq_list[irq].handler = mach_default_handler;
215 irq_list[irq].flags = 0; 214 irq_list[irq].flags = 0;
216 irq_list[irq].dev_id = NULL; 215 irq_list[irq].dev_id = NULL;
217 irq_list[irq].devname = NULL; 216 irq_list[irq].devname = NULL;
@@ -241,7 +240,7 @@ asmlinkage void process_int(unsigned long vec, struct pt_regs *fp)
241 if (vec >= VEC_INT1 && vec <= VEC_INT7) { 240 if (vec >= VEC_INT1 && vec <= VEC_INT7) {
242 vec -= VEC_SPUR; 241 vec -= VEC_SPUR;
243 kstat_cpu(0).irqs[vec]++; 242 kstat_cpu(0).irqs[vec]++;
244 irq_list[vec].handler(vec, irq_list[vec].dev_id, fp); 243 irq_list[vec].handler(vec, irq_list[vec].dev_id);
245 } else { 244 } else {
246 if (mach_process_int) 245 if (mach_process_int)
247 mach_process_int(vec, fp); 246 mach_process_int(vec, fp);
diff --git a/arch/m68knommu/platform/5307/timers.c b/arch/m68knommu/platform/5307/timers.c
index 24781f009337..e5668af19789 100644
--- a/arch/m68knommu/platform/5307/timers.c
+++ b/arch/m68knommu/platform/5307/timers.c
@@ -3,7 +3,7 @@
3/* 3/*
4 * timers.c -- generic ColdFire hardware timer support. 4 * timers.c -- generic ColdFire hardware timer support.
5 * 5 *
6 * Copyright (C) 1999-2003, Greg Ungerer (gerg@snapgear.com) 6 * Copyright (C) 1999-2006, Greg Ungerer (gerg@snapgear.com)
7 */ 7 */
8 8
9/***************************************************************************/ 9/***************************************************************************/
@@ -44,6 +44,14 @@ unsigned int mcf_timerlevel = 5;
44extern void mcf_settimericr(int timer, int level); 44extern void mcf_settimericr(int timer, int level);
45extern int mcf_timerirqpending(int timer); 45extern int mcf_timerirqpending(int timer);
46 46
47#if defined(CONFIG_M532x)
48#define __raw_readtrr __raw_readl
49#define __raw_writetrr __raw_writel
50#else
51#define __raw_readtrr __raw_readw
52#define __raw_writetrr __raw_writew
53#endif
54
47/***************************************************************************/ 55/***************************************************************************/
48 56
49void coldfire_tick(void) 57void coldfire_tick(void)
@@ -57,7 +65,7 @@ void coldfire_tick(void)
57void coldfire_timer_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)) 65void coldfire_timer_init(irqreturn_t (*handler)(int, void *, struct pt_regs *))
58{ 66{
59 __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR)); 67 __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR));
60 __raw_writew(((MCF_BUSCLK / 16) / HZ), TA(MCFTIMER_TRR)); 68 __raw_writetrr(((MCF_BUSCLK / 16) / HZ), TA(MCFTIMER_TRR));
61 __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | 69 __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
62 MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR)); 70 MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR));
63 71
@@ -76,7 +84,7 @@ unsigned long coldfire_timer_offset(void)
76 unsigned long trr, tcn, offset; 84 unsigned long trr, tcn, offset;
77 85
78 tcn = __raw_readw(TA(MCFTIMER_TCN)); 86 tcn = __raw_readw(TA(MCFTIMER_TCN));
79 trr = __raw_readw(TA(MCFTIMER_TRR)); 87 trr = __raw_readtrr(TA(MCFTIMER_TRR));
80 offset = (tcn * (1000000 / HZ)) / trr; 88 offset = (tcn * (1000000 / HZ)) / trr;
81 89
82 /* Check if we just wrapped the counters and maybe missed a tick */ 90 /* Check if we just wrapped the counters and maybe missed a tick */
@@ -120,7 +128,7 @@ void coldfire_profile_init(void)
120 /* Set up TIMER 2 as high speed profile clock */ 128 /* Set up TIMER 2 as high speed profile clock */
121 __raw_writew(MCFTIMER_TMR_DISABLE, PA(MCFTIMER_TMR)); 129 __raw_writew(MCFTIMER_TMR_DISABLE, PA(MCFTIMER_TMR));
122 130
123 __raw_writew(((MCF_CLK / 16) / PROFILEHZ), PA(MCFTIMER_TRR)); 131 __raw_writetrr(((MCF_CLK / 16) / PROFILEHZ), PA(MCFTIMER_TRR));
124 __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | 132 __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
125 MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, PA(MCFTIMER_TMR)); 133 MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, PA(MCFTIMER_TMR));
126 134
diff --git a/arch/m68knommu/platform/68360/config.c b/arch/m68knommu/platform/68360/config.c
index c5482e3622eb..1b36f6261764 100644
--- a/arch/m68knommu/platform/68360/config.c
+++ b/arch/m68knommu/platform/68360/config.c
@@ -114,7 +114,7 @@ void BSP_gettod (int *yearp, int *monp, int *dayp,
114{ 114{
115} 115}
116 116
117int BSP_hwclk(int op, struct hwclk_time *t) 117int BSP_hwclk(int op, struct rtc_time *t)
118{ 118{
119 if (!op) { 119 if (!op) {
120 /* read */ 120 /* read */
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