Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu

Pull m68knommu updates from Greg Ungerer:
"This one has a major restructuring of the non-mmu 68000 support.

It merges all the related SoC types that use the original 68000 cpu
core internally so they can share the same core code. It also allows
for supporting the original stand alone 68000 cpu in its own right.

There is also a generalization of the clock support of the ColdFire
parts, some merging of common ColdFire code, and a couple of bug fixes
as well."

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
m68knommu: modify clock code so it can be used by all ColdFire CPU types
m68knommu: add clock definitions for 54xx ColdFire CPU types
m68knommu: add clock definitions for 5407 ColdFire CPU types
m68knommu: add clock definitions for 5307 ColdFire CPU types
m68knommu: add clock definitions for 528x ColdFire CPU types
m68knommu: add clock definitions for 527x ColdFire CPU types
m68knommu: add clock definitions for 5272 ColdFire CPU types
m68knommu: add clock definitions for 525x ColdFire CPU types
m68knommu: add clock definitions for 5249 ColdFire CPU types
m68knommu: add clock definitions for 523x ColdFire CPU types
m68knommu: add clock definitions for 5206 ColdFire CPU types
m68knommu: add clock creation support macro for other ColdFire CPUs
m68k: fix unused variable warning in mempcy.c
m68knommu: make non-MMU page_to_virt() return a void *
m68knommu: merge ColdFire 5249 and 525x definitions
m68knommu: disable MC68000 cpu target when MMU is selected
m68knommu: allow for configuration of true 68000 based systems
m68knommu: platform code merge for 68000 core cpus

+693 -984
+2 -1
arch/m68k/Kconfig.cpu
··· 35 35 if M68KCLASSIC 36 36 37 37 config M68000 38 - bool 38 + bool "MC68000" 39 + depends on !MMU 39 40 select CPU_HAS_NO_BITFIELDS 40 41 select CPU_HAS_NO_MULDIV64 41 42 select CPU_HAS_NO_UNALIGNED
+2 -4
arch/m68k/Makefile
··· 92 92 head-y := arch/m68k/kernel/head.o 93 93 head-$(CONFIG_SUN3) := arch/m68k/kernel/sun3-head.o 94 94 head-$(CONFIG_M68360) := arch/m68k/platform/68360/head.o 95 - head-$(CONFIG_M68000) := arch/m68k/platform/68328/head.o 95 + head-$(CONFIG_M68000) := arch/m68k/platform/68000/head.o 96 96 head-$(CONFIG_COLDFIRE) := arch/m68k/platform/coldfire/head.o 97 97 98 98 core-y += arch/m68k/kernel/ arch/m68k/mm/ ··· 114 114 core-$(CONFIG_M68060) += arch/m68k/ifpsp060/ 115 115 core-$(CONFIG_M68KFPU_EMU) += arch/m68k/math-emu/ 116 116 core-$(CONFIG_M68360) += arch/m68k/platform/68360/ 117 - core-$(CONFIG_M68000) += arch/m68k/platform/68328/ 118 - core-$(CONFIG_M68EZ328) += arch/m68k/platform/68EZ328/ 119 - core-$(CONFIG_M68VZ328) += arch/m68k/platform/68VZ328/ 117 + core-$(CONFIG_M68000) += arch/m68k/platform/68000/ 120 118 core-$(CONFIG_COLDFIRE) += arch/m68k/platform/coldfire/ 121 119 122 120
-269
arch/m68k/include/asm/m5249sim.h
··· 1 - /****************************************************************************/ 2 - 3 - /* 4 - * m5249sim.h -- ColdFire 5249 System Integration Module support. 5 - * 6 - * (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com) 7 - */ 8 - 9 - /****************************************************************************/ 10 - #ifndef m5249sim_h 11 - #define m5249sim_h 12 - /****************************************************************************/ 13 - 14 - #define CPU_NAME "COLDFIRE(m5249)" 15 - #define CPU_INSTR_PER_JIFFY 3 16 - #define MCF_BUSCLK (MCF_CLK / 2) 17 - 18 - #include <asm/m52xxacr.h> 19 - 20 - /* 21 - * The 5249 has a second MBAR region, define its address. 22 - */ 23 - #define MCF_MBAR2 0x80000000 24 - 25 - /* 26 - * Define the 5249 SIM register set addresses. 27 - */ 28 - #define MCFSIM_RSR (MCF_MBAR + 0x00) /* Reset Status */ 29 - #define MCFSIM_SYPCR (MCF_MBAR + 0x01) /* System Protection */ 30 - #define MCFSIM_SWIVR (MCF_MBAR + 0x02) /* SW Watchdog intr */ 31 - #define MCFSIM_SWSR (MCF_MBAR + 0x03) /* SW Watchdog srv */ 32 - #define MCFSIM_PAR (MCF_MBAR + 0x04) /* Pin Assignment */ 33 - #define MCFSIM_IRQPAR (MCF_MBAR + 0x06) /* Intr Assignment */ 34 - #define MCFSIM_MPARK (MCF_MBAR + 0x0C) /* BUS Master Ctrl */ 35 - #define MCFSIM_IPR (MCF_MBAR + 0x40) /* Interrupt Pending */ 36 - #define MCFSIM_IMR (MCF_MBAR + 0x44) /* Interrupt Mask */ 37 - #define MCFSIM_AVR (MCF_MBAR + 0x4b) /* Autovector Ctrl */ 38 - #define MCFSIM_ICR0 (MCF_MBAR + 0x4c) /* Intr Ctrl reg 0 */ 39 - #define MCFSIM_ICR1 (MCF_MBAR + 0x4d) /* Intr Ctrl reg 1 */ 40 - #define MCFSIM_ICR2 (MCF_MBAR + 0x4e) /* Intr Ctrl reg 2 */ 41 - #define MCFSIM_ICR3 (MCF_MBAR + 0x4f) /* Intr Ctrl reg 3 */ 42 - #define MCFSIM_ICR4 (MCF_MBAR + 0x50) /* Intr Ctrl reg 4 */ 43 - #define MCFSIM_ICR5 (MCF_MBAR + 0x51) /* Intr Ctrl reg 5 */ 44 - #define MCFSIM_ICR6 (MCF_MBAR + 0x52) /* Intr Ctrl reg 6 */ 45 - #define MCFSIM_ICR7 (MCF_MBAR + 0x53) /* Intr Ctrl reg 7 */ 46 - #define MCFSIM_ICR8 (MCF_MBAR + 0x54) /* Intr Ctrl reg 8 */ 47 - #define MCFSIM_ICR9 (MCF_MBAR + 0x55) /* Intr Ctrl reg 9 */ 48 - #define MCFSIM_ICR10 (MCF_MBAR + 0x56) /* Intr Ctrl reg 10 */ 49 - #define MCFSIM_ICR11 (MCF_MBAR + 0x57) /* Intr Ctrl reg 11 */ 50 - 51 - #define MCFSIM_CSAR0 (MCF_MBAR + 0x80) /* CS 0 Address reg */ 52 - #define MCFSIM_CSMR0 (MCF_MBAR + 0x84) /* CS 0 Mask reg */ 53 - #define MCFSIM_CSCR0 (MCF_MBAR + 0x8a) /* CS 0 Control reg */ 54 - #define MCFSIM_CSAR1 (MCF_MBAR + 0x8c) /* CS 1 Address reg */ 55 - #define MCFSIM_CSMR1 (MCF_MBAR + 0x90) /* CS 1 Mask reg */ 56 - #define MCFSIM_CSCR1 (MCF_MBAR + 0x96) /* CS 1 Control reg */ 57 - #define MCFSIM_CSAR2 (MCF_MBAR + 0x98) /* CS 2 Address reg */ 58 - #define MCFSIM_CSMR2 (MCF_MBAR + 0x9c) /* CS 2 Mask reg */ 59 - #define MCFSIM_CSCR2 (MCF_MBAR + 0xa2) /* CS 2 Control reg */ 60 - #define MCFSIM_CSAR3 (MCF_MBAR + 0xa4) /* CS 3 Address reg */ 61 - #define MCFSIM_CSMR3 (MCF_MBAR + 0xa8) /* CS 3 Mask reg */ 62 - #define MCFSIM_CSCR3 (MCF_MBAR + 0xae) /* CS 3 Control reg */ 63 - 64 - #define MCFSIM_DCR (MCF_MBAR + 0x100) /* DRAM Control */ 65 - #define MCFSIM_DACR0 (MCF_MBAR + 0x108) /* DRAM 0 Addr/Ctrl */ 66 - #define MCFSIM_DMR0 (MCF_MBAR + 0x10c) /* DRAM 0 Mask */ 67 - #define MCFSIM_DACR1 (MCF_MBAR + 0x110) /* DRAM 1 Addr/Ctrl */ 68 - #define MCFSIM_DMR1 (MCF_MBAR + 0x114) /* DRAM 1 Mask */ 69 - 70 - /* 71 - * Timer module. 72 - */ 73 - #define MCFTIMER_BASE1 (MCF_MBAR + 0x140) /* Base of TIMER1 */ 74 - #define MCFTIMER_BASE2 (MCF_MBAR + 0x180) /* Base of TIMER2 */ 75 - 76 - /* 77 - * UART module. 78 - */ 79 - #define MCFUART_BASE0 (MCF_MBAR + 0x1c0) /* Base address UART0 */ 80 - #define MCFUART_BASE1 (MCF_MBAR + 0x200) /* Base address UART1 */ 81 - 82 - /* 83 - * QSPI module. 84 - */ 85 - #define MCFQSPI_BASE (MCF_MBAR + 0x300) /* Base address QSPI */ 86 - #define MCFQSPI_SIZE 0x40 /* Register set size */ 87 - 88 - #define MCFQSPI_CS0 29 89 - #define MCFQSPI_CS1 24 90 - #define MCFQSPI_CS2 21 91 - #define MCFQSPI_CS3 22 92 - 93 - /* 94 - * DMA unit base addresses. 95 - */ 96 - #define MCFDMA_BASE0 (MCF_MBAR + 0x300) /* Base address DMA 0 */ 97 - #define MCFDMA_BASE1 (MCF_MBAR + 0x340) /* Base address DMA 1 */ 98 - #define MCFDMA_BASE2 (MCF_MBAR + 0x380) /* Base address DMA 2 */ 99 - #define MCFDMA_BASE3 (MCF_MBAR + 0x3C0) /* Base address DMA 3 */ 100 - 101 - /* 102 - * Some symbol defines for the above... 103 - */ 104 - #define MCFSIM_SWDICR MCFSIM_ICR0 /* Watchdog timer ICR */ 105 - #define MCFSIM_TIMER1ICR MCFSIM_ICR1 /* Timer 1 ICR */ 106 - #define MCFSIM_TIMER2ICR MCFSIM_ICR2 /* Timer 2 ICR */ 107 - #define MCFSIM_UART1ICR MCFSIM_ICR4 /* UART 1 ICR */ 108 - #define MCFSIM_UART2ICR MCFSIM_ICR5 /* UART 2 ICR */ 109 - #define MCFSIM_DMA0ICR MCFSIM_ICR6 /* DMA 0 ICR */ 110 - #define MCFSIM_DMA1ICR MCFSIM_ICR7 /* DMA 1 ICR */ 111 - #define MCFSIM_DMA2ICR MCFSIM_ICR8 /* DMA 2 ICR */ 112 - #define MCFSIM_DMA3ICR MCFSIM_ICR9 /* DMA 3 ICR */ 113 - #define MCFSIM_QSPIICR MCFSIM_ICR10 /* QSPI ICR */ 114 - 115 - /* 116 - * Define system peripheral IRQ usage. 117 - */ 118 - #define MCF_IRQ_QSPI 28 /* QSPI, Level 4 */ 119 - #define MCF_IRQ_TIMER 30 /* Timer0, Level 6 */ 120 - #define MCF_IRQ_PROFILER 31 /* Timer1, Level 7 */ 121 - 122 - #define MCF_IRQ_UART0 73 /* UART0 */ 123 - #define MCF_IRQ_UART1 74 /* UART1 */ 124 - 125 - /* 126 - * General purpose IO registers (in MBAR2). 127 - */ 128 - #define MCFSIM2_GPIOREAD (MCF_MBAR2 + 0x000) /* GPIO read values */ 129 - #define MCFSIM2_GPIOWRITE (MCF_MBAR2 + 0x004) /* GPIO write values */ 130 - #define MCFSIM2_GPIOENABLE (MCF_MBAR2 + 0x008) /* GPIO enabled */ 131 - #define MCFSIM2_GPIOFUNC (MCF_MBAR2 + 0x00C) /* GPIO function */ 132 - #define MCFSIM2_GPIO1READ (MCF_MBAR2 + 0x0B0) /* GPIO1 read values */ 133 - #define MCFSIM2_GPIO1WRITE (MCF_MBAR2 + 0x0B4) /* GPIO1 write values */ 134 - #define MCFSIM2_GPIO1ENABLE (MCF_MBAR2 + 0x0B8) /* GPIO1 enabled */ 135 - #define MCFSIM2_GPIO1FUNC (MCF_MBAR2 + 0x0BC) /* GPIO1 function */ 136 - 137 - #define MCFSIM2_GPIOINTSTAT (MCF_MBAR2 + 0xc0) /* GPIO intr status */ 138 - #define MCFSIM2_GPIOINTCLEAR (MCF_MBAR2 + 0xc0) /* GPIO intr clear */ 139 - #define MCFSIM2_GPIOINTENABLE (MCF_MBAR2 + 0xc4) /* GPIO intr enable */ 140 - 141 - #define MCFSIM2_INTLEVEL1 (MCF_MBAR2 + 0x140) /* Intr level reg 1 */ 142 - #define MCFSIM2_INTLEVEL2 (MCF_MBAR2 + 0x144) /* Intr level reg 2 */ 143 - #define MCFSIM2_INTLEVEL3 (MCF_MBAR2 + 0x148) /* Intr level reg 3 */ 144 - #define MCFSIM2_INTLEVEL4 (MCF_MBAR2 + 0x14c) /* Intr level reg 4 */ 145 - #define MCFSIM2_INTLEVEL5 (MCF_MBAR2 + 0x150) /* Intr level reg 5 */ 146 - #define MCFSIM2_INTLEVEL6 (MCF_MBAR2 + 0x154) /* Intr level reg 6 */ 147 - #define MCFSIM2_INTLEVEL7 (MCF_MBAR2 + 0x158) /* Intr level reg 7 */ 148 - #define MCFSIM2_INTLEVEL8 (MCF_MBAR2 + 0x15c) /* Intr level reg 8 */ 149 - 150 - #define MCFSIM2_DMAROUTE (MCF_MBAR2 + 0x188) /* DMA routing */ 151 - 152 - #define MCFSIM2_IDECONFIG1 (MCF_MBAR2 + 0x18c) /* IDEconfig1 */ 153 - #define MCFSIM2_IDECONFIG2 (MCF_MBAR2 + 0x190) /* IDEconfig2 */ 154 - 155 - /* 156 - * Define the base interrupt for the second interrupt controller. 157 - * We set it to 128, out of the way of the base interrupts, and plenty 158 - * of room for its 64 interrupts. 159 - */ 160 - #define MCFINTC2_VECBASE 128 161 - 162 - #define MCFINTC2_GPIOIRQ0 (MCFINTC2_VECBASE + 32) 163 - #define MCFINTC2_GPIOIRQ1 (MCFINTC2_VECBASE + 33) 164 - #define MCFINTC2_GPIOIRQ2 (MCFINTC2_VECBASE + 34) 165 - #define MCFINTC2_GPIOIRQ3 (MCFINTC2_VECBASE + 35) 166 - #define MCFINTC2_GPIOIRQ4 (MCFINTC2_VECBASE + 36) 167 - #define MCFINTC2_GPIOIRQ5 (MCFINTC2_VECBASE + 37) 168 - #define MCFINTC2_GPIOIRQ6 (MCFINTC2_VECBASE + 38) 169 - #define MCFINTC2_GPIOIRQ7 (MCFINTC2_VECBASE + 39) 170 - 171 - /* 172 - * Generic GPIO support 173 - */ 174 - #define MCFGPIO_PIN_MAX 64 175 - #define MCFGPIO_IRQ_MAX -1 176 - #define MCFGPIO_IRQ_VECBASE -1 177 - 178 - /****************************************************************************/ 179 - 180 - #ifdef __ASSEMBLER__ 181 - 182 - /* 183 - * The M5249C3 board needs a little help getting all its SIM devices 184 - * initialized at kernel start time. dBUG doesn't set much up, so 185 - * we need to do it manually. 186 - */ 187 - .macro m5249c3_setup 188 - /* 189 - * Set MBAR1 and MBAR2, just incase they are not set. 190 - */ 191 - movel #0x10000001,%a0 192 - movec %a0,%MBAR /* map MBAR region */ 193 - subql #1,%a0 /* get MBAR address in a0 */ 194 - 195 - movel #0x80000001,%a1 196 - movec %a1,#3086 /* map MBAR2 region */ 197 - subql #1,%a1 /* get MBAR2 address in a1 */ 198 - 199 - /* 200 - * Move secondary interrupts to their base (128). 201 - */ 202 - moveb #MCFINTC2_VECBASE,%d0 203 - moveb %d0,0x16b(%a1) /* interrupt base register */ 204 - 205 - /* 206 - * Work around broken CSMR0/DRAM vector problem. 207 - */ 208 - movel #0x001F0021,%d0 /* disable C/I bit */ 209 - movel %d0,0x84(%a0) /* set CSMR0 */ 210 - 211 - /* 212 - * Disable the PLL firstly. (Who knows what state it is 213 - * in here!). 214 - */ 215 - movel 0x180(%a1),%d0 /* get current PLL value */ 216 - andl #0xfffffffe,%d0 /* PLL bypass first */ 217 - movel %d0,0x180(%a1) /* set PLL register */ 218 - nop 219 - 220 - #if CONFIG_CLOCK_FREQ == 140000000 221 - /* 222 - * Set initial clock frequency. This assumes M5249C3 board 223 - * is fitted with 11.2896MHz crystal. It will program the 224 - * PLL for 140MHz. Lets go fast :-) 225 - */ 226 - movel #0x125a40f0,%d0 /* set for 140MHz */ 227 - movel %d0,0x180(%a1) /* set PLL register */ 228 - orl #0x1,%d0 229 - movel %d0,0x180(%a1) /* set PLL register */ 230 - #endif 231 - 232 - /* 233 - * Setup CS1 for ethernet controller. 234 - * (Setup as per M5249C3 doco). 235 - */ 236 - movel #0xe0000000,%d0 /* CS1 mapped at 0xe0000000 */ 237 - movel %d0,0x8c(%a0) 238 - movel #0x001f0021,%d0 /* CS1 size of 1Mb */ 239 - movel %d0,0x90(%a0) 240 - movew #0x0080,%d0 /* CS1 = 16bit port, AA */ 241 - movew %d0,0x96(%a0) 242 - 243 - /* 244 - * Setup CS2 for IDE interface. 245 - */ 246 - movel #0x50000000,%d0 /* CS2 mapped at 0x50000000 */ 247 - movel %d0,0x98(%a0) 248 - movel #0x001f0001,%d0 /* CS2 size of 1MB */ 249 - movel %d0,0x9c(%a0) 250 - movew #0x0080,%d0 /* CS2 = 16bit, TA */ 251 - movew %d0,0xa2(%a0) 252 - 253 - movel #0x00107000,%d0 /* IDEconfig1 */ 254 - movel %d0,0x18c(%a1) 255 - movel #0x000c0400,%d0 /* IDEconfig2 */ 256 - movel %d0,0x190(%a1) 257 - 258 - movel #0x00080000,%d0 /* GPIO19, IDE reset bit */ 259 - orl %d0,0xc(%a1) /* function GPIO19 */ 260 - orl %d0,0x8(%a1) /* enable GPIO19 as output */ 261 - orl %d0,0x4(%a1) /* de-assert IDE reset */ 262 - .endm 263 - 264 - #define PLATFORM_SETUP m5249c3_setup 265 - 266 - #endif /* __ASSEMBLER__ */ 267 - 268 - /****************************************************************************/ 269 - #endif /* m5249sim_h */
+115 -1
arch/m68k/include/asm/m525xsim.h
··· 12 12 #define m525xsim_h 13 13 /****************************************************************************/ 14 14 15 + /* 16 + * This header supports ColdFire 5249, 5251 and 5253. There are a few 17 + * little differences between them, but most of the peripheral support 18 + * can be used by all of them. 19 + */ 15 20 #define CPU_NAME "COLDFIRE(m525x)" 16 21 #define CPU_INSTR_PER_JIFFY 3 17 22 #define MCF_BUSCLK (MCF_CLK / 2) ··· 70 65 #define MCFSIM_DCR (MCF_MBAR + 0x100) /* DRAM Control */ 71 66 #define MCFSIM_DACR0 (MCF_MBAR + 0x108) /* DRAM 0 Addr/Ctrl */ 72 67 #define MCFSIM_DMR0 (MCF_MBAR + 0x10c) /* DRAM 0 Mask */ 68 + #define MCFSIM_DACR1 (MCF_MBAR + 0x110) /* DRAM 1 Addr/Ctrl */ 69 + #define MCFSIM_DMR1 (MCF_MBAR + 0x114) /* DRAM 1 Mask */ 73 70 74 71 /* 75 72 * Secondary Interrupt Controller (in MBAR2) ··· 108 101 #define MCFQSPI_BASE (MCF_MBAR + 0x300) /* Base address QSPI */ 109 102 #define MCFQSPI_SIZE 0x40 /* Register set size */ 110 103 111 - 104 + #ifdef CONFIG_M5249 105 + #define MCFQSPI_CS0 29 106 + #define MCFQSPI_CS1 24 107 + #define MCFQSPI_CS2 21 108 + #define MCFQSPI_CS3 22 109 + #else 112 110 #define MCFQSPI_CS0 15 113 111 #define MCFQSPI_CS1 16 114 112 #define MCFQSPI_CS2 24 115 113 #define MCFQSPI_CS3 28 114 + #endif 116 115 117 116 /* 118 117 * I2C module. ··· 128 115 129 116 #define MCFI2C_BASE1 (MCF_MBAR2 + 0x440) /* Base addreess I2C1 */ 130 117 #define MCFI2C_SIZE1 0x20 /* Register set size */ 118 + 131 119 /* 132 120 * DMA unit base addresses. 133 121 */ ··· 177 163 #define MCF_IRQ_GPIO4 (MCFINTC2_VECBASE + 36) 178 164 #define MCF_IRQ_GPIO5 (MCFINTC2_VECBASE + 37) 179 165 #define MCF_IRQ_GPIO6 (MCFINTC2_VECBASE + 38) 166 + #define MCF_IRQ_GPIO7 (MCFINTC2_VECBASE + 39) 180 167 181 168 #define MCF_IRQ_USBWUP (MCFINTC2_VECBASE + 40) 182 169 #define MCF_IRQ_I2C1 (MCFINTC2_VECBASE + 62) ··· 198 183 #define MCFSIM2_GPIOINTCLEAR (MCF_MBAR2 + 0xc0) /* GPIO intr clear */ 199 184 #define MCFSIM2_GPIOINTENABLE (MCF_MBAR2 + 0xc4) /* GPIO intr enable */ 200 185 186 + #define MCFSIM2_DMAROUTE (MCF_MBAR2 + 0x188) /* DMA routing */ 187 + #define MCFSIM2_IDECONFIG1 (MCF_MBAR2 + 0x18c) /* IDEconfig1 */ 188 + #define MCFSIM2_IDECONFIG2 (MCF_MBAR2 + 0x190) /* IDEconfig2 */ 189 + 201 190 /* 202 191 * Generic GPIO support 203 192 */ 204 193 #define MCFGPIO_PIN_MAX 64 194 + #ifdef CONFIG_M5249 195 + #define MCFGPIO_IRQ_MAX -1 196 + #define MCFGPIO_IRQ_VECBASE -1 197 + #else 205 198 #define MCFGPIO_IRQ_MAX 7 206 199 #define MCFGPIO_IRQ_VECBASE MCF_IRQ_GPIO0 200 + #endif 207 201 202 + /****************************************************************************/ 203 + 204 + #ifdef __ASSEMBLER__ 205 + #ifdef CONFIG_M5249C3 206 + /* 207 + * The M5249C3 board needs a little help getting all its SIM devices 208 + * initialized at kernel start time. dBUG doesn't set much up, so 209 + * we need to do it manually. 210 + */ 211 + .macro m5249c3_setup 212 + /* 213 + * Set MBAR1 and MBAR2, just incase they are not set. 214 + */ 215 + movel #0x10000001,%a0 216 + movec %a0,%MBAR /* map MBAR region */ 217 + subql #1,%a0 /* get MBAR address in a0 */ 218 + 219 + movel #0x80000001,%a1 220 + movec %a1,#3086 /* map MBAR2 region */ 221 + subql #1,%a1 /* get MBAR2 address in a1 */ 222 + 223 + /* 224 + * Move secondary interrupts to their base (128). 225 + */ 226 + moveb #MCFINTC2_VECBASE,%d0 227 + moveb %d0,0x16b(%a1) /* interrupt base register */ 228 + 229 + /* 230 + * Work around broken CSMR0/DRAM vector problem. 231 + */ 232 + movel #0x001F0021,%d0 /* disable C/I bit */ 233 + movel %d0,0x84(%a0) /* set CSMR0 */ 234 + 235 + /* 236 + * Disable the PLL firstly. (Who knows what state it is 237 + * in here!). 238 + */ 239 + movel 0x180(%a1),%d0 /* get current PLL value */ 240 + andl #0xfffffffe,%d0 /* PLL bypass first */ 241 + movel %d0,0x180(%a1) /* set PLL register */ 242 + nop 243 + 244 + #if CONFIG_CLOCK_FREQ == 140000000 245 + /* 246 + * Set initial clock frequency. This assumes M5249C3 board 247 + * is fitted with 11.2896MHz crystal. It will program the 248 + * PLL for 140MHz. Lets go fast :-) 249 + */ 250 + movel #0x125a40f0,%d0 /* set for 140MHz */ 251 + movel %d0,0x180(%a1) /* set PLL register */ 252 + orl #0x1,%d0 253 + movel %d0,0x180(%a1) /* set PLL register */ 254 + #endif 255 + 256 + /* 257 + * Setup CS1 for ethernet controller. 258 + * (Setup as per M5249C3 doco). 259 + */ 260 + movel #0xe0000000,%d0 /* CS1 mapped at 0xe0000000 */ 261 + movel %d0,0x8c(%a0) 262 + movel #0x001f0021,%d0 /* CS1 size of 1Mb */ 263 + movel %d0,0x90(%a0) 264 + movew #0x0080,%d0 /* CS1 = 16bit port, AA */ 265 + movew %d0,0x96(%a0) 266 + 267 + /* 268 + * Setup CS2 for IDE interface. 269 + */ 270 + movel #0x50000000,%d0 /* CS2 mapped at 0x50000000 */ 271 + movel %d0,0x98(%a0) 272 + movel #0x001f0001,%d0 /* CS2 size of 1MB */ 273 + movel %d0,0x9c(%a0) 274 + movew #0x0080,%d0 /* CS2 = 16bit, TA */ 275 + movew %d0,0xa2(%a0) 276 + 277 + movel #0x00107000,%d0 /* IDEconfig1 */ 278 + movel %d0,0x18c(%a1) 279 + movel #0x000c0400,%d0 /* IDEconfig2 */ 280 + movel %d0,0x190(%a1) 281 + 282 + movel #0x00080000,%d0 /* GPIO19, IDE reset bit */ 283 + orl %d0,0xc(%a1) /* function GPIO19 */ 284 + orl %d0,0x8(%a1) /* enable GPIO19 as output */ 285 + orl %d0,0x4(%a1) /* de-assert IDE reset */ 286 + .endm 287 + 288 + #define PLATFORM_SETUP m5249c3_setup 289 + 290 + #endif /* CONFIG_M5249C3 */ 291 + #endif /* __ASSEMBLER__ */ 208 292 /****************************************************************************/ 209 293 #endif /* m525xsim_h */
+8 -1
arch/m68k/include/asm/mcfclk.h
··· 8 8 9 9 struct clk; 10 10 11 - #ifdef MCFPM_PPMCR0 12 11 struct clk_ops { 13 12 void (*enable)(struct clk *); 14 13 void (*disable)(struct clk *); ··· 22 23 }; 23 24 24 25 extern struct clk *mcf_clks[]; 26 + 27 + #ifdef MCFPM_PPMCR0 25 28 extern struct clk_ops clk_ops0; 26 29 #ifdef MCFPM_PPMCR1 27 30 extern struct clk_ops clk_ops1; ··· 39 38 40 39 void __clk_init_enabled(struct clk *); 41 40 void __clk_init_disabled(struct clk *); 41 + #else 42 + #define DEFINE_CLK(clk_ref, clk_name, clk_rate) \ 43 + static struct clk clk_##clk_ref = { \ 44 + .name = clk_name, \ 45 + .rate = clk_rate, \ 46 + } 42 47 #endif /* MCFPM_PPMCR0 */ 43 48 44 49 #endif /* mcfclk_h */
+1 -4
arch/m68k/include/asm/mcfsim.h
··· 24 24 #elif defined(CONFIG_M523x) 25 25 #include <asm/m523xsim.h> 26 26 #include <asm/mcfintc.h> 27 - #elif defined(CONFIG_M5249) 28 - #include <asm/m5249sim.h> 29 - #include <asm/mcfintc.h> 30 - #elif defined(CONFIG_M525x) 27 + #elif defined(CONFIG_M5249) || defined(CONFIG_M525x) 31 28 #include <asm/m525xsim.h> 32 29 #include <asm/mcfintc.h> 33 30 #elif defined(CONFIG_M527x)
+1 -1
arch/m68k/include/asm/page_no.h
··· 26 26 #define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT) 27 27 28 28 #define virt_to_page(addr) (mem_map + (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT)) 29 - #define page_to_virt(page) ((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET) 29 + #define page_to_virt(page) __va(((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET)) 30 30 31 31 #define pfn_to_page(pfn) virt_to_page(pfn_to_virt(pfn)) 32 32 #define page_to_pfn(page) virt_to_pfn(page_to_virt(page))
+2 -1
arch/m68k/lib/memcpy.c
··· 10 10 void *memcpy(void *to, const void *from, size_t n) 11 11 { 12 12 void *xto = to; 13 - size_t temp, temp1; 13 + size_t temp; 14 14 15 15 if (!n) 16 16 return xto; ··· 47 47 for (; temp; temp--) 48 48 *lto++ = *lfrom++; 49 49 #else 50 + size_t temp1; 50 51 asm volatile ( 51 52 " movel %2,%3\n" 52 53 " andw #7,%3\n"
+18
arch/m68k/platform/68000/Makefile
··· 1 + ################################################## 2 + # 3 + # Makefile for 68000 core based cpus 4 + # 5 + # 2012.10.21, Luis Alves <ljalvs@gmail.com> 6 + # Merged all 68000 based cpu's config 7 + # files into a single directory. 8 + # 9 + 10 + # 68328, 68EZ328, 68VZ328 11 + 12 + obj-y += entry.o ints.o timers.o 13 + obj-$(CONFIG_M68328) += m68328.o 14 + obj-$(CONFIG_M68EZ328) += m68EZ328.o 15 + obj-$(CONFIG_M68VZ328) += m68VZ328.o 16 + obj-$(CONFIG_ROM) += romvec.o 17 + 18 + extra-y := head.o
+240
arch/m68k/platform/68000/head.S
··· 1 + /* 2 + * head.S - Common startup code for 68000 core based CPU's 3 + * 4 + * 2012.10.21, Luis Alves <ljalvs@gmail.com>, Single head.S file for all 5 + * 68000 core based CPU's. Based on the sources from: 6 + * Coldfire by Greg Ungerer <gerg@snapgear.com> 7 + * 68328 by D. Jeff Dionne <jeff@ryeham.ee.ryerson.ca>, 8 + * Kenneth Albanowski <kjahds@kjahds.com>, 9 + * The Silver Hammer Group, Ltd. 10 + * 11 + */ 12 + 13 + #include <linux/linkage.h> 14 + #include <linux/init.h> 15 + #include <asm/asm-offsets.h> 16 + #include <asm/thread_info.h> 17 + 18 + 19 + /***************************************************************************** 20 + * UCSIMM and UCDIMM use CONFIG_MEMORY_RESERVE to reserve some RAM 21 + *****************************************************************************/ 22 + #ifdef CONFIG_MEMORY_RESERVE 23 + #define RAMEND (CONFIG_RAMBASE+CONFIG_RAMSIZE)-(CONFIG_MEMORY_RESERVE*0x100000) 24 + #else 25 + #define RAMEND (CONFIG_RAMBASE+CONFIG_RAMSIZE) 26 + #endif 27 + /*****************************************************************************/ 28 + 29 + .global _start 30 + .global _rambase 31 + .global _ramvec 32 + .global _ramstart 33 + .global _ramend 34 + 35 + #if defined(CONFIG_PILOT) || defined(CONFIG_INIT_LCD) 36 + .global bootlogo_bits 37 + #endif 38 + 39 + /* Defining DEBUG_HEAD_CODE, serial port in 68x328 is inited */ 40 + /* #define DEBUG_HEAD_CODE */ 41 + #undef DEBUG_HEAD_CODE 42 + 43 + .data 44 + 45 + /***************************************************************************** 46 + * RAM setup pointers. Used by the kernel to determine RAM location and size. 47 + *****************************************************************************/ 48 + 49 + _rambase: 50 + .long 0 51 + _ramvec: 52 + .long 0 53 + _ramstart: 54 + .long 0 55 + _ramend: 56 + .long 0 57 + 58 + __HEAD 59 + 60 + /***************************************************************************** 61 + * Entry point, where all begins! 62 + *****************************************************************************/ 63 + 64 + _start: 65 + 66 + /* Pilot need this specific signature at the start of ROM */ 67 + #ifdef CONFIG_PILOT 68 + .byte 0x4e, 0xfa, 0x00, 0x0a /* bra opcode (jmp 10 bytes) */ 69 + .byte 'b', 'o', 'o', 't' 70 + .word 10000 71 + nop 72 + moveq #0, %d0 73 + movew %d0, 0xfffff618 /* Watchdog off */ 74 + movel #0x00011f07, 0xfffff114 /* CS A1 Mask */ 75 + #endif /* CONFIG_PILOT */ 76 + 77 + movew #0x2700, %sr /* disable all interrupts */ 78 + 79 + /***************************************************************************** 80 + * Setup PLL and wait for it to settle (in 68x328 cpu's). 81 + * Also, if enabled, init serial port. 82 + *****************************************************************************/ 83 + #if defined(CONFIG_M68328) || \ 84 + defined(CONFIG_M68EZ328) || \ 85 + defined(CONFIG_M68VZ328) 86 + 87 + /* Serial port setup. Should only be needed if debugging this startup code. */ 88 + #ifdef DEBUG_HEAD_CODE 89 + movew #0x0800, 0xfffff906 /* Ignore CTS */ 90 + movew #0x010b, 0xfffff902 /* BAUD to 9600 */ 91 + movew #0xe100, 0xfffff900 /* enable */ 92 + #endif /* DEBUG_HEAD */ 93 + 94 + #ifdef CONFIG_PILOT 95 + movew #0x2410, 0xfffff200 /* PLLCR */ 96 + #else 97 + movew #0x2400, 0xfffff200 /* PLLCR */ 98 + #endif 99 + movew #0x0123, 0xfffff202 /* PLLFSR */ 100 + moveq #0, %d0 101 + movew #16384, %d0 /* PLL settle wait loop */ 102 + _pll_settle: 103 + subw #1, %d0 104 + bne _pll_settle 105 + #endif /* CONFIG_M68x328 */ 106 + 107 + 108 + /***************************************************************************** 109 + * If running kernel from ROM some specific initialization has to be done. 110 + * (Assuming that everything is already init'ed when running from RAM) 111 + *****************************************************************************/ 112 + #ifdef CONFIG_ROMKERNEL 113 + 114 + /***************************************************************************** 115 + * Init chip registers (uCsimm specific) 116 + *****************************************************************************/ 117 + #ifdef CONFIG_UCSIMM 118 + moveb #0x00, 0xfffffb0b /* Watchdog off */ 119 + moveb #0x10, 0xfffff000 /* SCR */ 120 + moveb #0x00, 0xfffff40b /* enable chip select */ 121 + moveb #0x00, 0xfffff423 /* enable /DWE */ 122 + moveb #0x08, 0xfffffd0d /* disable hardmap */ 123 + moveb #0x07, 0xfffffd0e /* level 7 interrupt clear */ 124 + movew #0x8600, 0xfffff100 /* FLASH at 0x10c00000 */ 125 + movew #0x018b, 0xfffff110 /* 2Meg, enable, 0ws */ 126 + movew #0x8f00, 0xfffffc00 /* DRAM configuration */ 127 + movew #0x9667, 0xfffffc02 /* DRAM control */ 128 + movew #0x0000, 0xfffff106 /* DRAM at 0x00000000 */ 129 + movew #0x068f, 0xfffff116 /* 8Meg, enable, 0ws */ 130 + moveb #0x40, 0xfffff300 /* IVR */ 131 + movel #0x007FFFFF, %d0 /* IMR */ 132 + movel %d0, 0xfffff304 133 + moveb 0xfffff42b, %d0 134 + andb #0xe0, %d0 135 + moveb %d0, 0xfffff42b 136 + #endif 137 + 138 + /***************************************************************************** 139 + * Init LCD controller. 140 + * (Assuming that LCD controller is already init'ed when running from RAM) 141 + *****************************************************************************/ 142 + #ifdef CONFIG_INIT_LCD 143 + #ifdef CONFIG_PILOT 144 + moveb #0, 0xfffffA27 /* LCKCON */ 145 + movel #_start, 0xfffffA00 /* LSSA */ 146 + moveb #0xa, 0xfffffA05 /* LVPW */ 147 + movew #0x9f, 0xFFFFFa08 /* LXMAX */ 148 + movew #0x9f, 0xFFFFFa0a /* LYMAX */ 149 + moveb #9, 0xfffffa29 /* LBAR */ 150 + moveb #0, 0xfffffa25 /* LPXCD */ 151 + moveb #0x04, 0xFFFFFa20 /* LPICF */ 152 + moveb #0x58, 0xfffffA27 /* LCKCON */ 153 + moveb #0x85, 0xfffff429 /* PFDATA */ 154 + moveb #0xd8, 0xfffffA27 /* LCKCON */ 155 + moveb #0xc5, 0xfffff429 /* PFDATA */ 156 + moveb #0xd5, 0xfffff429 /* PFDATA */ 157 + movel #bootlogo_bits, 0xFFFFFA00 /* LSSA */ 158 + moveb #10, 0xFFFFFA05 /* LVPW */ 159 + movew #160, 0xFFFFFA08 /* LXMAX */ 160 + movew #160, 0xFFFFFA0A /* LYMAX */ 161 + #else /* CONFIG_PILOT */ 162 + movel #bootlogo_bits, 0xfffffA00 /* LSSA */ 163 + moveb #0x28, 0xfffffA05 /* LVPW */ 164 + movew #0x280, 0xFFFFFa08 /* LXMAX */ 165 + movew #0x1df, 0xFFFFFa0a /* LYMAX */ 166 + moveb #0, 0xfffffa29 /* LBAR */ 167 + moveb #0, 0xfffffa25 /* LPXCD */ 168 + moveb #0x08, 0xFFFFFa20 /* LPICF */ 169 + moveb #0x01, 0xFFFFFA21 /* -ve pol */ 170 + moveb #0x81, 0xfffffA27 /* LCKCON */ 171 + movew #0xff00, 0xfffff412 /* LCD pins */ 172 + #endif /* CONFIG_PILOT */ 173 + #endif /* CONFIG_INIT_LCD */ 174 + 175 + /***************************************************************************** 176 + * Kernel is running from FLASH/ROM (XIP) 177 + * Copy init text & data to RAM 178 + *****************************************************************************/ 179 + moveal #_etext, %a0 180 + moveal #_sdata, %a1 181 + moveal #__bss_start, %a2 182 + _copy_initmem: 183 + movel %a0@+, %a1@+ 184 + cmpal %a1, %a2 185 + bhi _copy_initmem 186 + #endif /* CONFIG_ROMKERNEL */ 187 + 188 + /***************************************************************************** 189 + * Setup basic memory information for kernel 190 + *****************************************************************************/ 191 + movel #CONFIG_VECTORBASE,_ramvec /* set vector base location */ 192 + movel #CONFIG_RAMBASE,_rambase /* set the base of RAM */ 193 + movel #RAMEND, _ramend /* set end ram addr */ 194 + lea __bss_stop,%a1 195 + movel %a1,_ramstart 196 + 197 + /***************************************************************************** 198 + * If the kernel is in RAM, move romfs to right above bss and 199 + * adjust _ramstart to where romfs ends. 200 + * 201 + * (Do this only if CONFIG_MTD_UCLINUX is true) 202 + *****************************************************************************/ 203 + 204 + #if defined(CONFIG_ROMFS_FS) && defined(CONFIG_RAMKERNEL) && \ 205 + defined(CONFIG_MTD_UCLINUX) 206 + lea __bss_start, %a0 /* get start of bss */ 207 + lea __bss_stop, %a1 /* set up destination */ 208 + movel %a0, %a2 /* copy of bss start */ 209 + 210 + movel 8(%a0), %d0 /* get size of ROMFS */ 211 + addql #8, %d0 /* allow for rounding */ 212 + andl #0xfffffffc, %d0 /* whole words */ 213 + 214 + addl %d0, %a0 /* copy from end */ 215 + addl %d0, %a1 /* copy from end */ 216 + movel %a1, _ramstart /* set start of ram */ 217 + _copy_romfs: 218 + movel -(%a0), -(%a1) /* copy dword */ 219 + cmpl %a0, %a2 /* check if at end */ 220 + bne _copy_romfs 221 + #endif /* CONFIG_ROMFS_FS && CONFIG_RAMKERNEL && CONFIG_MTD_UCLINUX */ 222 + 223 + /***************************************************************************** 224 + * Clear bss region 225 + *****************************************************************************/ 226 + lea __bss_start, %a0 /* get start of bss */ 227 + lea __bss_stop, %a1 /* get end of bss */ 228 + _clear_bss: 229 + movel #0, (%a0)+ /* clear each word */ 230 + cmpl %a0, %a1 /* check if at end */ 231 + bne _clear_bss 232 + 233 + /***************************************************************************** 234 + * Load the current task pointer and stack. 235 + *****************************************************************************/ 236 + lea init_thread_union,%a0 237 + lea THREAD_SIZE(%a0),%sp 238 + jsr start_kernel /* start Linux kernel */ 239 + _exit: 240 + jmp _exit /* should never get here */
-21
arch/m68k/platform/68328/Makefile
··· 1 - # 2 - # Makefile for arch/m68knommu/platform/68328. 3 - # 4 - 5 - model-y := ram 6 - model-$(CONFIG_ROMKERNEL) := rom 7 - 8 - head-y = head-$(model-y).o 9 - head-$(CONFIG_PILOT) = head-pilot.o 10 - head-$(CONFIG_DRAGEN2) = head-de2.o 11 - 12 - obj-y += entry.o ints.o timers.o 13 - obj-$(CONFIG_M68328) += config.o 14 - obj-$(CONFIG_ROM) += romvec.o 15 - 16 - extra-y := head.o 17 - 18 - $(obj)/head.o: $(obj)/$(head-y) 19 - ln -sf $(head-y) $(obj)/head.o 20 - 21 - clean-files := $(obj)/head.o $(head-y)
arch/m68k/platform/68328/bootlogo.h arch/m68k/platform/68000/bootlogo.h
+1 -1
arch/m68k/platform/68328/config.c arch/m68k/platform/68000/m68328.c
··· 1 1 /***************************************************************************/ 2 2 3 3 /* 4 - * linux/arch/m68knommu/platform/68328/config.c 4 + * m68328.c - 68328 specific config 5 5 * 6 6 * Copyright (C) 1993 Hamish Macdonald 7 7 * Copyright (C) 1999 D. Jeff Dionne
arch/m68k/platform/68328/entry.S arch/m68k/platform/68000/entry.S
-128
arch/m68k/platform/68328/head-de2.S
··· 1 - 2 - #define MEM_END 0x00800000 /* Memory size 8Mb */ 3 - 4 - #undef CRT_DEBUG 5 - 6 - .macro PUTC CHAR 7 - #ifdef CRT_DEBUG 8 - moveq #\CHAR, %d7 9 - jsr putc 10 - #endif 11 - .endm 12 - 13 - .global _start 14 - .global _rambase 15 - .global _ramvec 16 - .global _ramstart 17 - .global _ramend 18 - 19 - .data 20 - 21 - /* 22 - * Set up the usable of RAM stuff 23 - */ 24 - _rambase: 25 - .long 0 26 - _ramvec: 27 - .long 0 28 - _ramstart: 29 - .long 0 30 - _ramend: 31 - .long 0 32 - 33 - .text 34 - 35 - _start: 36 - 37 - /* 38 - * Setup initial stack 39 - */ 40 - /* disable all interrupts */ 41 - movew #0x2700, %sr 42 - movel #-1, 0xfffff304 43 - movel #MEM_END-4, %sp 44 - 45 - PUTC '\r' 46 - PUTC '\n' 47 - PUTC 'A' 48 - PUTC 'B' 49 - 50 - /* 51 - * Determine end of RAM 52 - */ 53 - 54 - movel #MEM_END, %a0 55 - movel %a0, _ramend 56 - 57 - PUTC 'C' 58 - 59 - /* 60 - * Move ROM filesystem above bss :-) 61 - */ 62 - 63 - moveal #__bss_start, %a0 /* romfs at the start of bss */ 64 - moveal #__bss_stop, %a1 /* Set up destination */ 65 - movel %a0, %a2 /* Copy of bss start */ 66 - 67 - movel 8(%a0), %d1 /* Get size of ROMFS */ 68 - addql #8, %d1 /* Allow for rounding */ 69 - andl #0xfffffffc, %d1 /* Whole words */ 70 - 71 - addl %d1, %a0 /* Copy from end */ 72 - addl %d1, %a1 /* Copy from end */ 73 - movel %a1, _ramstart /* Set start of ram */ 74 - 75 - 1: 76 - movel -(%a0), %d0 /* Copy dword */ 77 - movel %d0, -(%a1) 78 - cmpl %a0, %a2 /* Check if at end */ 79 - bne 1b 80 - 81 - PUTC 'D' 82 - 83 - /* 84 - * Initialize BSS segment to 0 85 - */ 86 - 87 - lea __bss_start, %a0 88 - lea __bss_stop, %a1 89 - 90 - /* Copy 0 to %a0 until %a0 == %a1 */ 91 - 2: cmpal %a0, %a1 92 - beq 1f 93 - clrl (%a0)+ 94 - bra 2b 95 - 1: 96 - 97 - PUTC 'E' 98 - 99 - /* 100 - * Load the current task pointer and stack 101 - */ 102 - 103 - lea init_thread_union, %a0 104 - lea 0x2000(%a0), %sp 105 - 106 - PUTC 'F' 107 - PUTC '\r' 108 - PUTC '\n' 109 - 110 - /* 111 - * Go 112 - */ 113 - 114 - jmp start_kernel 115 - 116 - /* 117 - * Local functions 118 - */ 119 - 120 - #ifdef CRT_DEBUG 121 - putc: 122 - moveb %d7, 0xfffff907 123 - 1: 124 - movew 0xfffff906, %d7 125 - andw #0x2000, %d7 126 - beq 1b 127 - rts 128 - #endif
-207
arch/m68k/platform/68328/head-pilot.S
··· 1 - /* 2 - * linux/arch/m68knommu/platform/68328/head-pilot.S 3 - * - A startup file for the MC68328 4 - * 5 - * Copyright (C) 1998 D. Jeff Dionne <jeff@ryeham.ee.ryerson.ca>, 6 - * Kenneth Albanowski <kjahds@kjahds.com>, 7 - * The Silver Hammer Group, Ltd. 8 - * 9 - * (c) 1995, Dionne & Associates 10 - * (c) 1995, DKG Display Tech. 11 - */ 12 - 13 - #define ASSEMBLY 14 - 15 - #define IMMED # 16 - #define DBG_PUTC(x) moveb IMMED x, 0xfffff907 17 - 18 - 19 - .global _stext 20 - .global _start 21 - 22 - .global _rambase 23 - .global _ramvec 24 - .global _ramstart 25 - .global _ramend 26 - 27 - .global bootlogo_bits 28 - 29 - /*****************************************************************************/ 30 - 31 - .data 32 - 33 - /* 34 - * Set up the usable of RAM stuff. Size of RAM is determined then 35 - * an initial stack set up at the end. 36 - */ 37 - .align 4 38 - _ramvec: 39 - .long 0 40 - _rambase: 41 - .long 0 42 - _ramstart: 43 - .long 0 44 - _ramend: 45 - .long 0 46 - 47 - .text 48 - 49 - _start: 50 - _stext: 51 - 52 - 53 - #ifdef CONFIG_M68328 54 - 55 - #ifdef CONFIG_PILOT 56 - .byte 0x4e, 0xfa, 0x00, 0x0a /* Jmp +X bytes */ 57 - .byte 'b', 'o', 'o', 't' 58 - .word 10000 59 - 60 - nop 61 - #endif 62 - 63 - moveq #0, %d0 64 - movew %d0, 0xfffff618 /* Watchdog off */ 65 - movel #0x00011f07, 0xfffff114 /* CS A1 Mask */ 66 - 67 - movew #0x0800, 0xfffff906 /* Ignore CTS */ 68 - movew #0x010b, 0xfffff902 /* BAUD to 9600 */ 69 - 70 - movew #0x2410, 0xfffff200 /* PLLCR */ 71 - movew #0x123, 0xfffff202 /* PLLFSR */ 72 - 73 - #ifdef CONFIG_PILOT 74 - moveb #0, 0xfffffA27 /* LCKCON */ 75 - movel #_start, 0xfffffA00 /* LSSA */ 76 - moveb #0xa, 0xfffffA05 /* LVPW */ 77 - movew #0x9f, 0xFFFFFa08 /* LXMAX */ 78 - movew #0x9f, 0xFFFFFa0a /* LYMAX */ 79 - moveb #9, 0xfffffa29 /* LBAR */ 80 - moveb #0, 0xfffffa25 /* LPXCD */ 81 - moveb #0x04, 0xFFFFFa20 /* LPICF */ 82 - moveb #0x58, 0xfffffA27 /* LCKCON */ 83 - moveb #0x85, 0xfffff429 /* PFDATA */ 84 - moveb #0xd8, 0xfffffA27 /* LCKCON */ 85 - moveb #0xc5, 0xfffff429 /* PFDATA */ 86 - moveb #0xd5, 0xfffff429 /* PFDATA */ 87 - 88 - moveal #0x00100000, %a3 89 - moveal #0x100ffc00, %a4 90 - #endif /* CONFIG_PILOT */ 91 - 92 - #endif /* CONFIG_M68328 */ 93 - 94 - movew #0x2700, %sr 95 - lea %a4@(-4), %sp 96 - 97 - DBG_PUTC('\r') 98 - DBG_PUTC('\n') 99 - DBG_PUTC('A') 100 - 101 - moveq #0,%d0 102 - movew #16384, %d0 /* PLL settle wait loop */ 103 - L0: 104 - subw #1, %d0 105 - bne L0 106 - 107 - DBG_PUTC('B') 108 - 109 - /* Copy command line from beginning of RAM (+16) to end of bss */ 110 - movel #CONFIG_VECTORBASE, %d7 111 - addl #16, %d7 112 - moveal %d7, %a0 113 - moveal #__bss_stop, %a1 114 - lea %a1@(512), %a2 115 - 116 - DBG_PUTC('C') 117 - 118 - /* Copy %a0 to %a1 until %a1 == %a2 */ 119 - L2: 120 - movel %a0@+, %d0 121 - movel %d0, %a1@+ 122 - cmpal %a1, %a2 123 - bhi L2 124 - 125 - /* Copy data+init segment from ROM to RAM */ 126 - moveal #_etext, %a0 127 - moveal #_sdata, %a1 128 - moveal #__init_end, %a2 129 - 130 - DBG_PUTC('D') 131 - 132 - /* Copy %a0 to %a1 until %a1 == %a2 */ 133 - LD1: 134 - movel %a0@+, %d0 135 - movel %d0, %a1@+ 136 - cmpal %a1, %a2 137 - bhi LD1 138 - 139 - DBG_PUTC('E') 140 - 141 - moveal #__bss_start, %a0 142 - moveal #__bss_stop, %a1 143 - 144 - /* Copy 0 to %a0 until %a0 == %a1 */ 145 - L1: 146 - movel #0, %a0@+ 147 - cmpal %a0, %a1 148 - bhi L1 149 - 150 - DBG_PUTC('F') 151 - 152 - /* Copy command line from end of bss to command line */ 153 - moveal #__bss_stop, %a0 154 - moveal #command_line, %a1 155 - lea %a1@(512), %a2 156 - 157 - DBG_PUTC('G') 158 - 159 - /* Copy %a0 to %a1 until %a1 == %a2 */ 160 - L3: 161 - movel %a0@+, %d0 162 - movel %d0, %a1@+ 163 - cmpal %a1, %a2 164 - bhi L3 165 - 166 - movel #_sdata, %d0 167 - movel %d0, _rambase 168 - movel #__bss_stop, %d0 169 - movel %d0, _ramstart 170 - 171 - movel %a4, %d0 172 - subl #4096, %d0 /* Reserve 4K of stack */ 173 - moveq #79, %d7 174 - movel %d0, _ramend 175 - 176 - pea 0 177 - pea env 178 - pea %sp@(4) 179 - pea 0 180 - 181 - DBG_PUTC('H') 182 - 183 - #ifdef CONFIG_PILOT 184 - movel #bootlogo_bits, 0xFFFFFA00 185 - moveb #10, 0xFFFFFA05 186 - movew #160, 0xFFFFFA08 187 - movew #160, 0xFFFFFA0A 188 - #endif /* CONFIG_PILOT */ 189 - 190 - DBG_PUTC('I') 191 - 192 - lea init_thread_union, %a0 193 - lea 0x2000(%a0), %sp 194 - 195 - DBG_PUTC('J') 196 - DBG_PUTC('\r') 197 - DBG_PUTC('\n') 198 - 199 - jsr start_kernel 200 - _exit: 201 - 202 - jmp _exit 203 - 204 - 205 - .data 206 - env: 207 - .long 0
-141
arch/m68k/platform/68328/head-ram.S
··· 1 - 2 - .global __main 3 - .global __rom_start 4 - 5 - .global _rambase 6 - .global _ramstart 7 - 8 - .global splash_bits 9 - .global _start 10 - .global _stext 11 - .global _edata 12 - 13 - #define DEBUG 14 - #define ROM_OFFSET 0x10C00000 15 - #define STACK_GAURD 0x10 16 - 17 - .text 18 - 19 - _start: 20 - _stext: 21 - movew #0x2700, %sr /* Exceptions off! */ 22 - 23 - #if 0 24 - /* Init chip registers. uCsimm specific */ 25 - moveb #0x00, 0xfffffb0b /* Watchdog off */ 26 - moveb #0x10, 0xfffff000 /* SCR */ 27 - 28 - movew #0x2400, 0xfffff200 /* PLLCR */ 29 - movew #0x0123, 0xfffff202 /* PLLFSR */ 30 - 31 - moveb #0x00, 0xfffff40b /* enable chip select */ 32 - moveb #0x00, 0xfffff423 /* enable /DWE */ 33 - moveb #0x08, 0xfffffd0d /* disable hardmap */ 34 - moveb #0x07, 0xfffffd0e /* level 7 interrupt clear */ 35 - 36 - movew #0x8600, 0xfffff100 /* FLASH at 0x10c00000 */ 37 - movew #0x018b, 0xfffff110 /* 2Meg, enable, 0ws */ 38 - 39 - movew #0x8f00, 0xfffffc00 /* DRAM configuration */ 40 - movew #0x9667, 0xfffffc02 /* DRAM control */ 41 - movew #0x0000, 0xfffff106 /* DRAM at 0x00000000 */ 42 - movew #0x068f, 0xfffff116 /* 8Meg, enable, 0ws */ 43 - 44 - moveb #0x40, 0xfffff300 /* IVR */ 45 - movel #0x007FFFFF, %d0 /* IMR */ 46 - movel %d0, 0xfffff304 47 - 48 - moveb 0xfffff42b, %d0 49 - andb #0xe0, %d0 50 - moveb %d0, 0xfffff42b 51 - 52 - moveb #0x08, 0xfffff907 /* Ignore CTS */ 53 - movew #0x010b, 0xfffff902 /* BAUD to 9600 */ 54 - movew #0xe100, 0xfffff900 /* enable */ 55 - #endif 56 - 57 - movew #16384, %d0 /* PLL settle wait loop */ 58 - L0: 59 - subw #1, %d0 60 - bne L0 61 - #ifdef DEBUG 62 - moveq #70, %d7 /* 'F' */ 63 - moveb %d7,0xfffff907 /* No absolute addresses */ 64 - pclp1: 65 - movew 0xfffff906, %d7 66 - andw #0x2000, %d7 67 - beq pclp1 68 - #endif /* DEBUG */ 69 - 70 - #ifdef DEBUG 71 - moveq #82, %d7 /* 'R' */ 72 - moveb %d7,0xfffff907 /* No absolute addresses */ 73 - pclp3: 74 - movew 0xfffff906, %d7 75 - andw #0x2000, %d7 76 - beq pclp3 77 - #endif /* DEBUG */ 78 - moveal #0x007ffff0, %ssp 79 - moveal #__bss_start, %a0 80 - moveal #__bss_stop, %a1 81 - 82 - /* Copy 0 to %a0 until %a0 >= %a1 */ 83 - L1: 84 - movel #0, %a0@+ 85 - cmpal %a0, %a1 86 - bhi L1 87 - 88 - #ifdef DEBUG 89 - moveq #67, %d7 /* 'C' */ 90 - jsr putc 91 - #endif /* DEBUG */ 92 - 93 - pea 0 94 - pea env 95 - pea %sp@(4) 96 - pea 0 97 - 98 - #ifdef DEBUG 99 - moveq #70, %d7 /* 'F' */ 100 - jsr putc 101 - #endif /* DEBUG */ 102 - 103 - lp: 104 - jsr start_kernel 105 - jmp lp 106 - _exit: 107 - 108 - jmp _exit 109 - 110 - __main: 111 - /* nothing */ 112 - rts 113 - 114 - #ifdef DEBUG 115 - putc: 116 - moveb %d7,0xfffff907 117 - pclp: 118 - movew 0xfffff906, %d7 119 - andw #0x2000, %d7 120 - beq pclp 121 - rts 122 - #endif /* DEBUG */ 123 - 124 - .data 125 - 126 - /* 127 - * Set up the usable of RAM stuff. Size of RAM is determined then 128 - * an initial stack set up at the end. 129 - */ 130 - .align 4 131 - _ramvec: 132 - .long 0 133 - _rambase: 134 - .long 0 135 - _ramstart: 136 - .long 0 137 - _ramend: 138 - .long 0 139 - 140 - env: 141 - .long 0
-105
arch/m68k/platform/68328/head-rom.S
··· 1 - 2 - .global _start 3 - .global _stext 4 - 5 - .global _rambase 6 - .global _ramvec 7 - .global _ramstart 8 - .global _ramend 9 - 10 - #ifdef CONFIG_INIT_LCD 11 - .global bootlogo_bits 12 - #endif 13 - 14 - .data 15 - 16 - /* 17 - * Set up the usable of RAM stuff. Size of RAM is determined then 18 - * an initial stack set up at the end. 19 - */ 20 - .align 4 21 - _ramvec: 22 - .long 0 23 - _rambase: 24 - .long 0 25 - _ramstart: 26 - .long 0 27 - _ramend: 28 - .long 0 29 - 30 - #define RAMEND (CONFIG_RAMBASE + CONFIG_RAMSIZE) 31 - 32 - .text 33 - _start: 34 - _stext: movew #0x2700,%sr 35 - #ifdef CONFIG_INIT_LCD 36 - movel #bootlogo_bits, 0xfffffA00 /* LSSA */ 37 - moveb #0x28, 0xfffffA05 /* LVPW */ 38 - movew #0x280, 0xFFFFFa08 /* LXMAX */ 39 - movew #0x1df, 0xFFFFFa0a /* LYMAX */ 40 - moveb #0, 0xfffffa29 /* LBAR */ 41 - moveb #0, 0xfffffa25 /* LPXCD */ 42 - moveb #0x08, 0xFFFFFa20 /* LPICF */ 43 - moveb #0x01, 0xFFFFFA21 /* -ve pol */ 44 - moveb #0x81, 0xfffffA27 /* LCKCON */ 45 - movew #0xff00, 0xfffff412 /* LCD pins */ 46 - #endif 47 - moveal #RAMEND-CONFIG_MEMORY_RESERVE*0x100000 - 0x10, %sp 48 - movew #32767, %d0 /* PLL settle wait loop */ 49 - 1: subq #1, %d0 50 - bne 1b 51 - 52 - /* Copy data segment from ROM to RAM */ 53 - moveal #_etext, %a0 54 - moveal #_sdata, %a1 55 - moveal #_edata, %a2 56 - 57 - /* Copy %a0 to %a1 until %a1 == %a2 */ 58 - 1: movel %a0@+, %a1@+ 59 - cmpal %a1, %a2 60 - bhi 1b 61 - 62 - moveal #__bss_start, %a0 63 - moveal #__bss_stop, %a1 64 - /* Copy 0 to %a0 until %a0 == %a1 */ 65 - 66 - 1: 67 - clrl %a0@+ 68 - cmpal %a0, %a1 69 - bhi 1b 70 - 71 - movel #_sdata, %d0 72 - movel %d0, _rambase 73 - movel #__bss_stop, %d0 74 - movel %d0, _ramstart 75 - movel #RAMEND-CONFIG_MEMORY_RESERVE*0x100000, %d0 76 - movel %d0, _ramend 77 - movel #CONFIG_VECTORBASE, %d0 78 - movel %d0, _ramvec 79 - 80 - /* 81 - * load the current task pointer and stack 82 - */ 83 - lea init_thread_union, %a0 84 - lea 0x2000(%a0), %sp 85 - 86 - 1: jsr start_kernel 87 - bra 1b 88 - _exit: 89 - 90 - jmp _exit 91 - 92 - 93 - putc: 94 - moveb %d7,0xfffff907 95 - 1: 96 - movew 0xfffff906, %d7 97 - andw #0x2000, %d7 98 - beq 1b 99 - rts 100 - 101 - .data 102 - env: 103 - .long 0 104 - .text 105 -
+1 -1
arch/m68k/platform/68328/ints.c arch/m68k/platform/68000/ints.c
··· 1 1 /* 2 - * linux/arch/m68knommu/platform/68328/ints.c 2 + * ints.c - Generic interrupt controller support 3 3 * 4 4 * This file is subject to the terms and conditions of the GNU General Public 5 5 * License. See the file COPYING in the main directory of this archive
+1 -1
arch/m68k/platform/68328/romvec.S arch/m68k/platform/68000/romvec.S
··· 1 1 /* 2 - * linux/arch/m68knommu/platform/68328/romvec.S 2 + * romvec.S - Vector table for 68000 cpus 3 3 * 4 4 * This file is subject to the terms and conditions of the GNU General Public 5 5 * License. See the file COPYING in the main directory of this archive
+1 -1
arch/m68k/platform/68328/timers.c arch/m68k/platform/68000/timers.c
··· 1 1 /***************************************************************************/ 2 2 3 3 /* 4 - * linux/arch/m68knommu/platform/68328/timers.c 4 + * timers.c - Generic hardware timer support. 5 5 * 6 6 * Copyright (C) 1993 Hamish Macdonald 7 7 * Copyright (C) 1999 D. Jeff Dionne
-5
arch/m68k/platform/68EZ328/Makefile
··· 1 - # 2 - # Makefile for arch/m68knommu/platform/68EZ328. 3 - # 4 - 5 - obj-y := config.o
+1 -1
arch/m68k/platform/68EZ328/config.c arch/m68k/platform/68000/m68EZ328.c
··· 1 1 /***************************************************************************/ 2 2 3 3 /* 4 - * linux/arch/m68knommu/platform/68EZ328/config.c 4 + * m68EZ328.c - 68EZ328 specific config 5 5 * 6 6 * Copyright (C) 1993 Hamish Macdonald 7 7 * Copyright (C) 1999 D. Jeff Dionne
-5
arch/m68k/platform/68VZ328/Makefile
··· 1 - # 2 - # Makefile for arch/m68k/platform/68VZ328. 3 - # 4 - 5 - obj-y := config.o
arch/m68k/platform/68VZ328/bootlogo.h arch/m68k/platform/68000/bootlogo-vz.h
+2 -2
arch/m68k/platform/68VZ328/config.c arch/m68k/platform/68000/m68VZ328.c
··· 1 1 /***************************************************************************/ 2 2 3 3 /* 4 - * linux/arch/m68knommu/platform/68VZ328/config.c 4 + * m68VZ328.c - 68VZ328 specific config 5 5 * 6 6 * Copyright (C) 1993 Hamish Macdonald 7 7 * Copyright (C) 1999 D. Jeff Dionne ··· 28 28 #include <asm/bootstd.h> 29 29 30 30 #ifdef CONFIG_INIT_LCD 31 - #include "bootlogo.h" 31 + #include "bootlogo-vz.h" 32 32 #endif 33 33 34 34 /***************************************************************************/
+51 -75
arch/m68k/platform/coldfire/clk.c
··· 19 19 #include <asm/mcfsim.h> 20 20 #include <asm/mcfclk.h> 21 21 22 - /***************************************************************************/ 23 - #ifndef MCFPM_PPMCR0 24 - struct clk *clk_get(struct device *dev, const char *id) 25 - { 26 - return NULL; 27 - } 28 - EXPORT_SYMBOL(clk_get); 29 - 30 - int clk_enable(struct clk *clk) 31 - { 32 - return 0; 33 - } 34 - EXPORT_SYMBOL(clk_enable); 35 - 36 - void clk_disable(struct clk *clk) 37 - { 38 - } 39 - EXPORT_SYMBOL(clk_disable); 40 - 41 - void clk_put(struct clk *clk) 42 - { 43 - } 44 - EXPORT_SYMBOL(clk_put); 45 - 46 - unsigned long clk_get_rate(struct clk *clk) 47 - { 48 - return MCF_CLK; 49 - } 50 - EXPORT_SYMBOL(clk_get_rate); 51 - #else 52 22 static DEFINE_SPINLOCK(clk_lock); 23 + 24 + #ifdef MCFPM_PPMCR0 25 + /* 26 + * For more advanced ColdFire parts that have clocks that can be enabled 27 + * we supply enable/disable functions. These must properly define their 28 + * clocks in their platform specific code. 29 + */ 30 + void __clk_init_enabled(struct clk *clk) 31 + { 32 + clk->enabled = 1; 33 + clk->clk_ops->enable(clk); 34 + } 35 + 36 + void __clk_init_disabled(struct clk *clk) 37 + { 38 + clk->enabled = 0; 39 + clk->clk_ops->disable(clk); 40 + } 41 + 42 + static void __clk_enable0(struct clk *clk) 43 + { 44 + __raw_writeb(clk->slot, MCFPM_PPMCR0); 45 + } 46 + 47 + static void __clk_disable0(struct clk *clk) 48 + { 49 + __raw_writeb(clk->slot, MCFPM_PPMSR0); 50 + } 51 + 52 + struct clk_ops clk_ops0 = { 53 + .enable = __clk_enable0, 54 + .disable = __clk_disable0, 55 + }; 56 + 57 + #ifdef MCFPM_PPMCR1 58 + static void __clk_enable1(struct clk *clk) 59 + { 60 + __raw_writeb(clk->slot, MCFPM_PPMCR1); 61 + } 62 + 63 + static void __clk_disable1(struct clk *clk) 64 + { 65 + __raw_writeb(clk->slot, MCFPM_PPMSR1); 66 + } 67 + 68 + struct clk_ops clk_ops1 = { 69 + .enable = __clk_enable1, 70 + .disable = __clk_disable1, 71 + }; 72 + #endif /* MCFPM_PPMCR1 */ 73 + #endif /* MCFPM_PPMCR0 */ 53 74 54 75 struct clk *clk_get(struct device *dev, const char *id) 55 76 { ··· 122 101 EXPORT_SYMBOL(clk_get_rate); 123 102 124 103 /***************************************************************************/ 125 - 126 - void __clk_init_enabled(struct clk *clk) 127 - { 128 - clk->enabled = 1; 129 - clk->clk_ops->enable(clk); 130 - } 131 - 132 - void __clk_init_disabled(struct clk *clk) 133 - { 134 - clk->enabled = 0; 135 - clk->clk_ops->disable(clk); 136 - } 137 - 138 - static void __clk_enable0(struct clk *clk) 139 - { 140 - __raw_writeb(clk->slot, MCFPM_PPMCR0); 141 - } 142 - 143 - static void __clk_disable0(struct clk *clk) 144 - { 145 - __raw_writeb(clk->slot, MCFPM_PPMSR0); 146 - } 147 - 148 - struct clk_ops clk_ops0 = { 149 - .enable = __clk_enable0, 150 - .disable = __clk_disable0, 151 - }; 152 - 153 - #ifdef MCFPM_PPMCR1 154 - static void __clk_enable1(struct clk *clk) 155 - { 156 - __raw_writeb(clk->slot, MCFPM_PPMCR1); 157 - } 158 - 159 - static void __clk_disable1(struct clk *clk) 160 - { 161 - __raw_writeb(clk->slot, MCFPM_PPMSR1); 162 - } 163 - 164 - struct clk_ops clk_ops1 = { 165 - .enable = __clk_enable1, 166 - .disable = __clk_disable1, 167 - }; 168 - #endif /* MCFPM_PPMCR1 */ 169 - #endif /* MCFPM_PPMCR0 */
+4 -4
arch/m68k/platform/coldfire/intc-5249.c
··· 21 21 { 22 22 u32 imr; 23 23 imr = readl(MCFSIM2_GPIOINTENABLE); 24 - imr &= ~(0x1 << (d->irq - MCFINTC2_GPIOIRQ0)); 24 + imr &= ~(0x1 << (d->irq - MCF_IRQ_GPIO0)); 25 25 writel(imr, MCFSIM2_GPIOINTENABLE); 26 26 } 27 27 ··· 29 29 { 30 30 u32 imr; 31 31 imr = readl(MCFSIM2_GPIOINTENABLE); 32 - imr |= (0x1 << (d->irq - MCFINTC2_GPIOIRQ0)); 32 + imr |= (0x1 << (d->irq - MCF_IRQ_GPIO0)); 33 33 writel(imr, MCFSIM2_GPIOINTENABLE); 34 34 } 35 35 36 36 static void intc2_irq_gpio_ack(struct irq_data *d) 37 37 { 38 - writel(0x1 << (d->irq - MCFINTC2_GPIOIRQ0), MCFSIM2_GPIOINTCLEAR); 38 + writel(0x1 << (d->irq - MCF_IRQ_GPIO0), MCFSIM2_GPIOINTCLEAR); 39 39 } 40 40 41 41 static struct irq_chip intc2_irq_gpio_chip = { ··· 50 50 int irq; 51 51 52 52 /* GPIO interrupt sources */ 53 - for (irq = MCFINTC2_GPIOIRQ0; (irq <= MCFINTC2_GPIOIRQ7); irq++) { 53 + for (irq = MCF_IRQ_GPIO0; (irq <= MCF_IRQ_GPIO7); irq++) { 54 54 irq_set_chip(irq, &intc2_irq_gpio_chip); 55 55 irq_set_handler(irq, handle_edge_irq); 56 56 }
+20
arch/m68k/platform/coldfire/m5206.c
··· 16 16 #include <asm/machdep.h> 17 17 #include <asm/coldfire.h> 18 18 #include <asm/mcfsim.h> 19 + #include <asm/mcfclk.h> 20 + 21 + /***************************************************************************/ 22 + 23 + DEFINE_CLK(pll, "pll.0", MCF_CLK); 24 + DEFINE_CLK(sys, "sys.0", MCF_BUSCLK); 25 + DEFINE_CLK(mcftmr0, "mcftmr.0", MCF_BUSCLK); 26 + DEFINE_CLK(mcftmr1, "mcftmr.1", MCF_BUSCLK); 27 + DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); 28 + DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); 29 + 30 + struct clk *mcf_clks[] = { 31 + &clk_pll, 32 + &clk_sys, 33 + &clk_mcftmr0, 34 + &clk_mcftmr1, 35 + &clk_mcfuart0, 36 + &clk_mcfuart1, 37 + NULL 38 + }; 19 39 20 40 /***************************************************************************/ 21 41
+28
arch/m68k/platform/coldfire/m523x.c
··· 19 19 #include <asm/machdep.h> 20 20 #include <asm/coldfire.h> 21 21 #include <asm/mcfsim.h> 22 + #include <asm/mcfclk.h> 23 + 24 + /***************************************************************************/ 25 + 26 + DEFINE_CLK(pll, "pll.0", MCF_CLK); 27 + DEFINE_CLK(sys, "sys.0", MCF_BUSCLK); 28 + DEFINE_CLK(mcfpit0, "mcfpit.0", MCF_CLK); 29 + DEFINE_CLK(mcfpit1, "mcfpit.1", MCF_CLK); 30 + DEFINE_CLK(mcfpit2, "mcfpit.2", MCF_CLK); 31 + DEFINE_CLK(mcfpit3, "mcfpit.3", MCF_CLK); 32 + DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); 33 + DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); 34 + DEFINE_CLK(mcfuart2, "mcfuart.2", MCF_BUSCLK); 35 + DEFINE_CLK(fec0, "fec.0", MCF_BUSCLK); 36 + 37 + struct clk *mcf_clks[] = { 38 + &clk_pll, 39 + &clk_sys, 40 + &clk_mcfpit0, 41 + &clk_mcfpit1, 42 + &clk_mcfpit2, 43 + &clk_mcfpit3, 44 + &clk_mcfuart0, 45 + &clk_mcfuart1, 46 + &clk_mcfuart2, 47 + &clk_fec0, 48 + NULL 49 + }; 22 50 23 51 /***************************************************************************/ 24 52
+24 -4
arch/m68k/platform/coldfire/m5249.c
··· 16 16 #include <asm/machdep.h> 17 17 #include <asm/coldfire.h> 18 18 #include <asm/mcfsim.h> 19 + #include <asm/mcfclk.h> 20 + 21 + /***************************************************************************/ 22 + 23 + DEFINE_CLK(pll, "pll.0", MCF_CLK); 24 + DEFINE_CLK(sys, "sys.0", MCF_BUSCLK); 25 + DEFINE_CLK(mcftmr0, "mcftmr.0", MCF_BUSCLK); 26 + DEFINE_CLK(mcftmr1, "mcftmr.1", MCF_BUSCLK); 27 + DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); 28 + DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); 29 + 30 + struct clk *mcf_clks[] = { 31 + &clk_pll, 32 + &clk_sys, 33 + &clk_mcftmr0, 34 + &clk_mcftmr1, 35 + &clk_mcfuart0, 36 + &clk_mcfuart1, 37 + NULL 38 + }; 19 39 20 40 /***************************************************************************/ 21 41 ··· 48 28 .flags = IORESOURCE_MEM, 49 29 }, 50 30 { 51 - .start = MCFINTC2_GPIOIRQ6, 52 - .end = MCFINTC2_GPIOIRQ6, 31 + .start = MCF_IRQ_GPIO6, 32 + .end = MCF_IRQ_GPIO6, 53 33 .flags = IORESOURCE_IRQ, 54 34 }, 55 35 }; ··· 95 75 gpio = readl(MCFSIM2_GPIOINTENABLE); 96 76 writel(gpio | 0x40, MCFSIM2_GPIOINTENABLE); 97 77 98 - gpio = readl(MCFSIM2_INTLEVEL5); 99 - writel(gpio | 0x04000000, MCFSIM2_INTLEVEL5); 78 + gpio = readl(MCFINTC2_INTPRI5); 79 + writel(gpio | 0x04000000, MCFINTC2_INTPRI5); 100 80 } 101 81 102 82 #endif /* CONFIG_M5249C3 */
+20
arch/m68k/platform/coldfire/m525x.c
··· 16 16 #include <asm/machdep.h> 17 17 #include <asm/coldfire.h> 18 18 #include <asm/mcfsim.h> 19 + #include <asm/mcfclk.h> 20 + 21 + /***************************************************************************/ 22 + 23 + DEFINE_CLK(pll, "pll.0", MCF_CLK); 24 + DEFINE_CLK(sys, "sys.0", MCF_BUSCLK); 25 + DEFINE_CLK(mcftmr0, "mcftmr.0", MCF_BUSCLK); 26 + DEFINE_CLK(mcftmr1, "mcftmr.1", MCF_BUSCLK); 27 + DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); 28 + DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); 29 + 30 + struct clk *mcf_clks[] = { 31 + &clk_pll, 32 + &clk_sys, 33 + &clk_mcftmr0, 34 + &clk_mcftmr1, 35 + &clk_mcfuart0, 36 + &clk_mcfuart1, 37 + NULL 38 + }; 19 39 20 40 /***************************************************************************/ 21 41
+26
arch/m68k/platform/coldfire/m5272.c
··· 19 19 #include <asm/coldfire.h> 20 20 #include <asm/mcfsim.h> 21 21 #include <asm/mcfuart.h> 22 + #include <asm/mcfclk.h> 22 23 23 24 /***************************************************************************/ 24 25 ··· 28 27 */ 29 28 unsigned short ppdata; 30 29 unsigned char ledbank = 0xff; 30 + 31 + /***************************************************************************/ 32 + 33 + DEFINE_CLK(pll, "pll.0", MCF_CLK); 34 + DEFINE_CLK(sys, "sys.0", MCF_BUSCLK); 35 + DEFINE_CLK(mcftmr0, "mcftmr.0", MCF_BUSCLK); 36 + DEFINE_CLK(mcftmr1, "mcftmr.1", MCF_BUSCLK); 37 + DEFINE_CLK(mcftmr2, "mcftmr.2", MCF_BUSCLK); 38 + DEFINE_CLK(mcftmr3, "mcftmr.3", MCF_BUSCLK); 39 + DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); 40 + DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); 41 + DEFINE_CLK(fec0, "fec.0", MCF_BUSCLK); 42 + 43 + struct clk *mcf_clks[] = { 44 + &clk_pll, 45 + &clk_sys, 46 + &clk_mcftmr0, 47 + &clk_mcftmr1, 48 + &clk_mcftmr2, 49 + &clk_mcftmr3, 50 + &clk_mcfuart0, 51 + &clk_mcfuart1, 52 + &clk_fec0, 53 + NULL 54 + }; 31 55 32 56 /***************************************************************************/ 33 57
+30
arch/m68k/platform/coldfire/m527x.c
··· 20 20 #include <asm/coldfire.h> 21 21 #include <asm/mcfsim.h> 22 22 #include <asm/mcfuart.h> 23 + #include <asm/mcfclk.h> 24 + 25 + /***************************************************************************/ 26 + 27 + DEFINE_CLK(pll, "pll.0", MCF_CLK); 28 + DEFINE_CLK(sys, "sys.0", MCF_BUSCLK); 29 + DEFINE_CLK(mcfpit0, "mcfpit.0", MCF_CLK); 30 + DEFINE_CLK(mcfpit1, "mcfpit.1", MCF_CLK); 31 + DEFINE_CLK(mcfpit2, "mcfpit.2", MCF_CLK); 32 + DEFINE_CLK(mcfpit3, "mcfpit.3", MCF_CLK); 33 + DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); 34 + DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); 35 + DEFINE_CLK(mcfuart2, "mcfuart.2", MCF_BUSCLK); 36 + DEFINE_CLK(fec0, "fec.0", MCF_BUSCLK); 37 + DEFINE_CLK(fec1, "fec.1", MCF_BUSCLK); 38 + 39 + struct clk *mcf_clks[] = { 40 + &clk_pll, 41 + &clk_sys, 42 + &clk_mcfpit0, 43 + &clk_mcfpit1, 44 + &clk_mcfpit2, 45 + &clk_mcfpit3, 46 + &clk_mcfuart0, 47 + &clk_mcfuart1, 48 + &clk_mcfuart2, 49 + &clk_fec0, 50 + &clk_fec1, 51 + NULL 52 + }; 23 53 24 54 /***************************************************************************/ 25 55
+28
arch/m68k/platform/coldfire/m528x.c
··· 21 21 #include <asm/coldfire.h> 22 22 #include <asm/mcfsim.h> 23 23 #include <asm/mcfuart.h> 24 + #include <asm/mcfclk.h> 25 + 26 + /***************************************************************************/ 27 + 28 + DEFINE_CLK(pll, "pll.0", MCF_CLK); 29 + DEFINE_CLK(sys, "sys.0", MCF_BUSCLK); 30 + DEFINE_CLK(mcfpit0, "mcfpit.0", MCF_CLK); 31 + DEFINE_CLK(mcfpit1, "mcfpit.1", MCF_CLK); 32 + DEFINE_CLK(mcfpit2, "mcfpit.2", MCF_CLK); 33 + DEFINE_CLK(mcfpit3, "mcfpit.3", MCF_CLK); 34 + DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); 35 + DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); 36 + DEFINE_CLK(mcfuart2, "mcfuart.2", MCF_BUSCLK); 37 + DEFINE_CLK(fec0, "fec.0", MCF_BUSCLK); 38 + 39 + struct clk *mcf_clks[] = { 40 + &clk_pll, 41 + &clk_sys, 42 + &clk_mcfpit0, 43 + &clk_mcfpit1, 44 + &clk_mcfpit2, 45 + &clk_mcfpit3, 46 + &clk_mcfuart0, 47 + &clk_mcfuart1, 48 + &clk_mcfuart2, 49 + &clk_fec0, 50 + NULL 51 + }; 24 52 25 53 /***************************************************************************/ 26 54
+20
arch/m68k/platform/coldfire/m5307.c
··· 17 17 #include <asm/coldfire.h> 18 18 #include <asm/mcfsim.h> 19 19 #include <asm/mcfwdebug.h> 20 + #include <asm/mcfclk.h> 20 21 21 22 /***************************************************************************/ 22 23 ··· 26 25 */ 27 26 unsigned short ppdata; 28 27 unsigned char ledbank = 0xff; 28 + 29 + /***************************************************************************/ 30 + 31 + DEFINE_CLK(pll, "pll.0", MCF_CLK); 32 + DEFINE_CLK(sys, "sys.0", MCF_BUSCLK); 33 + DEFINE_CLK(mcftmr0, "mcftmr.0", MCF_BUSCLK); 34 + DEFINE_CLK(mcftmr1, "mcftmr.1", MCF_BUSCLK); 35 + DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); 36 + DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); 37 + 38 + struct clk *mcf_clks[] = { 39 + &clk_pll, 40 + &clk_sys, 41 + &clk_mcftmr0, 42 + &clk_mcftmr1, 43 + &clk_mcfuart0, 44 + &clk_mcfuart1, 45 + NULL 46 + }; 29 47 30 48 /***************************************************************************/ 31 49
+20
arch/m68k/platform/coldfire/m5407.c
··· 16 16 #include <asm/machdep.h> 17 17 #include <asm/coldfire.h> 18 18 #include <asm/mcfsim.h> 19 + #include <asm/mcfclk.h> 20 + 21 + /***************************************************************************/ 22 + 23 + DEFINE_CLK(pll, "pll.0", MCF_CLK); 24 + DEFINE_CLK(sys, "sys.0", MCF_BUSCLK); 25 + DEFINE_CLK(mcftmr0, "mcftmr.0", MCF_BUSCLK); 26 + DEFINE_CLK(mcftmr1, "mcftmr.1", MCF_BUSCLK); 27 + DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); 28 + DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); 29 + 30 + struct clk *mcf_clks[] = { 31 + &clk_pll, 32 + &clk_sys, 33 + &clk_mcftmr0, 34 + &clk_mcftmr1, 35 + &clk_mcfuart0, 36 + &clk_mcfuart1, 37 + NULL 38 + }; 19 39 20 40 /***************************************************************************/ 21 41
+26
arch/m68k/platform/coldfire/m54xx.c
··· 14 14 #include <linux/interrupt.h> 15 15 #include <linux/io.h> 16 16 #include <linux/mm.h> 17 + #include <linux/clk.h> 17 18 #include <linux/bootmem.h> 18 19 #include <asm/pgalloc.h> 19 20 #include <asm/machdep.h> 20 21 #include <asm/coldfire.h> 21 22 #include <asm/m54xxsim.h> 22 23 #include <asm/mcfuart.h> 24 + #include <asm/mcfclk.h> 23 25 #include <asm/m54xxgpt.h> 26 + #include <asm/mcfclk.h> 24 27 #ifdef CONFIG_MMU 25 28 #include <asm/mmu_context.h> 26 29 #endif 30 + 31 + /***************************************************************************/ 32 + 33 + DEFINE_CLK(pll, "pll.0", MCF_CLK); 34 + DEFINE_CLK(sys, "sys.0", MCF_BUSCLK); 35 + DEFINE_CLK(mcfslt0, "mcfslt.0", MCF_BUSCLK); 36 + DEFINE_CLK(mcfslt1, "mcfslt.1", MCF_BUSCLK); 37 + DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); 38 + DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); 39 + DEFINE_CLK(mcfuart2, "mcfuart.2", MCF_BUSCLK); 40 + DEFINE_CLK(mcfuart3, "mcfuart.3", MCF_BUSCLK); 41 + 42 + struct clk *mcf_clks[] = { 43 + &clk_pll, 44 + &clk_sys, 45 + &clk_mcfslt0, 46 + &clk_mcfslt1, 47 + &clk_mcfuart0, 48 + &clk_mcfuart1, 49 + &clk_mcfuart2, 50 + &clk_mcfuart3, 51 + NULL 52 + }; 27 53 28 54 /***************************************************************************/ 29 55