diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/m68knommu/platform/5272 |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'arch/m68knommu/platform/5272')
-rw-r--r-- | arch/m68knommu/platform/5272/Makefile | 20 | ||||
-rw-r--r-- | arch/m68knommu/platform/5272/config.c | 145 |
2 files changed, 165 insertions, 0 deletions
diff --git a/arch/m68knommu/platform/5272/Makefile b/arch/m68knommu/platform/5272/Makefile new file mode 100644 index 000000000000..0871a29dd589 --- /dev/null +++ b/arch/m68knommu/platform/5272/Makefile | |||
@@ -0,0 +1,20 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
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 | |||
15 | ifdef CONFIG_FULLDEBUG | ||
16 | AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 | ||
17 | endif | ||
18 | |||
19 | obj-y := config.o | ||
20 | |||
diff --git a/arch/m68knommu/platform/5272/config.c b/arch/m68knommu/platform/5272/config.c new file mode 100644 index 000000000000..5cb28690f89a --- /dev/null +++ b/arch/m68knommu/platform/5272/config.c | |||
@@ -0,0 +1,145 @@ | |||
1 | /***************************************************************************/ | ||
2 | |||
3 | /* | ||
4 | * linux/arch/m68knommu/platform/5272/config.c | ||
5 | * | ||
6 | * Copyright (C) 1999-2002, Greg Ungerer (gerg@snapgear.com) | ||
7 | * Copyright (C) 2001-2002, SnapGear Inc. (www.snapgear.com) | ||
8 | */ | ||
9 | |||
10 | /***************************************************************************/ | ||
11 | |||
12 | #include <linux/config.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/sched.h> | ||
15 | #include <linux/param.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <asm/irq.h> | ||
19 | #include <asm/dma.h> | ||
20 | #include <asm/traps.h> | ||
21 | #include <asm/machdep.h> | ||
22 | #include <asm/coldfire.h> | ||
23 | #include <asm/mcftimer.h> | ||
24 | #include <asm/mcfsim.h> | ||
25 | #include <asm/mcfdma.h> | ||
26 | |||
27 | /***************************************************************************/ | ||
28 | |||
29 | void coldfire_tick(void); | ||
30 | void coldfire_timer_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); | ||
31 | unsigned long coldfire_timer_offset(void); | ||
32 | void coldfire_trap_init(void); | ||
33 | void coldfire_reset(void); | ||
34 | |||
35 | extern unsigned int mcf_timervector; | ||
36 | extern unsigned int mcf_profilevector; | ||
37 | extern unsigned int mcf_timerlevel; | ||
38 | |||
39 | /***************************************************************************/ | ||
40 | |||
41 | /* | ||
42 | * Some platforms need software versions of the GPIO data registers. | ||
43 | */ | ||
44 | unsigned short ppdata; | ||
45 | unsigned char ledbank = 0xff; | ||
46 | |||
47 | /***************************************************************************/ | ||
48 | |||
49 | /* | ||
50 | * DMA channel base address table. | ||
51 | */ | ||
52 | unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS] = { | ||
53 | MCF_MBAR + MCFDMA_BASE0, | ||
54 | }; | ||
55 | |||
56 | unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS]; | ||
57 | |||
58 | /***************************************************************************/ | ||
59 | |||
60 | void mcf_disableall(void) | ||
61 | { | ||
62 | volatile unsigned long *icrp; | ||
63 | |||
64 | icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1); | ||
65 | icrp[0] = 0x88888888; | ||
66 | icrp[1] = 0x88888888; | ||
67 | icrp[2] = 0x88888888; | ||
68 | icrp[3] = 0x88888888; | ||
69 | } | ||
70 | |||
71 | /***************************************************************************/ | ||
72 | |||
73 | void mcf_autovector(unsigned int vec) | ||
74 | { | ||
75 | /* Everything is auto-vectored on the 5272 */ | ||
76 | } | ||
77 | |||
78 | /***************************************************************************/ | ||
79 | |||
80 | void mcf_settimericr(int timer, int level) | ||
81 | { | ||
82 | volatile unsigned long *icrp; | ||
83 | |||
84 | if ((timer >= 1 ) && (timer <= 4)) { | ||
85 | icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1); | ||
86 | *icrp = (0x8 | level) << ((4 - timer) * 4); | ||
87 | } | ||
88 | } | ||
89 | |||
90 | /***************************************************************************/ | ||
91 | |||
92 | int mcf_timerirqpending(int timer) | ||
93 | { | ||
94 | volatile unsigned long *icrp; | ||
95 | |||
96 | if ((timer >= 1 ) && (timer <= 4)) { | ||
97 | icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1); | ||
98 | return (*icrp & (0x8 << ((4 - timer) * 4))); | ||
99 | } | ||
100 | return 0; | ||
101 | } | ||
102 | |||
103 | /***************************************************************************/ | ||
104 | |||
105 | void config_BSP(char *commandp, int size) | ||
106 | { | ||
107 | #if 0 | ||
108 | volatile unsigned long *pivrp; | ||
109 | |||
110 | /* Set base of device vectors to be 64 */ | ||
111 | pivrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_PIVR); | ||
112 | *pivrp = 0x40; | ||
113 | #endif | ||
114 | |||
115 | mcf_disableall(); | ||
116 | |||
117 | #if defined(CONFIG_BOOTPARAM) | ||
118 | strncpy(commandp, CONFIG_BOOTPARAM_STRING, size); | ||
119 | commandp[size-1] = 0; | ||
120 | #elif defined(CONFIG_NETtel) || defined(CONFIG_SCALES) | ||
121 | /* Copy command line from FLASH to local buffer... */ | ||
122 | memcpy(commandp, (char *) 0xf0004000, size); | ||
123 | commandp[size-1] = 0; | ||
124 | #elif defined(CONFIG_MTD_KeyTechnology) | ||
125 | /* Copy command line from FLASH to local buffer... */ | ||
126 | memcpy(commandp, (char *) 0xffe06000, size); | ||
127 | commandp[size-1] = 0; | ||
128 | #elif defined(CONFIG_CANCam) | ||
129 | /* Copy command line from FLASH to local buffer... */ | ||
130 | memcpy(commandp, (char *) 0xf0010000, size); | ||
131 | commandp[size-1] = 0; | ||
132 | #else | ||
133 | memset(commandp, 0, size); | ||
134 | #endif | ||
135 | |||
136 | mcf_timervector = 69; | ||
137 | mcf_profilevector = 70; | ||
138 | mach_sched_init = coldfire_timer_init; | ||
139 | mach_tick = coldfire_tick; | ||
140 | mach_gettimeoffset = coldfire_timer_offset; | ||
141 | mach_trap_init = coldfire_trap_init; | ||
142 | mach_reset = coldfire_reset; | ||
143 | } | ||
144 | |||
145 | /***************************************************************************/ | ||