aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68knommu
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-11-07 22:51:47 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-11-07 22:51:47 -0500
commit6b995751c2e851d2bc9c277b5884d0adb519e31d (patch)
tree7a15b41b5d8ce612915584a0773c670d5c0ab5b8 /arch/m68knommu
parent6c2f4267833f453156f8f439cc32eb4c92f357b4 (diff)
parentd27ba47e7e8c466c18983a1779d611f82d6a354f (diff)
Merge branch 'master'
Diffstat (limited to 'arch/m68knommu')
-rw-r--r--arch/m68knommu/Kconfig17
-rw-r--r--arch/m68knommu/Makefile7
-rw-r--r--arch/m68knommu/kernel/asm-offsets.c1
-rw-r--r--arch/m68knommu/kernel/ptrace.c39
-rw-r--r--arch/m68knommu/kernel/setup.c5
-rw-r--r--arch/m68knommu/kernel/vmlinux.lds.S9
-rw-r--r--arch/m68knommu/platform/520x/Makefile19
-rw-r--r--arch/m68knommu/platform/520x/config.c65
-rw-r--r--arch/m68knommu/platform/5307/Makefile1
-rw-r--r--arch/m68knommu/platform/5307/head.S3
-rw-r--r--arch/m68knommu/platform/5307/ints.c1
-rw-r--r--arch/m68knommu/platform/5307/pit.c12
12 files changed, 129 insertions, 50 deletions
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index 8520df9cee6d..b96498120fe9 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -71,6 +71,11 @@ config M5206e
71 help 71 help
72 Motorola ColdFire 5206e processor support. 72 Motorola ColdFire 5206e processor support.
73 73
74config M520x
75 bool "MCF520x"
76 help
77 Freescale Coldfire 5207/5208 processor support.
78
74config M523x 79config M523x
75 bool "MCF523x" 80 bool "MCF523x"
76 help 81 help
@@ -120,7 +125,7 @@ config M527x
120 125
121config COLDFIRE 126config COLDFIRE
122 bool 127 bool
123 depends on (M5206 || M5206e || M523x || M5249 || M527x || M5272 || M528x || M5307 || M5407) 128 depends on (M5206 || M5206e || M520x || M523x || M5249 || M527x || M5272 || M528x || M5307 || M5407)
124 default y 129 default y
125 130
126choice 131choice
@@ -322,6 +327,12 @@ config ELITE
322 help 327 help
323 Support for the Motorola M5206eLITE board. 328 Support for the Motorola M5206eLITE board.
324 329
330config M5208EVB
331 bool "Freescale M5208EVB board support"
332 depends on M520x
333 help
334 Support for the Freescale Coldfire M5208EVB.
335
325config M5235EVB 336config M5235EVB
326 bool "Freescale M5235EVB support" 337 bool "Freescale M5235EVB support"
327 depends on M523x 338 depends on M523x
@@ -465,10 +476,10 @@ config ARNEWSH
465 default y 476 default y
466 depends on (ARN5206 || ARN5307) 477 depends on (ARN5206 || ARN5307)
467 478
468config MOTOROLA 479config FREESCALE
469 bool 480 bool
470 default y 481 default y
471 depends on (M5206eC3 || M5235EVB || M5249C3 || M5271EVB || M5272C3 || M5275EVB || M5282EVB || M5307C3 || M5407C3) 482 depends on (M5206eC3 || M5208EVB || M5235EVB || M5249C3 || M5271EVB || M5272C3 || M5275EVB || M5282EVB || M5307C3 || M5407C3)
472 483
473config HW_FEITH 484config HW_FEITH
474 bool 485 bool
diff --git a/arch/m68knommu/Makefile b/arch/m68knommu/Makefile
index b8fdf191b8f6..b6b5c14e55fd 100644
--- a/arch/m68knommu/Makefile
+++ b/arch/m68knommu/Makefile
@@ -14,6 +14,7 @@ platform-$(CONFIG_M68VZ328) := 68VZ328
14platform-$(CONFIG_M68360) := 68360 14platform-$(CONFIG_M68360) := 68360
15platform-$(CONFIG_M5206) := 5206 15platform-$(CONFIG_M5206) := 5206
16platform-$(CONFIG_M5206e) := 5206e 16platform-$(CONFIG_M5206e) := 5206e
17platform-$(CONFIG_M520x) := 520x
17platform-$(CONFIG_M523x) := 523x 18platform-$(CONFIG_M523x) := 523x
18platform-$(CONFIG_M5249) := 5249 19platform-$(CONFIG_M5249) := 5249
19platform-$(CONFIG_M527x) := 527x 20platform-$(CONFIG_M527x) := 527x
@@ -29,7 +30,7 @@ board-$(CONFIG_UCDIMM) := ucdimm
29board-$(CONFIG_UCQUICC) := uCquicc 30board-$(CONFIG_UCQUICC) := uCquicc
30board-$(CONFIG_DRAGEN2) := de2 31board-$(CONFIG_DRAGEN2) := de2
31board-$(CONFIG_ARNEWSH) := ARNEWSH 32board-$(CONFIG_ARNEWSH) := ARNEWSH
32board-$(CONFIG_MOTOROLA) := MOTOROLA 33board-$(CONFIG_FREESCALE) := FREESCALE
33board-$(CONFIG_M5235EVB) := M5235EVB 34board-$(CONFIG_M5235EVB) := M5235EVB
34board-$(CONFIG_M5271EVB) := M5271EVB 35board-$(CONFIG_M5271EVB) := M5271EVB
35board-$(CONFIG_M5275EVB) := M5275EVB 36board-$(CONFIG_M5275EVB) := M5275EVB
@@ -41,6 +42,7 @@ board-$(CONFIG_SECUREEDGEMP3) := MP3
41board-$(CONFIG_CLEOPATRA) := CLEOPATRA 42board-$(CONFIG_CLEOPATRA) := CLEOPATRA
42board-$(CONFIG_senTec) := senTec 43board-$(CONFIG_senTec) := senTec
43board-$(CONFIG_SNEHA) := SNEHA 44board-$(CONFIG_SNEHA) := SNEHA
45board-$(CONFIG_M5208EVB) := M5208EVB
44board-$(CONFIG_MOD5272) := MOD5272 46board-$(CONFIG_MOD5272) := MOD5272
45BOARD := $(board-y) 47BOARD := $(board-y)
46 48
@@ -56,6 +58,7 @@ MODEL := $(model-y)
56# 58#
57cpuclass-$(CONFIG_M5206) := 5307 59cpuclass-$(CONFIG_M5206) := 5307
58cpuclass-$(CONFIG_M5206e) := 5307 60cpuclass-$(CONFIG_M5206e) := 5307
61cpuclass-$(CONFIG_M520x) := 5307
59cpuclass-$(CONFIG_M523x) := 5307 62cpuclass-$(CONFIG_M523x) := 5307
60cpuclass-$(CONFIG_M5249) := 5307 63cpuclass-$(CONFIG_M5249) := 5307
61cpuclass-$(CONFIG_M527x) := 5307 64cpuclass-$(CONFIG_M527x) := 5307
@@ -80,6 +83,7 @@ export PLATFORM BOARD MODEL CPUCLASS
80# 83#
81cflags-$(CONFIG_M5206) := -m5200 -Wa,-S -Wa,-m5200 84cflags-$(CONFIG_M5206) := -m5200 -Wa,-S -Wa,-m5200
82cflags-$(CONFIG_M5206e) := -m5200 -Wa,-S -Wa,-m5200 85cflags-$(CONFIG_M5206e) := -m5200 -Wa,-S -Wa,-m5200
86cflags-$(CONFIG_M520x) := -m5307 -Wa,-S -Wa,-m5307
83cflags-$(CONFIG_M523x) := -m5307 -Wa,-S -Wa,-m5307 87cflags-$(CONFIG_M523x) := -m5307 -Wa,-S -Wa,-m5307
84cflags-$(CONFIG_M5249) := -m5200 -Wa,-S -Wa,-m5200 88cflags-$(CONFIG_M5249) := -m5200 -Wa,-S -Wa,-m5200
85cflags-$(CONFIG_M527x) := -m5307 -Wa,-S -Wa,-m5307 89cflags-$(CONFIG_M527x) := -m5307 -Wa,-S -Wa,-m5307
@@ -95,7 +99,6 @@ cflags-$(CONFIG_M68360) := -m68332
95AFLAGS += $(cflags-y) 99AFLAGS += $(cflags-y)
96 100
97CFLAGS += $(cflags-y) 101CFLAGS += $(cflags-y)
98CFLAGS += -fno-builtin
99CFLAGS += -O1 -g 102CFLAGS += -O1 -g
100CFLAGS += -D__linux__ 103CFLAGS += -D__linux__
101CFLAGS += -DUTS_SYSNAME=\"uClinux\" 104CFLAGS += -DUTS_SYSNAME=\"uClinux\"
diff --git a/arch/m68knommu/kernel/asm-offsets.c b/arch/m68knommu/kernel/asm-offsets.c
index cd3ffe12653e..b988c7bdc6e4 100644
--- a/arch/m68knommu/kernel/asm-offsets.c
+++ b/arch/m68knommu/kernel/asm-offsets.c
@@ -15,6 +15,7 @@
15#include <linux/hardirq.h> 15#include <linux/hardirq.h>
16#include <asm/bootinfo.h> 16#include <asm/bootinfo.h>
17#include <asm/irq.h> 17#include <asm/irq.h>
18#include <asm/irqnode.h>
18#include <asm/thread_info.h> 19#include <asm/thread_info.h>
19 20
20#define DEFINE(sym, val) \ 21#define DEFINE(sym, val) \
diff --git a/arch/m68knommu/kernel/ptrace.c b/arch/m68knommu/kernel/ptrace.c
index 621d7b91ccfe..262ab8c72e5f 100644
--- a/arch/m68knommu/kernel/ptrace.c
+++ b/arch/m68knommu/kernel/ptrace.c
@@ -101,43 +101,10 @@ void ptrace_disable(struct task_struct *child)
101 put_reg(child, PT_SR, tmp); 101 put_reg(child, PT_SR, tmp);
102} 102}
103 103
104asmlinkage long sys_ptrace(long request, long pid, long addr, long data) 104long arch_ptrace(truct task_struct *child, long request, long addr, long data)
105{ 105{
106 struct task_struct *child;
107 int ret; 106 int ret;
108 107
109 lock_kernel();
110 ret = -EPERM;
111 if (request == PTRACE_TRACEME) {
112 /* are we already being traced? */
113 if (current->ptrace & PT_PTRACED)
114 goto out;
115 /* set the ptrace bit in the process flags. */
116 current->ptrace |= PT_PTRACED;
117 ret = 0;
118 goto out;
119 }
120 ret = -ESRCH;
121 read_lock(&tasklist_lock);
122 child = find_task_by_pid(pid);
123 if (child)
124 get_task_struct(child);
125 read_unlock(&tasklist_lock);
126 if (!child)
127 goto out;
128
129 ret = -EPERM;
130 if (pid == 1) /* you may not mess with init */
131 goto out_tsk;
132
133 if (request == PTRACE_ATTACH) {
134 ret = ptrace_attach(child);
135 goto out_tsk;
136 }
137 ret = ptrace_check_attach(child, request == PTRACE_KILL);
138 if (ret < 0)
139 goto out_tsk;
140
141 switch (request) { 108 switch (request) {
142 /* when I and D space are separate, these will need to be fixed. */ 109 /* when I and D space are separate, these will need to be fixed. */
143 case PTRACE_PEEKTEXT: /* read word at location addr. */ 110 case PTRACE_PEEKTEXT: /* read word at location addr. */
@@ -357,10 +324,6 @@ asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
357 ret = -EIO; 324 ret = -EIO;
358 break; 325 break;
359 } 326 }
360out_tsk:
361 put_task_struct(child);
362out:
363 unlock_kernel();
364 return ret; 327 return ret;
365} 328}
366 329
diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c
index a220345e9746..abb80fa2b940 100644
--- a/arch/m68knommu/kernel/setup.c
+++ b/arch/m68knommu/kernel/setup.c
@@ -107,6 +107,9 @@ void (*mach_power_off)( void ) = NULL;
107#if defined(CONFIG_M5206e) 107#if defined(CONFIG_M5206e)
108 #define CPU "COLDFIRE(m5206e)" 108 #define CPU "COLDFIRE(m5206e)"
109#endif 109#endif
110#if defined(CONFIG_M520x)
111 #define CPU "COLDFIRE(m520x)"
112#endif
110#if defined(CONFIG_M523x) 113#if defined(CONFIG_M523x)
111 #define CPU "COLDFIRE(m523x)" 114 #define CPU "COLDFIRE(m523x)"
112#endif 115#endif
@@ -132,7 +135,7 @@ void (*mach_power_off)( void ) = NULL;
132 #define CPU "COLDFIRE(m5407)" 135 #define CPU "COLDFIRE(m5407)"
133#endif 136#endif
134#ifndef CPU 137#ifndef CPU
135 #define CPU "UNKOWN" 138 #define CPU "UNKNOWN"
136#endif 139#endif
137 140
138/* (es) */ 141/* (es) */
diff --git a/arch/m68knommu/kernel/vmlinux.lds.S b/arch/m68knommu/kernel/vmlinux.lds.S
index 47f06787190d..0eab92ca4b97 100644
--- a/arch/m68knommu/kernel/vmlinux.lds.S
+++ b/arch/m68knommu/kernel/vmlinux.lds.S
@@ -125,6 +125,14 @@
125#endif 125#endif
126 126
127/* 127/*
128 * The Freescale 5208EVB board has 32MB of RAM.
129 */
130#if defined(CONFIG_M5208EVB)
131#define RAM_START 0x40020000
132#define RAM_LENGTH 0x01e00000
133#endif
134
135/*
128 * The senTec COBRA5272 board has nearly the same memory layout as 136 * The senTec COBRA5272 board has nearly the same memory layout as
129 * the M5272C3. We assume 16MiB ram. 137 * the M5272C3. We assume 16MiB ram.
130 */ 138 */
@@ -275,6 +283,7 @@ SECTIONS {
275 *(__ksymtab_strings) 283 *(__ksymtab_strings)
276 284
277 /* Built-in module parameters */ 285 /* Built-in module parameters */
286 . = ALIGN(4) ;
278 __start___param = .; 287 __start___param = .;
279 *(__param) 288 *(__param)
280 __stop___param = .; 289 __stop___param = .;
diff --git a/arch/m68knommu/platform/520x/Makefile b/arch/m68knommu/platform/520x/Makefile
new file mode 100644
index 000000000000..e861b05106bc
--- /dev/null
+++ b/arch/m68knommu/platform/520x/Makefile
@@ -0,0 +1,19 @@
1#
2# Makefile for the M5208 specific file.
3#
4
5#
6# If you want to play with the HW breakpoints then you will
7# need to add define this, which will give you a stack backtrace
8# on the console port whenever a DBG interrupt occurs. You have to
9# set up you HW breakpoints to trigger a DBG interrupt:
10#
11# EXTRA_CFLAGS += -DTRAP_DBG_INTERRUPT
12# EXTRA_AFLAGS += -DTRAP_DBG_INTERRUPT
13#
14
15ifdef CONFIG_FULLDEBUG
16AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
17endif
18
19obj-y := config.o
diff --git a/arch/m68knommu/platform/520x/config.c b/arch/m68knommu/platform/520x/config.c
new file mode 100644
index 000000000000..71dea2e0f452
--- /dev/null
+++ b/arch/m68knommu/platform/520x/config.c
@@ -0,0 +1,65 @@
1/***************************************************************************/
2
3/*
4 * linux/arch/m68knommu/platform/520x/config.c
5 *
6 * Copyright (C) 2005, Freescale (www.freescale.com)
7 * Copyright (C) 2005, Intec Automation (mike@steroidmicros.com)
8 * Copyright (C) 1999-2003, Greg Ungerer (gerg@snapgear.com)
9 * Copyright (C) 2001-2003, SnapGear Inc. (www.snapgear.com)
10 */
11
12/***************************************************************************/
13
14#include <linux/config.h>
15#include <linux/kernel.h>
16#include <linux/param.h>
17#include <asm/machdep.h>
18#include <asm/dma.h>
19
20/***************************************************************************/
21
22/*
23 * DMA channel base address table.
24 */
25unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS];
26unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS];
27
28/***************************************************************************/
29
30void coldfire_pit_tick(void);
31void coldfire_pit_init(irqreturn_t (*handler)(int, void *, struct pt_regs *));
32unsigned long coldfire_pit_offset(void);
33void coldfire_trap_init(void);
34void coldfire_reset(void);
35
36/***************************************************************************/
37
38/*
39 * Program the vector to be an auto-vectored.
40 */
41
42void mcf_autovector(unsigned int vec)
43{
44 /* Everything is auto-vectored on the 520x devices */
45}
46
47/***************************************************************************/
48
49void config_BSP(char *commandp, int size)
50{
51#ifdef CONFIG_BOOTPARAM
52 strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
53 commandp[size-1] = 0;
54#else
55 memset(commandp, 0, size);
56#endif
57
58 mach_sched_init = coldfire_pit_init;
59 mach_tick = coldfire_pit_tick;
60 mach_gettimeoffset = coldfire_pit_offset;
61 mach_trap_init = coldfire_trap_init;
62 mach_reset = coldfire_reset;
63}
64
65/***************************************************************************/
diff --git a/arch/m68knommu/platform/5307/Makefile b/arch/m68knommu/platform/5307/Makefile
index 6fe5a2b8fb08..8d1619dc1ea6 100644
--- a/arch/m68knommu/platform/5307/Makefile
+++ b/arch/m68knommu/platform/5307/Makefile
@@ -19,6 +19,7 @@ endif
19obj-$(CONFIG_COLDFIRE) += entry.o vectors.o ints.o 19obj-$(CONFIG_COLDFIRE) += entry.o vectors.o ints.o
20obj-$(CONFIG_M5206) += timers.o 20obj-$(CONFIG_M5206) += timers.o
21obj-$(CONFIG_M5206e) += timers.o 21obj-$(CONFIG_M5206e) += timers.o
22obj-$(CONFIG_M520x) += pit.o
22obj-$(CONFIG_M523x) += pit.o 23obj-$(CONFIG_M523x) += pit.o
23obj-$(CONFIG_M5249) += timers.o 24obj-$(CONFIG_M5249) += timers.o
24obj-$(CONFIG_M527x) += pit.o 25obj-$(CONFIG_M527x) += pit.o
diff --git a/arch/m68knommu/platform/5307/head.S b/arch/m68knommu/platform/5307/head.S
index 7f4ba837901f..c30c462b99b1 100644
--- a/arch/m68knommu/platform/5307/head.S
+++ b/arch/m68knommu/platform/5307/head.S
@@ -113,6 +113,9 @@
113#define MEM_BASE 0x02000000 113#define MEM_BASE 0x02000000
114#define VBR_BASE 0x20000000 /* vectors in SRAM */ 114#define VBR_BASE 0x20000000 /* vectors in SRAM */
115#endif 115#endif
116#if defined(CONFIG_M5208EVB)
117#define MEM_BASE 0x40000000
118#endif
116 119
117#ifndef MEM_BASE 120#ifndef MEM_BASE
118#define MEM_BASE 0x00000000 /* memory base at address 0 */ 121#define MEM_BASE 0x00000000 /* memory base at address 0 */
diff --git a/arch/m68knommu/platform/5307/ints.c b/arch/m68knommu/platform/5307/ints.c
index 0117754d44f3..a134fb2f0566 100644
--- a/arch/m68knommu/platform/5307/ints.c
+++ b/arch/m68knommu/platform/5307/ints.c
@@ -26,6 +26,7 @@
26 26
27#include <asm/system.h> 27#include <asm/system.h>
28#include <asm/irq.h> 28#include <asm/irq.h>
29#include <asm/irqnode.h>
29#include <asm/traps.h> 30#include <asm/traps.h>
30#include <asm/page.h> 31#include <asm/page.h>
31#include <asm/machdep.h> 32#include <asm/machdep.h>
diff --git a/arch/m68knommu/platform/5307/pit.c b/arch/m68knommu/platform/5307/pit.c
index a9b2c2e7e280..323f2677e49d 100644
--- a/arch/m68knommu/platform/5307/pit.c
+++ b/arch/m68knommu/platform/5307/pit.c
@@ -3,7 +3,7 @@
3/* 3/*
4 * pit.c -- Motorola ColdFire PIT timer. Currently this type of 4 * pit.c -- Motorola ColdFire PIT timer. Currently this type of
5 * hardware timer only exists in the Motorola ColdFire 5 * hardware timer only exists in the Motorola ColdFire
6 * 5270/5271 and 5282 CPUs. 6 * 5270/5271, 5282 and other CPUs.
7 * 7 *
8 * Copyright (C) 1999-2004, Greg Ungerer (gerg@snapgear.com) 8 * Copyright (C) 1999-2004, Greg Ungerer (gerg@snapgear.com)
9 * Copyright (C) 2001-2004, SnapGear Inc. (www.snapgear.com) 9 * Copyright (C) 2001-2004, SnapGear Inc. (www.snapgear.com)
@@ -47,10 +47,10 @@ void coldfire_pit_init(irqreturn_t (*handler)(int, void *, struct pt_regs *))
47 47
48 icrp = (volatile unsigned char *) (MCF_IPSBAR + MCFICM_INTC0 + 48 icrp = (volatile unsigned char *) (MCF_IPSBAR + MCFICM_INTC0 +
49 MCFINTC_ICR0 + MCFINT_PIT1); 49 MCFINTC_ICR0 + MCFINT_PIT1);
50 *icrp = 0x2b; /* PIT1 with level 5, priority 3 */ 50 *icrp = ICR_INTRCONF;
51 51
52 imrp = (volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH); 52 imrp = (volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFPIT_IMR);
53 *imrp &= ~(1 << (MCFINT_PIT1 - 32)); 53 *imrp &= ~MCFPIT_IMR_IBIT;
54 54
55 /* Set up PIT timer 1 as poll clock */ 55 /* Set up PIT timer 1 as poll clock */
56 tp = (volatile struct mcfpit *) (MCF_IPSBAR + MCFPIT_BASE1); 56 tp = (volatile struct mcfpit *) (MCF_IPSBAR + MCFPIT_BASE1);
@@ -70,7 +70,7 @@ unsigned long coldfire_pit_offset(void)
70 unsigned long pmr, pcntr, offset; 70 unsigned long pmr, pcntr, offset;
71 71
72 tp = (volatile struct mcfpit *) (MCF_IPSBAR + MCFPIT_BASE1); 72 tp = (volatile struct mcfpit *) (MCF_IPSBAR + MCFPIT_BASE1);
73 ipr = (volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IPRH); 73 ipr = (volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFPIT_IMR);
74 74
75 pmr = *(&tp->pmr); 75 pmr = *(&tp->pmr);
76 pcntr = *(&tp->pcntr); 76 pcntr = *(&tp->pcntr);
@@ -80,7 +80,7 @@ unsigned long coldfire_pit_offset(void)
80 * timer interupt is pending, then add on a ticks worth of time. 80 * timer interupt is pending, then add on a ticks worth of time.
81 */ 81 */
82 offset = ((pmr - pcntr) * (1000000 / HZ)) / pmr; 82 offset = ((pmr - pcntr) * (1000000 / HZ)) / pmr;
83 if ((offset < (1000000 / HZ / 2)) && (*ipr & (1 << (MCFINT_PIT1 - 32)))) 83 if ((offset < (1000000 / HZ / 2)) && (*ipr & MCFPIT_IMR_IBIT))
84 offset += 1000000 / HZ; 84 offset += 1000000 / HZ;
85 return offset; 85 return offset;
86} 86}