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

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: (25 commits)
m68knommu: fix broken setting of irq_chip and handler
m68knommu: switch to using -mcpu= flags for ColdFire targets
m68knommu: arch/m68knommu/Kconfig whitespace cleanup
m68knommu: create optimal separate instruction and data cache for ColdFire
m68knommu: support ColdFire caches that do copyback and write-through
m68knommu: support version 2 ColdFire split cache
m68knommu: make cache push code ColdFire generic
m68knommu: clean up ColdFire cache control code
m68knommu: move inclusion of ColdFire v4 cache registers
m68knommu: merge bit definitions for version 3 ColdFire cache controller
m68knommu: create bit definitions for the version 2 ColdFire cache controller
m68knommu: remove empty __iounmap() it is no used
m68knommu: remove kernel_map() code, it is not used
m68knommu: remove do_page_fault(), it is not used
m68knommu: use user stack pointer hardware on some ColdFire cores
m68knommu: remove command line printing DEBUG
m68knommu: remove fasthandler interrupt code
m68knommu: move UART addressing to part specific includes
m68knommu: fix clock rate value reported for ColdFire 54xx parts
m68knommu: move ColdFire CPU names into their headers
...

+732 -628
+46 -59
arch/m68k/include/asm/cacheflush_no.h
··· 2 #define _M68KNOMMU_CACHEFLUSH_H 3 4 /* 5 - * (C) Copyright 2000-2004, Greg Ungerer <gerg@snapgear.com> 6 */ 7 #include <linux/mm.h> 8 9 #define flush_cache_all() __flush_cache_all() 10 #define flush_cache_mm(mm) do { } while (0) 11 #define flush_cache_dup_mm(mm) do { } while (0) 12 - #define flush_cache_range(vma, start, end) __flush_cache_all() 13 #define flush_cache_page(vma, vmaddr) do { } while (0) 14 - #define flush_dcache_range(start,len) __flush_cache_all() 15 #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0 16 #define flush_dcache_page(page) do { } while (0) 17 #define flush_dcache_mmap_lock(mapping) do { } while (0) 18 #define flush_dcache_mmap_unlock(mapping) do { } while (0) 19 - #define flush_icache_range(start,len) __flush_cache_all() 20 #define flush_icache_page(vma,pg) do { } while (0) 21 #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) 22 #define flush_cache_vmap(start, end) do { } while (0) ··· 28 #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ 29 memcpy(dst, src, len) 30 31 static inline void __flush_cache_all(void) 32 { 33 - #if defined(CONFIG_M5407) || defined(CONFIG_M548x) 34 - /* 35 - * Use cpushl to push and invalidate all cache lines. 36 - * Gas doesn't seem to know how to generate the ColdFire 37 - * cpushl instruction... Oh well, bit stuff it for now. 38 - */ 39 __asm__ __volatile__ ( 40 - "nop\n\t" 41 - "clrl %%d0\n\t" 42 - "1:\n\t" 43 - "movel %%d0,%%a0\n\t" 44 - "2:\n\t" 45 - ".word 0xf468\n\t" 46 - "addl #0x10,%%a0\n\t" 47 - "cmpl #0x00000800,%%a0\n\t" 48 - "blt 2b\n\t" 49 - "addql #1,%%d0\n\t" 50 - "cmpil #4,%%d0\n\t" 51 - "bne 1b\n\t" 52 - "movel #0xb6088500,%%d0\n\t" 53 - "movec %%d0,%%CACR\n\t" 54 - : : : "d0", "a0" ); 55 - #endif /* CONFIG_M5407 */ 56 - #if defined(CONFIG_M523x) || defined(CONFIG_M527x) 57 - __asm__ __volatile__ ( 58 - "movel #0x81400100, %%d0\n\t" 59 "movec %%d0, %%CACR\n\t" 60 "nop\n\t" 61 - : : : "d0" ); 62 - #endif /* CONFIG_M523x || CONFIG_M527x */ 63 - #if defined(CONFIG_M528x) 64 - __asm__ __volatile__ ( 65 - "movel #0x81000200, %%d0\n\t" 66 - "movec %%d0, %%CACR\n\t" 67 - "nop\n\t" 68 - : : : "d0" ); 69 - #endif /* CONFIG_M528x */ 70 - #if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || defined(CONFIG_M5272) 71 - __asm__ __volatile__ ( 72 - "movel #0x81000100, %%d0\n\t" 73 - "movec %%d0, %%CACR\n\t" 74 - "nop\n\t" 75 - : : : "d0" ); 76 - #endif /* CONFIG_M5206 || CONFIG_M5206e || CONFIG_M5272 */ 77 - #ifdef CONFIG_M5249 78 - __asm__ __volatile__ ( 79 - "movel #0xa1000200, %%d0\n\t" 80 - "movec %%d0, %%CACR\n\t" 81 - "nop\n\t" 82 - : : : "d0" ); 83 - #endif /* CONFIG_M5249 */ 84 - #ifdef CONFIG_M532x 85 - __asm__ __volatile__ ( 86 - "movel #0x81000200, %%d0\n\t" 87 - "movec %%d0, %%CACR\n\t" 88 - "nop\n\t" 89 - : : : "d0" ); 90 - #endif /* CONFIG_M532x */ 91 } 92 93 #endif /* _M68KNOMMU_CACHEFLUSH_H */
··· 2 #define _M68KNOMMU_CACHEFLUSH_H 3 4 /* 5 + * (C) Copyright 2000-2010, Greg Ungerer <gerg@snapgear.com> 6 */ 7 #include <linux/mm.h> 8 + #include <asm/mcfsim.h> 9 10 #define flush_cache_all() __flush_cache_all() 11 #define flush_cache_mm(mm) do { } while (0) 12 #define flush_cache_dup_mm(mm) do { } while (0) 13 + #define flush_cache_range(vma, start, end) do { } while (0) 14 #define flush_cache_page(vma, vmaddr) do { } while (0) 15 + #define flush_dcache_range(start, len) __flush_dcache_all() 16 #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0 17 #define flush_dcache_page(page) do { } while (0) 18 #define flush_dcache_mmap_lock(mapping) do { } while (0) 19 #define flush_dcache_mmap_unlock(mapping) do { } while (0) 20 + #define flush_icache_range(start, len) __flush_icache_all() 21 #define flush_icache_page(vma,pg) do { } while (0) 22 #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) 23 #define flush_cache_vmap(start, end) do { } while (0) ··· 27 #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ 28 memcpy(dst, src, len) 29 30 + void mcf_cache_push(void); 31 + 32 static inline void __flush_cache_all(void) 33 { 34 + #ifdef CACHE_PUSH 35 + mcf_cache_push(); 36 + #endif 37 + #ifdef CACHE_INVALIDATE 38 __asm__ __volatile__ ( 39 + "movel %0, %%d0\n\t" 40 "movec %%d0, %%CACR\n\t" 41 "nop\n\t" 42 + : : "i" (CACHE_INVALIDATE) : "d0" ); 43 + #endif 44 } 45 46 + /* 47 + * Some ColdFire parts implement separate instruction and data caches, 48 + * on those we should just flush the appropriate cache. If we don't need 49 + * to do any specific flushing then this will be optimized away. 50 + */ 51 + static inline void __flush_icache_all(void) 52 + { 53 + #ifdef CACHE_INVALIDATEI 54 + __asm__ __volatile__ ( 55 + "movel %0, %%d0\n\t" 56 + "movec %%d0, %%CACR\n\t" 57 + "nop\n\t" 58 + : : "i" (CACHE_INVALIDATEI) : "d0" ); 59 + #endif 60 + } 61 + 62 + static inline void __flush_dcache_all(void) 63 + { 64 + #ifdef CACHE_PUSH 65 + mcf_cache_push(); 66 + #endif 67 + #ifdef CACHE_INVALIDATED 68 + __asm__ __volatile__ ( 69 + "movel %0, %%d0\n\t" 70 + "movec %%d0, %%CACR\n\t" 71 + "nop\n\t" 72 + : : "i" (CACHE_INVALIDATED) : "d0" ); 73 + #else 74 + /* Flush the wrtite buffer */ 75 + __asm__ __volatile__ ( "nop" ); 76 + #endif 77 + } 78 #endif /* _M68KNOMMU_CACHEFLUSH_H */
+1 -1
arch/m68k/include/asm/coldfire.h
··· 32 */ 33 #define MCF_MBAR 0x10000000 34 #define MCF_MBAR2 0x80000000 35 - #if defined(CONFIG_M548x) 36 #define MCF_IPSBAR MCF_MBAR 37 #elif defined(CONFIG_M520x) 38 #define MCF_IPSBAR 0xFC000000
··· 32 */ 33 #define MCF_MBAR 0x10000000 34 #define MCF_MBAR2 0x80000000 35 + #if defined(CONFIG_M54xx) 36 #define MCF_IPSBAR MCF_MBAR 37 #elif defined(CONFIG_M520x) 38 #define MCF_IPSBAR 0xFC000000
+34 -25
arch/m68k/include/asm/entry_no.h
··· 42 */ 43 44 #ifdef CONFIG_COLDFIRE 45 /* 46 - * This is made a little more tricky on the ColdFire. There is no 47 - * separate kernel and user stack pointers. Need to artificially 48 * construct a usp in software... When doing this we need to disable 49 - * interrupts, otherwise bad things could happen. 50 */ 51 .macro SAVE_ALL 52 move #0x2700,%sr /* disable intrs */ 53 btst #5,%sp@(2) /* from user? */ ··· 78 7: 79 .endm 80 81 - .macro RESTORE_ALL 82 - btst #5,%sp@(PT_SR) /* going user? */ 83 - bnes 8f /* no, skip */ 84 move #0x2700,%sr /* disable intrs */ 85 movel sw_usp,%a0 /* get usp */ 86 movel %sp@(PT_OFF_PC),%a0@- /* copy exception program counter */ ··· 93 subql #8,sw_usp /* set exception */ 94 movel sw_usp,%sp /* restore usp */ 95 rte 96 - 8: 97 - moveml %sp@,%d1-%d5/%a0-%a2 98 - lea %sp@(32),%sp /* space for 8 regs */ 99 - movel %sp@+,%d0 100 - addql #4,%sp /* orig d0 */ 101 - addl %sp@+,%sp /* stkadj */ 102 - rte 103 .endm 104 105 /* 106 - * Quick exception save, use current stack only. 107 */ 108 - .macro SAVE_LOCAL 109 move #0x2700,%sr /* disable intrs */ 110 clrl %sp@- /* stkadj */ 111 movel %d0,%sp@- /* orig d0 */ ··· 117 moveml %d1-%d5/%a0-%a2,%sp@ 118 .endm 119 120 - .macro RESTORE_LOCAL 121 moveml %sp@,%d1-%d5/%a0-%a2 122 lea %sp@(32),%sp /* space for 8 regs */ 123 movel %sp@+,%d0 ··· 125 addl %sp@+,%sp /* stkadj */ 126 rte 127 .endm 128 129 .macro SAVE_SWITCH_STACK 130 lea %sp@(-24),%sp /* 6 regs */ ··· 147 moveml %sp@,%a3-%a6/%d6-%d7 148 lea %sp@(24),%sp /* 6 regs */ 149 .endm 150 - 151 - /* 152 - * Software copy of the user and kernel stack pointers... Ugh... 153 - * Need these to get around ColdFire not having separate kernel 154 - * and user stack pointers. 155 - */ 156 - .globl sw_usp 157 - .globl sw_ksp 158 159 #else /* !CONFIG_COLDFIRE */ 160 ··· 176 moveml %sp@+,%a3-%a6/%d6-%d7 177 .endm 178 179 - #endif /* !CONFIG_COLDFIRE */ 180 #endif /* __ASSEMBLY__ */ 181 #endif /* __M68KNOMMU_ENTRY_H */
··· 42 */ 43 44 #ifdef CONFIG_COLDFIRE 45 + #ifdef CONFIG_COLDFIRE_SW_A7 46 /* 47 + * This is made a little more tricky on older ColdFires. There is no 48 + * separate supervisor and user stack pointers. Need to artificially 49 * construct a usp in software... When doing this we need to disable 50 + * interrupts, otherwise bad things will happen. 51 */ 52 + .globl sw_usp 53 + .globl sw_ksp 54 + 55 .macro SAVE_ALL 56 move #0x2700,%sr /* disable intrs */ 57 btst #5,%sp@(2) /* from user? */ ··· 74 7: 75 .endm 76 77 + .macro RESTORE_USER 78 move #0x2700,%sr /* disable intrs */ 79 movel sw_usp,%a0 /* get usp */ 80 movel %sp@(PT_OFF_PC),%a0@- /* copy exception program counter */ ··· 91 subql #8,sw_usp /* set exception */ 92 movel sw_usp,%sp /* restore usp */ 93 rte 94 .endm 95 96 + .macro RDUSP 97 + movel sw_usp,%a2 98 + .endm 99 + 100 + .macro WRUSP 101 + movel %a0,sw_usp 102 + .endm 103 + 104 + #else /* !CONFIG_COLDFIRE_SW_A7 */ 105 /* 106 + * Modern ColdFire parts have separate supervisor and user stack 107 + * pointers. Simple load and restore macros for this case. 108 */ 109 + .macro SAVE_ALL 110 move #0x2700,%sr /* disable intrs */ 111 clrl %sp@- /* stkadj */ 112 movel %d0,%sp@- /* orig d0 */ ··· 112 moveml %d1-%d5/%a0-%a2,%sp@ 113 .endm 114 115 + .macro RESTORE_USER 116 moveml %sp@,%d1-%d5/%a0-%a2 117 lea %sp@(32),%sp /* space for 8 regs */ 118 movel %sp@+,%d0 ··· 120 addl %sp@+,%sp /* stkadj */ 121 rte 122 .endm 123 + 124 + .macro RDUSP 125 + /*move %usp,%a2*/ 126 + .word 0x4e6a 127 + .endm 128 + 129 + .macro WRUSP 130 + /*move %a0,%usp*/ 131 + .word 0x4e60 132 + .endm 133 + 134 + #endif /* !CONFIG_COLDFIRE_SW_A7 */ 135 136 .macro SAVE_SWITCH_STACK 137 lea %sp@(-24),%sp /* 6 regs */ ··· 130 moveml %sp@,%a3-%a6/%d6-%d7 131 lea %sp@(24),%sp /* 6 regs */ 132 .endm 133 134 #else /* !CONFIG_COLDFIRE */ 135 ··· 167 moveml %sp@+,%a3-%a6/%d6-%d7 168 .endm 169 170 + #endif /* !COLDFIRE_SW_A7 */ 171 #endif /* __ASSEMBLY__ */ 172 #endif /* __M68KNOMMU_ENTRY_H */
+1 -1
arch/m68k/include/asm/gpio.h
··· 37 #if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \ 38 defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ 39 defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ 40 - defined(CONFIG_M532x) || defined(CONFIG_M548x) 41 42 /* These parts have GPIO organized by 8 bit ports */ 43
··· 37 #if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \ 38 defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ 39 defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ 40 + defined(CONFIG_M532x) || defined(CONFIG_M54xx) 41 42 /* These parts have GPIO organized by 8 bit ports */ 43
-1
arch/m68k/include/asm/io_no.h
··· 145 #define IOMAP_WRITETHROUGH 3 146 147 extern void *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag); 148 - extern void __iounmap(void *addr, unsigned long size); 149 150 static inline void *ioremap(unsigned long physaddr, unsigned long size) 151 {
··· 145 #define IOMAP_WRITETHROUGH 3 146 147 extern void *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag); 148 149 static inline void *ioremap(unsigned long physaddr, unsigned long size) 150 {
+13 -1
arch/m68k/include/asm/m5206sim.h
··· 12 #define m5206sim_h 13 /****************************************************************************/ 14 15 16 /* 17 * Define the 5206 SIM register set addresses. ··· 92 #define MCFSIM_PADDR (MCF_MBAR + 0x1c5) /* Parallel Direction (r/w) */ 93 #define MCFSIM_PADAT (MCF_MBAR + 0x1c9) /* Parallel Port Value (r/w) */ 94 95 /* 96 * Define system peripheral IRQ usage. 97 */ ··· 107 #define MCF_IRQ_PROFILER 31 /* Timer1, Level 7 */ 108 109 /* 110 - * Generic GPIO 111 */ 112 #define MCFGPIO_PIN_MAX 8 113 #define MCFGPIO_IRQ_VECBASE -1
··· 12 #define m5206sim_h 13 /****************************************************************************/ 14 15 + #define CPU_NAME "COLDFIRE(m5206)" 16 + #define CPU_INSTR_PER_JIFFY 3 17 + 18 + #include <asm/m52xxacr.h> 19 20 /* 21 * Define the 5206 SIM register set addresses. ··· 88 #define MCFSIM_PADDR (MCF_MBAR + 0x1c5) /* Parallel Direction (r/w) */ 89 #define MCFSIM_PADAT (MCF_MBAR + 0x1c9) /* Parallel Port Value (r/w) */ 90 91 + #if defined(CONFIG_NETtel) 92 + #define MCFUART_BASE1 0x180 /* Base address of UART1 */ 93 + #define MCFUART_BASE2 0x140 /* Base address of UART2 */ 94 + #else 95 + #define MCFUART_BASE1 0x140 /* Base address of UART1 */ 96 + #define MCFUART_BASE2 0x180 /* Base address of UART2 */ 97 + #endif 98 + 99 /* 100 * Define system peripheral IRQ usage. 101 */ ··· 95 #define MCF_IRQ_PROFILER 31 /* Timer1, Level 7 */ 96 97 /* 98 + * Generic GPIO 99 */ 100 #define MCFGPIO_PIN_MAX 8 101 #define MCFGPIO_IRQ_VECBASE -1
+16 -1
arch/m68k/include/asm/m520xsim.h
··· 11 #define m520xsim_h 12 /****************************************************************************/ 13 14 /* 15 * Define the 520x SIM register set addresses. 16 */ ··· 59 #define MCFSIM_SDCS0 0x000a8110 /* SDRAM Chip Select 0 Configuration */ 60 #define MCFSIM_SDCS1 0x000a8114 /* SDRAM Chip Select 1 Configuration */ 61 62 #define MCFEPORT_EPDDR 0xFC088002 63 #define MCFEPORT_EPDR 0xFC088004 64 #define MCFEPORT_EPPDR 0xFC088005 ··· 105 #define MCFGPIO_PCLRR_UART 0xFC0A402A 106 #define MCFGPIO_PCLRR_FECH 0xFC0A402B 107 #define MCFGPIO_PCLRR_FECL 0xFC0A402C 108 /* 109 * Generic GPIO support 110 */ ··· 118 #define MCFGPIO_PIN_MAX 80 119 #define MCFGPIO_IRQ_MAX 8 120 #define MCFGPIO_IRQ_VECBASE MCFINT_VECBASE 121 - /****************************************************************************/ 122 123 #define MCF_GPIO_PAR_UART (0xA4036) 124 #define MCF_GPIO_PAR_FECI2C (0xA4033) ··· 132 133 #define MCF_GPIO_PAR_FECI2C_PAR_SDA_URXD2 (0x02) 134 #define MCF_GPIO_PAR_FECI2C_PAR_SCL_UTXD2 (0x04) 135 136 /* 137 * Reset Controll Unit.
··· 11 #define m520xsim_h 12 /****************************************************************************/ 13 14 + #define CPU_NAME "COLDFIRE(m520x)" 15 + #define CPU_INSTR_PER_JIFFY 3 16 + 17 + #include <asm/m52xxacr.h> 18 + 19 /* 20 * Define the 520x SIM register set addresses. 21 */ ··· 54 #define MCFSIM_SDCS0 0x000a8110 /* SDRAM Chip Select 0 Configuration */ 55 #define MCFSIM_SDCS1 0x000a8114 /* SDRAM Chip Select 1 Configuration */ 56 57 + /* 58 + * EPORT and GPIO registers. 59 + */ 60 #define MCFEPORT_EPDDR 0xFC088002 61 #define MCFEPORT_EPDR 0xFC088004 62 #define MCFEPORT_EPPDR 0xFC088005 ··· 97 #define MCFGPIO_PCLRR_UART 0xFC0A402A 98 #define MCFGPIO_PCLRR_FECH 0xFC0A402B 99 #define MCFGPIO_PCLRR_FECL 0xFC0A402C 100 + 101 /* 102 * Generic GPIO support 103 */ ··· 109 #define MCFGPIO_PIN_MAX 80 110 #define MCFGPIO_IRQ_MAX 8 111 #define MCFGPIO_IRQ_VECBASE MCFINT_VECBASE 112 113 #define MCF_GPIO_PAR_UART (0xA4036) 114 #define MCF_GPIO_PAR_FECI2C (0xA4033) ··· 124 125 #define MCF_GPIO_PAR_FECI2C_PAR_SDA_URXD2 (0x02) 126 #define MCF_GPIO_PAR_FECI2C_PAR_SCL_UTXD2 (0x04) 127 + 128 + /* 129 + * UART module. 130 + */ 131 + #define MCFUART_BASE1 0x60000 /* Base address of UART1 */ 132 + #define MCFUART_BASE2 0x64000 /* Base address of UART2 */ 133 + #define MCFUART_BASE3 0x68000 /* Base address of UART2 */ 134 135 /* 136 * Reset Controll Unit.
+11
arch/m68k/include/asm/m523xsim.h
··· 11 #define m523xsim_h 12 /****************************************************************************/ 13 14 15 /* 16 * Define the 523x SIM register set addresses. ··· 53 54 #define MCF_RCR_SWRESET 0x80 /* Software reset bit */ 55 #define MCF_RCR_FRCSTOUT 0x40 /* Force external reset */ 56 57 #define MCFGPIO_PODR_ADDR (MCF_IPSBAR + 0x100000) 58 #define MCFGPIO_PODR_DATAH (MCF_IPSBAR + 0x100001)
··· 11 #define m523xsim_h 12 /****************************************************************************/ 13 14 + #define CPU_NAME "COLDFIRE(m523x)" 15 + #define CPU_INSTR_PER_JIFFY 3 16 + 17 + #include <asm/m52xxacr.h> 18 19 /* 20 * Define the 523x SIM register set addresses. ··· 49 50 #define MCF_RCR_SWRESET 0x80 /* Software reset bit */ 51 #define MCF_RCR_FRCSTOUT 0x40 /* Force external reset */ 52 + 53 + /* 54 + * UART module. 55 + */ 56 + #define MCFUART_BASE1 0x200 /* Base address of UART1 */ 57 + #define MCFUART_BASE2 0x240 /* Base address of UART2 */ 58 + #define MCFUART_BASE3 0x280 /* Base address of UART3 */ 59 60 #define MCFGPIO_PODR_ADDR (MCF_IPSBAR + 0x100000) 61 #define MCFGPIO_PODR_DATAH (MCF_IPSBAR + 0x100001)
+10
arch/m68k/include/asm/m5249sim.h
··· 11 #define m5249sim_h 12 /****************************************************************************/ 13 14 /* 15 * Define the 5249 SIM register set addresses. 16 */ ··· 61 #define MCFSIM_DACR1 0x110 /* DRAM 1 Addr and Ctrl (r/w) */ 62 #define MCFSIM_DMR1 0x114 /* DRAM 1 Mask reg (r/w) */ 63 64 65 /* 66 * Some symbol defines for the above...
··· 11 #define m5249sim_h 12 /****************************************************************************/ 13 14 + #define CPU_NAME "COLDFIRE(m5249)" 15 + #define CPU_INSTR_PER_JIFFY 3 16 + 17 + #include <asm/m52xxacr.h> 18 + 19 /* 20 * Define the 5249 SIM register set addresses. 21 */ ··· 56 #define MCFSIM_DACR1 0x110 /* DRAM 1 Addr and Ctrl (r/w) */ 57 #define MCFSIM_DMR1 0x114 /* DRAM 1 Mask reg (r/w) */ 58 59 + /* 60 + * UART module. 61 + */ 62 + #define MCFUART_BASE1 0x1c0 /* Base address of UART1 */ 63 + #define MCFUART_BASE2 0x200 /* Base address of UART2 */ 64 65 /* 66 * Some symbol defines for the above...
+8
arch/m68k/include/asm/m5272sim.h
··· 12 #define m5272sim_h 13 /****************************************************************************/ 14 15 /* 16 * Define the 5272 SIM register set addresses. 17 */ ··· 66 #define MCFSIM_DCAR1 0x58 /* DRAM 1 Address reg (r/w) */ 67 #define MCFSIM_DCMR1 0x5c /* DRAM 1 Mask reg (r/w) */ 68 #define MCFSIM_DCCR1 0x63 /* DRAM 1 Control reg (r/w) */ 69 70 #define MCFSIM_PACNT (MCF_MBAR + 0x80) /* Port A Control (r/w) */ 71 #define MCFSIM_PADDR (MCF_MBAR + 0x84) /* Port A Direction (r/w) */
··· 12 #define m5272sim_h 13 /****************************************************************************/ 14 15 + #define CPU_NAME "COLDFIRE(m5272)" 16 + #define CPU_INSTR_PER_JIFFY 3 17 + 18 + #include <asm/m52xxacr.h> 19 + 20 /* 21 * Define the 5272 SIM register set addresses. 22 */ ··· 61 #define MCFSIM_DCAR1 0x58 /* DRAM 1 Address reg (r/w) */ 62 #define MCFSIM_DCMR1 0x5c /* DRAM 1 Mask reg (r/w) */ 63 #define MCFSIM_DCCR1 0x63 /* DRAM 1 Control reg (r/w) */ 64 + 65 + #define MCFUART_BASE1 0x100 /* Base address of UART1 */ 66 + #define MCFUART_BASE2 0x140 /* Base address of UART2 */ 67 68 #define MCFSIM_PACNT (MCF_MBAR + 0x80) /* Port A Control (r/w) */ 69 #define MCFSIM_PADDR (MCF_MBAR + 0x84) /* Port A Direction (r/w) */
+10
arch/m68k/include/asm/m527xsim.h
··· 11 #define m527xsim_h 12 /****************************************************************************/ 13 14 15 /* 16 * Define the 5270/5271 SIM register set addresses. ··· 59 #define MCFSIM_DMR1 0x5c /* SDRAM address mask 1 */ 60 #endif 61 62 63 #ifdef CONFIG_M5271 64 #define MCFGPIO_PODR_ADDR (MCF_IPSBAR + 0x100000)
··· 11 #define m527xsim_h 12 /****************************************************************************/ 13 14 + #define CPU_NAME "COLDFIRE(m527x)" 15 + #define CPU_INSTR_PER_JIFFY 3 16 + 17 + #include <asm/m52xxacr.h> 18 19 /* 20 * Define the 5270/5271 SIM register set addresses. ··· 55 #define MCFSIM_DMR1 0x5c /* SDRAM address mask 1 */ 56 #endif 57 58 + /* 59 + * UART module. 60 + */ 61 + #define MCFUART_BASE1 0x200 /* Base address of UART1 */ 62 + #define MCFUART_BASE2 0x240 /* Base address of UART2 */ 63 + #define MCFUART_BASE3 0x280 /* Base address of UART3 */ 64 65 #ifdef CONFIG_M5271 66 #define MCFGPIO_PODR_ADDR (MCF_IPSBAR + 0x100000)
+11
arch/m68k/include/asm/m528xsim.h
··· 11 #define m528xsim_h 12 /****************************************************************************/ 13 14 15 /* 16 * Define the 5280/5282 SIM register set addresses. ··· 44 #define MCFSIM_DMR0 0x4c /* SDRAM address mask 0 */ 45 #define MCFSIM_DACR1 0x50 /* SDRAM base address 1 */ 46 #define MCFSIM_DMR1 0x54 /* SDRAM address mask 1 */ 47 48 /* 49 * GPIO registers
··· 11 #define m528xsim_h 12 /****************************************************************************/ 13 14 + #define CPU_NAME "COLDFIRE(m528x)" 15 + #define CPU_INSTR_PER_JIFFY 3 16 + 17 + #include <asm/m52xxacr.h> 18 19 /* 20 * Define the 5280/5282 SIM register set addresses. ··· 40 #define MCFSIM_DMR0 0x4c /* SDRAM address mask 0 */ 41 #define MCFSIM_DACR1 0x50 /* SDRAM base address 1 */ 42 #define MCFSIM_DMR1 0x54 /* SDRAM address mask 1 */ 43 + 44 + /* 45 + * UART module. 46 + */ 47 + #define MCFUART_BASE1 0x200 /* Base address of UART1 */ 48 + #define MCFUART_BASE2 0x240 /* Base address of UART2 */ 49 + #define MCFUART_BASE3 0x280 /* Base address of UART3 */ 50 51 /* 52 * GPIO registers
+94
arch/m68k/include/asm/m52xxacr.h
···
··· 1 + /****************************************************************************/ 2 + 3 + /* 4 + * m52xxacr.h -- ColdFire version 2 core cache support 5 + * 6 + * (C) Copyright 2010, Greg Ungerer <gerg@snapgear.com> 7 + */ 8 + 9 + /****************************************************************************/ 10 + #ifndef m52xxacr_h 11 + #define m52xxacr_h 12 + /****************************************************************************/ 13 + 14 + /* 15 + * All varients of the ColdFire using version 2 cores have a similar 16 + * cache setup. Although not absolutely identical the cache register 17 + * definitions are compatible for all of them. Mostly they support a 18 + * configurable cache memory that can be instruction only, data only, 19 + * or split instruction and data. The exception is the very old version 2 20 + * core based parts, like the 5206(e), 5249 and 5272, which are instruction 21 + * cache only. Cache size varies from 2k up to 16k. 22 + */ 23 + 24 + /* 25 + * Define the Cache Control register flags. 26 + */ 27 + #define CACR_CENB 0x80000000 /* Enable cache */ 28 + #define CACR_CDPI 0x10000000 /* Disable invalidation by CPUSHL */ 29 + #define CACR_CFRZ 0x08000000 /* Cache freeze mode */ 30 + #define CACR_CINV 0x01000000 /* Invalidate cache */ 31 + #define CACR_DISI 0x00800000 /* Disable instruction cache */ 32 + #define CACR_DISD 0x00400000 /* Disable data cache */ 33 + #define CACR_INVI 0x00200000 /* Invalidate instruction cache */ 34 + #define CACR_INVD 0x00100000 /* Invalidate data cache */ 35 + #define CACR_CEIB 0x00000400 /* Non-cachable instruction burst */ 36 + #define CACR_DCM 0x00000200 /* Default cache mode */ 37 + #define CACR_DBWE 0x00000100 /* Buffered write enable */ 38 + #define CACR_DWP 0x00000020 /* Write protection */ 39 + #define CACR_EUSP 0x00000010 /* Enable separate user a7 */ 40 + 41 + /* 42 + * Define the Access Control register flags. 43 + */ 44 + #define ACR_BASE_POS 24 /* Address Base (upper 8 bits) */ 45 + #define ACR_MASK_POS 16 /* Address Mask (next 8 bits) */ 46 + #define ACR_ENABLE 0x00008000 /* Enable this ACR */ 47 + #define ACR_USER 0x00000000 /* Allow only user accesses */ 48 + #define ACR_SUPER 0x00002000 /* Allow supervisor access only */ 49 + #define ACR_ANY 0x00004000 /* Allow any access type */ 50 + #define ACR_CENB 0x00000000 /* Caching of region enabled */ 51 + #define ACR_CDIS 0x00000040 /* Caching of region disabled */ 52 + #define ACR_BWE 0x00000020 /* Write buffer enabled */ 53 + #define ACR_WPROTECT 0x00000004 /* Write protect region */ 54 + 55 + /* 56 + * Set the cache controller settings we will use. On the cores that support 57 + * a split cache configuration we allow all the combinations at Kconfig 58 + * time. For those cores that only have an instruction cache we just set 59 + * that as on. 60 + */ 61 + #if defined(CONFIG_CACHE_I) 62 + #define CACHE_TYPE (CACR_DISD + CACR_EUSP) 63 + #define CACHE_INVTYPEI 0 64 + #elif defined(CONFIG_CACHE_D) 65 + #define CACHE_TYPE (CACR_DISI + CACR_EUSP) 66 + #define CACHE_INVTYPED 0 67 + #elif defined(CONFIG_CACHE_BOTH) 68 + #define CACHE_TYPE CACR_EUSP 69 + #define CACHE_INVTYPEI CACR_INVI 70 + #define CACHE_INVTYPED CACR_INVD 71 + #else 72 + /* This is the instruction cache only devices (no split cache, no eusp) */ 73 + #define CACHE_TYPE 0 74 + #define CACHE_INVTYPEI 0 75 + #endif 76 + 77 + #define CACHE_INIT (CACR_CINV + CACHE_TYPE) 78 + #define CACHE_MODE (CACR_CENB + CACHE_TYPE + CACR_DCM) 79 + 80 + #define CACHE_INVALIDATE (CACHE_MODE + CACR_CINV) 81 + #if defined(CACHE_INVTYPEI) 82 + #define CACHE_INVALIDATEI (CACHE_MODE + CACR_CINV + CACHE_INVTYPEI) 83 + #endif 84 + #if defined(CACHE_INVTYPED) 85 + #define CACHE_INVALIDATED (CACHE_MODE + CACR_CINV + CACHE_INVTYPED) 86 + #endif 87 + 88 + #define ACR0_MODE ((CONFIG_RAMBASE & 0xff000000) + \ 89 + (0x000f0000) + \ 90 + (ACR_ENABLE + ACR_ANY + ACR_CENB + ACR_BWE)) 91 + #define ACR1_MODE 0 92 + 93 + /****************************************************************************/ 94 + #endif /* m52xxsim_h */
+16 -27
arch/m68k/include/asm/m5307sim.h
··· 14 #define m5307sim_h 15 /****************************************************************************/ 16 17 /* 18 * Define the 5307 SIM register set addresses. 19 */ ··· 99 #define MCFSIM_PADAT (MCF_MBAR + 0x248) 100 101 /* 102 * Generic GPIO support 103 */ 104 #define MCFGPIO_PIN_MAX 16 ··· 161 */ 162 #define MCF_IRQ_TIMER 30 /* Timer0, Level 6 */ 163 #define MCF_IRQ_PROFILER 31 /* Timer1, Level 7 */ 164 - 165 - /* 166 - * Define the Cache register flags. 167 - */ 168 - #define CACR_EC (1<<31) 169 - #define CACR_ESB (1<<29) 170 - #define CACR_DPI (1<<28) 171 - #define CACR_HLCK (1<<27) 172 - #define CACR_CINVA (1<<24) 173 - #define CACR_DNFB (1<<10) 174 - #define CACR_DCM_WTHRU (0<<8) 175 - #define CACR_DCM_WBACK (1<<8) 176 - #define CACR_DCM_OFF_PRE (2<<8) 177 - #define CACR_DCM_OFF_IMP (3<<8) 178 - #define CACR_DW (1<<5) 179 - 180 - #define ACR_BASE_POS 24 181 - #define ACR_MASK_POS 16 182 - #define ACR_ENABLE (1<<15) 183 - #define ACR_USER (0<<13) 184 - #define ACR_SUPER (1<<13) 185 - #define ACR_ANY (2<<13) 186 - #define ACR_CM_WTHRU (0<<5) 187 - #define ACR_CM_WBACK (1<<5) 188 - #define ACR_CM_OFF_PRE (2<<5) 189 - #define ACR_CM_OFF_IMP (3<<5) 190 - #define ACR_WPROTECT (1<<2) 191 192 /****************************************************************************/ 193 #endif /* m5307sim_h */
··· 14 #define m5307sim_h 15 /****************************************************************************/ 16 17 + #define CPU_NAME "COLDFIRE(m5307)" 18 + #define CPU_INSTR_PER_JIFFY 3 19 + 20 + #include <asm/m53xxacr.h> 21 + 22 /* 23 * Define the 5307 SIM register set addresses. 24 */ ··· 94 #define MCFSIM_PADAT (MCF_MBAR + 0x248) 95 96 /* 97 + * UART module. 98 + */ 99 + #if defined(CONFIG_NETtel) || defined(CONFIG_SECUREEDGEMP3) 100 + #define MCFUART_BASE1 0x200 /* Base address of UART1 */ 101 + #define MCFUART_BASE2 0x1c0 /* Base address of UART2 */ 102 + #else 103 + #define MCFUART_BASE1 0x1c0 /* Base address of UART1 */ 104 + #define MCFUART_BASE2 0x200 /* Base address of UART2 */ 105 + #endif 106 + 107 + /* 108 * Generic GPIO support 109 */ 110 #define MCFGPIO_PIN_MAX 16 ··· 145 */ 146 #define MCF_IRQ_TIMER 30 /* Timer0, Level 6 */ 147 #define MCF_IRQ_PROFILER 31 /* Timer1, Level 7 */ 148 149 /****************************************************************************/ 150 #endif /* m5307sim_h */
+9 -24
arch/m68k/include/asm/m532xsim.h
··· 9 #define m532xsim_h 10 /****************************************************************************/ 11 12 #define MCF_REG32(x) (*(volatile unsigned long *)(x)) 13 #define MCF_REG16(x) (*(volatile unsigned short *)(x)) 14 #define MCF_REG08(x) (*(volatile unsigned char *)(x)) ··· 79 #define MCF_IRQ_PROFILER (64 + 33) /* Timer1 */ 80 81 /* 82 - * Define the Cache register flags. 83 */ 84 - #define CACR_EC (1<<31) 85 - #define CACR_ESB (1<<29) 86 - #define CACR_DPI (1<<28) 87 - #define CACR_HLCK (1<<27) 88 - #define CACR_CINVA (1<<24) 89 - #define CACR_DNFB (1<<10) 90 - #define CACR_DCM_WTHRU (0<<8) 91 - #define CACR_DCM_WBACK (1<<8) 92 - #define CACR_DCM_OFF_PRE (2<<8) 93 - #define CACR_DCM_OFF_IMP (3<<8) 94 - #define CACR_DW (1<<5) 95 - 96 - #define ACR_BASE_POS 24 97 - #define ACR_MASK_POS 16 98 - #define ACR_ENABLE (1<<15) 99 - #define ACR_USER (0<<13) 100 - #define ACR_SUPER (1<<13) 101 - #define ACR_ANY (2<<13) 102 - #define ACR_CM_WTHRU (0<<5) 103 - #define ACR_CM_WBACK (1<<5) 104 - #define ACR_CM_OFF_PRE (2<<5) 105 - #define ACR_CM_OFF_IMP (3<<5) 106 - #define ACR_WPROTECT (1<<2) 107 108 /********************************************************************* 109 *
··· 9 #define m532xsim_h 10 /****************************************************************************/ 11 12 + #define CPU_NAME "COLDFIRE(m532x)" 13 + #define CPU_INSTR_PER_JIFFY 3 14 + 15 + #include <asm/m53xxacr.h> 16 + 17 #define MCF_REG32(x) (*(volatile unsigned long *)(x)) 18 #define MCF_REG16(x) (*(volatile unsigned short *)(x)) 19 #define MCF_REG08(x) (*(volatile unsigned char *)(x)) ··· 74 #define MCF_IRQ_PROFILER (64 + 33) /* Timer1 */ 75 76 /* 77 + * UART module. 78 */ 79 + #define MCFUART_BASE1 0xFC060000 /* Base address of UART1 */ 80 + #define MCFUART_BASE2 0xFC064000 /* Base address of UART2 */ 81 + #define MCFUART_BASE3 0xFC068000 /* Base address of UART3 */ 82 83 /********************************************************************* 84 *
+101
arch/m68k/include/asm/m53xxacr.h
···
··· 1 + /****************************************************************************/ 2 + 3 + /* 4 + * m53xxacr.h -- ColdFire version 3 core cache support 5 + * 6 + * (C) Copyright 2010, Greg Ungerer <gerg@snapgear.com> 7 + */ 8 + 9 + /****************************************************************************/ 10 + #ifndef m53xxacr_h 11 + #define m53xxacr_h 12 + /****************************************************************************/ 13 + 14 + /* 15 + * All varients of the ColdFire using version 3 cores have a similar 16 + * cache setup. They have a unified instruction and data cache, with 17 + * configurable write-through or copy-back operation. 18 + */ 19 + 20 + /* 21 + * Define the Cache Control register flags. 22 + */ 23 + #define CACR_EC 0x80000000 /* Enable cache */ 24 + #define CACR_ESB 0x20000000 /* Enable store buffer */ 25 + #define CACR_DPI 0x10000000 /* Disable invalidation by CPUSHL */ 26 + #define CACR_HLCK 0x08000000 /* Half cache lock mode */ 27 + #define CACR_CINVA 0x01000000 /* Invalidate cache */ 28 + #define CACR_DNFB 0x00000400 /* Inhibited fill buffer */ 29 + #define CACR_DCM_WT 0x00000000 /* Cacheable write-through */ 30 + #define CACR_DCM_CB 0x00000100 /* Cacheable copy-back */ 31 + #define CACR_DCM_PRE 0x00000200 /* Cache inhibited, precise */ 32 + #define CACR_DCM_IMPRE 0x00000300 /* Cache inhibited, imprecise */ 33 + #define CACR_WPROTECT 0x00000020 /* Write protect*/ 34 + #define CACR_EUSP 0x00000010 /* Eanble separate user a7 */ 35 + 36 + /* 37 + * Define the Access Control register flags. 38 + */ 39 + #define ACR_BASE_POS 24 /* Address Base (upper 8 bits) */ 40 + #define ACR_MASK_POS 16 /* Address Mask (next 8 bits) */ 41 + #define ACR_ENABLE 0x00008000 /* Enable this ACR */ 42 + #define ACR_USER 0x00000000 /* Allow only user accesses */ 43 + #define ACR_SUPER 0x00002000 /* Allow supervisor access only */ 44 + #define ACR_ANY 0x00004000 /* Allow any access type */ 45 + #define ACR_CM_WT 0x00000000 /* Cacheable, write-through */ 46 + #define ACR_CM_CB 0x00000020 /* Cacheable, copy-back */ 47 + #define ACR_CM_PRE 0x00000040 /* Cache inhibited, precise */ 48 + #define ACR_CM_IMPRE 0x00000060 /* Cache inhibited, imprecise */ 49 + #define ACR_WPROTECT 0x00000004 /* Write protect region */ 50 + 51 + /* 52 + * Define the cache type and arrangement (needed for pushes). 53 + */ 54 + #if defined(CONFIG_M5307) 55 + #define CACHE_SIZE 0x2000 /* 8k of unified cache */ 56 + #define ICACHE_SIZE CACHE_SIZE 57 + #define DCACHE_SIZE CACHE_SIZE 58 + #elif defined(CONFIG_M532x) 59 + #define CACHE_SIZE 0x4000 /* 32k of unified cache */ 60 + #define ICACHE_SIZE CACHE_SIZE 61 + #define DCACHE_SIZE CACHE_SIZE 62 + #endif 63 + 64 + #define CACHE_LINE_SIZE 16 /* 16 byte line size */ 65 + #define CACHE_WAYS 4 /* 4 ways - set associative */ 66 + 67 + /* 68 + * Set the cache controller settings we will use. This default in the 69 + * CACR is cache inhibited, we use the ACR register to set cacheing 70 + * enabled on the regions we want (eg RAM). 71 + */ 72 + #if defined(CONFIG_CACHE_COPYBACK) 73 + #define CACHE_TYPE ACR_CM_CB 74 + #define CACHE_PUSH 75 + #else 76 + #define CACHE_TYPE ACR_CM_WT 77 + #endif 78 + 79 + #ifdef CONFIG_COLDFIRE_SW_A7 80 + #define CACHE_MODE (CACR_EC + CACR_ESB + CACR_DCM_PRE) 81 + #else 82 + #define CACHE_MODE (CACR_EC + CACR_ESB + CACR_DCM_PRE + CACR_EUSP) 83 + #endif 84 + 85 + /* 86 + * Unified cache means we will never need to flush for coherency of 87 + * instruction fetch. We will need to flush to maintain memory/DMA 88 + * coherency though in all cases. And for copyback caches we will need 89 + * to push cached data as well. 90 + */ 91 + #define CACHE_INIT CACR_CINVA 92 + #define CACHE_INVALIDATE CACR_CINVA 93 + #define CACHE_INVALIDATED CACR_CINVA 94 + 95 + #define ACR0_MODE ((CONFIG_RAMBASE & 0xff000000) + \ 96 + (0x000f0000) + \ 97 + (ACR_ENABLE + ACR_ANY + CACHE_TYPE)) 98 + #define ACR1_MODE 0 99 + 100 + /****************************************************************************/ 101 + #endif /* m53xxsim_h */
+8 -34
arch/m68k/include/asm/m5407sim.h
··· 14 #define m5407sim_h 15 /****************************************************************************/ 16 17 /* 18 * Define the 5407 SIM register set addresses. 19 */ ··· 78 #define MCFSIM_DACR1 0x110 /* DRAM 1 Addr and Ctrl (r/w) */ 79 #define MCFSIM_DMR1 0x114 /* DRAM 1 Mask reg (r/w) */ 80 81 #define MCFSIM_PADDR (MCF_MBAR + 0x244) 82 #define MCFSIM_PADAT (MCF_MBAR + 0x248) 83 ··· 124 */ 125 #define MCF_IRQ_TIMER 30 /* Timer0, Level 6 */ 126 #define MCF_IRQ_PROFILER 31 /* Timer1, Level 7 */ 127 - 128 - /* 129 - * Define the Cache register flags. 130 - */ 131 - #define CACR_DEC 0x80000000 /* Enable data cache */ 132 - #define CACR_DWP 0x40000000 /* Data write protection */ 133 - #define CACR_DESB 0x20000000 /* Enable data store buffer */ 134 - #define CACR_DDPI 0x10000000 /* Disable CPUSHL */ 135 - #define CACR_DHCLK 0x08000000 /* Half data cache lock mode */ 136 - #define CACR_DDCM_WT 0x00000000 /* Write through cache*/ 137 - #define CACR_DDCM_CP 0x02000000 /* Copyback cache */ 138 - #define CACR_DDCM_P 0x04000000 /* No cache, precise */ 139 - #define CACR_DDCM_IMP 0x06000000 /* No cache, imprecise */ 140 - #define CACR_DCINVA 0x01000000 /* Invalidate data cache */ 141 - #define CACR_BEC 0x00080000 /* Enable branch cache */ 142 - #define CACR_BCINVA 0x00040000 /* Invalidate branch cache */ 143 - #define CACR_IEC 0x00008000 /* Enable instruction cache */ 144 - #define CACR_DNFB 0x00002000 /* Inhibited fill buffer */ 145 - #define CACR_IDPI 0x00001000 /* Disable CPUSHL */ 146 - #define CACR_IHLCK 0x00000800 /* Intruction cache half lock */ 147 - #define CACR_IDCM 0x00000400 /* Intruction cache inhibit */ 148 - #define CACR_ICINVA 0x00000100 /* Invalidate instr cache */ 149 - 150 - #define ACR_BASE_POS 24 /* Address Base */ 151 - #define ACR_MASK_POS 16 /* Address Mask */ 152 - #define ACR_ENABLE 0x00008000 /* Enable address */ 153 - #define ACR_USER 0x00000000 /* User mode access only */ 154 - #define ACR_SUPER 0x00002000 /* Supervisor mode only */ 155 - #define ACR_ANY 0x00004000 /* Match any access mode */ 156 - #define ACR_CM_WT 0x00000000 /* Write through mode */ 157 - #define ACR_CM_CP 0x00000020 /* Copyback mode */ 158 - #define ACR_CM_OFF_PRE 0x00000040 /* No cache, precise */ 159 - #define ACR_CM_OFF_IMP 0x00000060 /* No cache, imprecise */ 160 - #define ACR_WPROTECT 0x00000004 /* Write protect */ 161 162 /****************************************************************************/ 163 #endif /* m5407sim_h */
··· 14 #define m5407sim_h 15 /****************************************************************************/ 16 17 + #define CPU_NAME "COLDFIRE(m5407)" 18 + #define CPU_INSTR_PER_JIFFY 3 19 + 20 + #include <asm/m54xxacr.h> 21 + 22 /* 23 * Define the 5407 SIM register set addresses. 24 */ ··· 73 #define MCFSIM_DACR1 0x110 /* DRAM 1 Addr and Ctrl (r/w) */ 74 #define MCFSIM_DMR1 0x114 /* DRAM 1 Mask reg (r/w) */ 75 76 + #define MCFUART_BASE1 0x1c0 /* Base address of UART1 */ 77 + #define MCFUART_BASE2 0x200 /* Base address of UART2 */ 78 + 79 #define MCFSIM_PADDR (MCF_MBAR + 0x244) 80 #define MCFSIM_PADAT (MCF_MBAR + 0x248) 81 ··· 116 */ 117 #define MCF_IRQ_TIMER 30 /* Timer0, Level 6 */ 118 #define MCF_IRQ_PROFILER 31 /* Timer1, Level 7 */ 119 120 /****************************************************************************/ 121 #endif /* m5407sim_h */
+5 -5
arch/m68k/include/asm/m548xgpt.h arch/m68k/include/asm/m54xxgpt.h
··· 1 /* 2 - * File: m548xgpt.h 3 - * Purpose: Register and bit definitions for the MCF548X 4 * 5 * Notes: 6 * 7 */ 8 9 - #ifndef m548xgpt_h 10 - #define m548xgpt_h 11 12 /********************************************************************* 13 * ··· 87 88 /********************************************************************/ 89 90 - #endif /* m548xgpt_h */
··· 1 /* 2 + * File: m54xxgpt.h 3 + * Purpose: Register and bit definitions for the MCF54XX 4 * 5 * Notes: 6 * 7 */ 8 9 + #ifndef m54xxgpt_h 10 + #define m54xxgpt_h 11 12 /********************************************************************* 13 * ··· 87 88 /********************************************************************/ 89 90 + #endif /* m54xxgpt_h */
+18 -5
arch/m68k/include/asm/m548xsim.h arch/m68k/include/asm/m54xxsim.h
··· 1 /* 2 - * m548xsim.h -- ColdFire 547x/548x System Integration Unit support. 3 */ 4 5 - #ifndef m548xsim_h 6 - #define m548xsim_h 7 8 - #define MCFINT_VECBASE 64 9 10 /* 11 * Interrupt Controller Registers ··· 25 #define MCFINTC_IRLR 0x18 /* */ 26 #define MCFINTC_IACKL 0x19 /* */ 27 #define MCFINTC_ICR0 0x40 /* Base ICR register */ 28 29 /* 30 * Define system peripheral IRQ usage. ··· 65 #define MCF_PAR_PSC_RTS_RTS (0x30) 66 #define MCF_PAR_PSC_CANRX (0x40) 67 68 - #endif /* m548xsim_h */
··· 1 /* 2 + * m54xxsim.h -- ColdFire 547x/548x System Integration Unit support. 3 */ 4 5 + #ifndef m54xxsim_h 6 + #define m54xxsim_h 7 8 + #define CPU_NAME "COLDFIRE(m54xx)" 9 + #define CPU_INSTR_PER_JIFFY 2 10 + 11 + #include <asm/m54xxacr.h> 12 + 13 + #define MCFINT_VECBASE 64 14 15 /* 16 * Interrupt Controller Registers ··· 20 #define MCFINTC_IRLR 0x18 /* */ 21 #define MCFINTC_IACKL 0x19 /* */ 22 #define MCFINTC_ICR0 0x40 /* Base ICR register */ 23 + 24 + /* 25 + * UART module. 26 + */ 27 + #define MCFUART_BASE1 0x8600 /* Base address of UART1 */ 28 + #define MCFUART_BASE2 0x8700 /* Base address of UART2 */ 29 + #define MCFUART_BASE3 0x8800 /* Base address of UART3 */ 30 + #define MCFUART_BASE4 0x8900 /* Base address of UART4 */ 31 32 /* 33 * Define system peripheral IRQ usage. ··· 52 #define MCF_PAR_PSC_RTS_RTS (0x30) 53 #define MCF_PAR_PSC_CANRX (0x40) 54 55 + #endif /* m54xxsim_h */
+97
arch/m68k/include/asm/m54xxacr.h
···
··· 1 + /* 2 + * Bit definitions for the MCF54xx ACR and CACR registers. 3 + */ 4 + 5 + #ifndef m54xxacr_h 6 + #define m54xxacr_h 7 + 8 + /* 9 + * Define the Cache register flags. 10 + */ 11 + #define CACR_DEC 0x80000000 /* Enable data cache */ 12 + #define CACR_DWP 0x40000000 /* Data write protection */ 13 + #define CACR_DESB 0x20000000 /* Enable data store buffer */ 14 + #define CACR_DDPI 0x10000000 /* Disable invalidation by CPUSHL */ 15 + #define CACR_DHCLK 0x08000000 /* Half data cache lock mode */ 16 + #define CACR_DDCM_WT 0x00000000 /* Write through cache*/ 17 + #define CACR_DDCM_CP 0x02000000 /* Copyback cache */ 18 + #define CACR_DDCM_P 0x04000000 /* No cache, precise */ 19 + #define CACR_DDCM_IMP 0x06000000 /* No cache, imprecise */ 20 + #define CACR_DCINVA 0x01000000 /* Invalidate data cache */ 21 + #define CACR_BEC 0x00080000 /* Enable branch cache */ 22 + #define CACR_BCINVA 0x00040000 /* Invalidate branch cache */ 23 + #define CACR_IEC 0x00008000 /* Enable instruction cache */ 24 + #define CACR_DNFB 0x00002000 /* Inhibited fill buffer */ 25 + #define CACR_IDPI 0x00001000 /* Disable CPUSHL */ 26 + #define CACR_IHLCK 0x00000800 /* Intruction cache half lock */ 27 + #define CACR_IDCM 0x00000400 /* Intruction cache inhibit */ 28 + #define CACR_ICINVA 0x00000100 /* Invalidate instr cache */ 29 + #define CACR_EUSP 0x00000020 /* Enable separate user a7 */ 30 + 31 + #define ACR_BASE_POS 24 /* Address Base */ 32 + #define ACR_MASK_POS 16 /* Address Mask */ 33 + #define ACR_ENABLE 0x00008000 /* Enable address */ 34 + #define ACR_USER 0x00000000 /* User mode access only */ 35 + #define ACR_SUPER 0x00002000 /* Supervisor mode only */ 36 + #define ACR_ANY 0x00004000 /* Match any access mode */ 37 + #define ACR_CM_WT 0x00000000 /* Write through mode */ 38 + #define ACR_CM_CP 0x00000020 /* Copyback mode */ 39 + #define ACR_CM_OFF_PRE 0x00000040 /* No cache, precise */ 40 + #define ACR_CM_OFF_IMP 0x00000060 /* No cache, imprecise */ 41 + #define ACR_CM 0x00000060 /* Cache mode mask */ 42 + #define ACR_WPROTECT 0x00000004 /* Write protect */ 43 + 44 + #if defined(CONFIG_M5407) 45 + 46 + #define ICACHE_SIZE 0x4000 /* instruction - 16k */ 47 + #define DCACHE_SIZE 0x2000 /* data - 8k */ 48 + 49 + #elif defined(CONFIG_M54xx) 50 + 51 + #define ICACHE_SIZE 0x8000 /* instruction - 32k */ 52 + #define DCACHE_SIZE 0x8000 /* data - 32k */ 53 + 54 + #endif 55 + 56 + #define CACHE_LINE_SIZE 0x0010 /* 16 bytes */ 57 + #define CACHE_WAYS 4 /* 4 ways */ 58 + 59 + /* 60 + * Version 4 cores have a true harvard style separate instruction 61 + * and data cache. Enable data and instruction caches, also enable write 62 + * buffers and branch accelerator. 63 + */ 64 + /* attention : enabling CACR_DESB requires a "nop" to flush the store buffer */ 65 + /* use '+' instead of '|' for assembler's sake */ 66 + 67 + /* Enable data cache */ 68 + /* Enable data store buffer */ 69 + /* outside ACRs : No cache, precise */ 70 + /* Enable instruction+branch caches */ 71 + #if defined(CONFIG_M5407) 72 + #define CACHE_MODE (CACR_DEC+CACR_DESB+CACR_DDCM_P+CACR_BEC+CACR_IEC) 73 + #else 74 + #define CACHE_MODE (CACR_DEC+CACR_DESB+CACR_DDCM_P+CACR_BEC+CACR_IEC+CACR_EUSP) 75 + #endif 76 + #if defined(CONFIG_CACHE_COPYBACK) 77 + #define DATA_CACHE_MODE (ACR_ENABLE+ACR_ANY+ACR_CM_CP) 78 + #else 79 + #define DATA_CACHE_MODE (ACR_ENABLE+ACR_ANY+ACR_CM_WT) 80 + #endif 81 + #define INSN_CACHE_MODE (ACR_ENABLE+ACR_ANY) 82 + 83 + #define CACHE_INIT (CACR_DCINVA+CACR_BCINVA+CACR_ICINVA) 84 + #define CACHE_INVALIDATE (CACHE_MODE+CACR_DCINVA+CACR_BCINVA+CACR_ICINVA) 85 + #define CACHE_INVALIDATEI (CACHE_MODE+CACR_BCINVA+CACR_ICINVA) 86 + #define CACHE_INVALIDATED (CACHE_MODE+CACR_DCINVA) 87 + #define ACR0_MODE (0x000f0000+DATA_CACHE_MODE) 88 + #define ACR1_MODE 0 89 + #define ACR2_MODE (0x000f0000+INSN_CACHE_MODE) 90 + #define ACR3_MODE 0 91 + 92 + #if ((DATA_CACHE_MODE & ACR_CM) == ACR_CM_CP) 93 + /* Copyback cache mode must push dirty cache lines first */ 94 + #define CACHE_PUSH 95 + #endif 96 + 97 + #endif /* m54xxacr_h */
-150
arch/m68k/include/asm/mcfcache.h
··· 1 - /****************************************************************************/ 2 - 3 - /* 4 - * mcfcache.h -- ColdFire CPU cache support code 5 - * 6 - * (C) Copyright 2004, Greg Ungerer <gerg@snapgear.com> 7 - */ 8 - 9 - /****************************************************************************/ 10 - #ifndef __M68KNOMMU_MCFCACHE_H 11 - #define __M68KNOMMU_MCFCACHE_H 12 - /****************************************************************************/ 13 - 14 - 15 - /* 16 - * The different ColdFire families have different cache arrangments. 17 - * Everything from a small instruction only cache, to configurable 18 - * data and/or instruction cache, to unified instruction/data, to 19 - * harvard style separate instruction and data caches. 20 - */ 21 - 22 - #if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || defined(CONFIG_M5272) 23 - /* 24 - * Simple version 2 core cache. These have instruction cache only, 25 - * we just need to invalidate it and enable it. 26 - */ 27 - .macro CACHE_ENABLE 28 - movel #0x01000000,%d0 /* invalidate cache cmd */ 29 - movec %d0,%CACR /* do invalidate cache */ 30 - movel #0x80000100,%d0 /* setup cache mask */ 31 - movec %d0,%CACR /* enable cache */ 32 - .endm 33 - #endif /* CONFIG_M5206 || CONFIG_M5206e || CONFIG_M5272 */ 34 - 35 - #if defined(CONFIG_M523x) || defined(CONFIG_M527x) 36 - /* 37 - * New version 2 cores have a configurable split cache arrangement. 38 - * For now I am just enabling instruction cache - but ultimately I 39 - * think a split instruction/data cache would be better. 40 - */ 41 - .macro CACHE_ENABLE 42 - movel #0x01400000,%d0 43 - movec %d0,%CACR /* invalidate cache */ 44 - nop 45 - movel #0x0000c000,%d0 /* set SDRAM cached only */ 46 - movec %d0,%ACR0 47 - movel #0x00000000,%d0 /* no other regions cached */ 48 - movec %d0,%ACR1 49 - movel #0x80400100,%d0 /* configure cache */ 50 - movec %d0,%CACR /* enable cache */ 51 - nop 52 - .endm 53 - #endif /* CONFIG_M523x || CONFIG_M527x */ 54 - 55 - #if defined(CONFIG_M528x) 56 - .macro CACHE_ENABLE 57 - nop 58 - movel #0x01000000, %d0 59 - movec %d0, %CACR /* Invalidate cache */ 60 - nop 61 - movel #0x0000c020, %d0 /* Set SDRAM cached only */ 62 - movec %d0, %ACR0 63 - movel #0x00000000, %d0 /* No other regions cached */ 64 - movec %d0, %ACR1 65 - movel #0x80000200, %d0 /* Setup cache mask */ 66 - movec %d0, %CACR /* Enable cache */ 67 - nop 68 - .endm 69 - #endif /* CONFIG_M528x */ 70 - 71 - #if defined(CONFIG_M5249) || defined(CONFIG_M5307) 72 - /* 73 - * The version 3 core cache. Oddly enough the version 2 core 5249 74 - * has the same SDRAM and cache setup as the version 3 cores. 75 - * This is a single unified instruction/data cache. 76 - */ 77 - .macro CACHE_ENABLE 78 - movel #0x01000000,%d0 /* invalidate whole cache */ 79 - movec %d0,%CACR 80 - nop 81 - #if defined(DEBUGGER_COMPATIBLE_CACHE) || defined(CONFIG_SECUREEDGEMP3) 82 - movel #0x0000c000,%d0 /* set SDRAM cached (write-thru) */ 83 - #else 84 - movel #0x0000c020,%d0 /* set SDRAM cached (copyback) */ 85 - #endif 86 - movec %d0,%ACR0 87 - movel #0x00000000,%d0 /* no other regions cached */ 88 - movec %d0,%ACR1 89 - movel #0xa0000200,%d0 /* enable cache */ 90 - movec %d0,%CACR 91 - nop 92 - .endm 93 - #endif /* CONFIG_M5249 || CONFIG_M5307 */ 94 - 95 - #if defined(CONFIG_M532x) 96 - .macro CACHE_ENABLE 97 - movel #0x01000000,%d0 /* invalidate cache cmd */ 98 - movec %d0,%CACR /* do invalidate cache */ 99 - nop 100 - movel #0x4001C000,%d0 /* set SDRAM cached (write-thru) */ 101 - movec %d0,%ACR0 102 - movel #0x00000000,%d0 /* no other regions cached */ 103 - movec %d0,%ACR1 104 - movel #0x80000200,%d0 /* setup cache mask */ 105 - movec %d0,%CACR /* enable cache */ 106 - nop 107 - .endm 108 - #endif /* CONFIG_M532x */ 109 - 110 - #if defined(CONFIG_M5407) || defined(CONFIG_M548x) 111 - /* 112 - * Version 4 cores have a true harvard style separate instruction 113 - * and data cache. Invalidate and enable cache, also enable write 114 - * buffers and branch accelerator. 115 - */ 116 - .macro CACHE_ENABLE 117 - movel #0x01040100,%d0 /* invalidate whole cache */ 118 - movec %d0,%CACR 119 - nop 120 - movel #0x000fc000,%d0 /* set SDRAM cached only */ 121 - movec %d0, %ACR0 122 - movel #0x00000000,%d0 /* no other regions cached */ 123 - movec %d0, %ACR1 124 - movel #0x000fc000,%d0 /* set SDRAM cached only */ 125 - movec %d0, %ACR2 126 - movel #0x00000000,%d0 /* no other regions cached */ 127 - movec %d0, %ACR3 128 - movel #0xb6088400,%d0 /* enable caches */ 129 - movec %d0,%CACR 130 - nop 131 - .endm 132 - #endif /* CONFIG_M5407 */ 133 - 134 - #if defined(CONFIG_M520x) 135 - .macro CACHE_ENABLE 136 - move.l #0x01000000,%d0 /* invalidate whole cache */ 137 - movec %d0,%CACR 138 - nop 139 - move.l #0x0000c000,%d0 /* set SDRAM cached (write-thru) */ 140 - movec %d0,%ACR0 141 - move.l #0x00000000,%d0 /* no other regions cached */ 142 - movec %d0,%ACR1 143 - move.l #0x80400000,%d0 /* enable 8K instruction cache */ 144 - movec %d0,%CACR 145 - nop 146 - .endm 147 - #endif /* CONFIG_M520x */ 148 - 149 - /****************************************************************************/ 150 - #endif /* __M68KNOMMU_MCFCACHE_H */
···
+2 -2
arch/m68k/include/asm/mcfsim.h
··· 41 #elif defined(CONFIG_M5407) 42 #include <asm/m5407sim.h> 43 #include <asm/mcfintc.h> 44 - #elif defined(CONFIG_M548x) 45 - #include <asm/m548xsim.h> 46 #endif 47 48 /****************************************************************************/
··· 41 #elif defined(CONFIG_M5407) 42 #include <asm/m5407sim.h> 43 #include <asm/mcfintc.h> 44 + #elif defined(CONFIG_M54xx) 45 + #include <asm/m54xxsim.h> 46 #endif 47 48 /****************************************************************************/
+1 -44
arch/m68k/include/asm/mcfuart.h
··· 12 #define mcfuart_h 13 /****************************************************************************/ 14 15 - /* 16 - * Define the base address of the UARTS within the MBAR address 17 - * space. 18 - */ 19 - #if defined(CONFIG_M5272) 20 - #define MCFUART_BASE1 0x100 /* Base address of UART1 */ 21 - #define MCFUART_BASE2 0x140 /* Base address of UART2 */ 22 - #elif defined(CONFIG_M5206) || defined(CONFIG_M5206e) 23 - #if defined(CONFIG_NETtel) 24 - #define MCFUART_BASE1 0x180 /* Base address of UART1 */ 25 - #define MCFUART_BASE2 0x140 /* Base address of UART2 */ 26 - #else 27 - #define MCFUART_BASE1 0x140 /* Base address of UART1 */ 28 - #define MCFUART_BASE2 0x180 /* Base address of UART2 */ 29 - #endif 30 - #elif defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) 31 - #define MCFUART_BASE1 0x200 /* Base address of UART1 */ 32 - #define MCFUART_BASE2 0x240 /* Base address of UART2 */ 33 - #define MCFUART_BASE3 0x280 /* Base address of UART3 */ 34 - #elif defined(CONFIG_M5249) || defined(CONFIG_M5307) || defined(CONFIG_M5407) 35 - #if defined(CONFIG_NETtel) || defined(CONFIG_SECUREEDGEMP3) 36 - #define MCFUART_BASE1 0x200 /* Base address of UART1 */ 37 - #define MCFUART_BASE2 0x1c0 /* Base address of UART2 */ 38 - #else 39 - #define MCFUART_BASE1 0x1c0 /* Base address of UART1 */ 40 - #define MCFUART_BASE2 0x200 /* Base address of UART2 */ 41 - #endif 42 - #elif defined(CONFIG_M520x) 43 - #define MCFUART_BASE1 0x60000 /* Base address of UART1 */ 44 - #define MCFUART_BASE2 0x64000 /* Base address of UART2 */ 45 - #define MCFUART_BASE3 0x68000 /* Base address of UART2 */ 46 - #elif defined(CONFIG_M532x) 47 - #define MCFUART_BASE1 0xfc060000 /* Base address of UART1 */ 48 - #define MCFUART_BASE2 0xfc064000 /* Base address of UART2 */ 49 - #define MCFUART_BASE3 0xfc068000 /* Base address of UART3 */ 50 - #elif defined(CONFIG_M548x) 51 - #define MCFUART_BASE1 0x8600 /* on M548x */ 52 - #define MCFUART_BASE2 0x8700 /* on M548x */ 53 - #define MCFUART_BASE3 0x8800 /* on M548x */ 54 - #define MCFUART_BASE4 0x8900 /* on M548x */ 55 - #endif 56 - 57 - 58 #include <linux/serial_core.h> 59 #include <linux/platform_device.h> 60 ··· 174 #define MCFUART_URF_RXS 0xc0 /* Receiver status */ 175 #endif 176 177 - #if defined(CONFIG_M548x) 178 #define MCFUART_TXFIFOSIZE 512 179 #elif defined(CONFIG_M5272) 180 #define MCFUART_TXFIFOSIZE 25
··· 12 #define mcfuart_h 13 /****************************************************************************/ 14 15 #include <linux/serial_core.h> 16 #include <linux/platform_device.h> 17 ··· 217 #define MCFUART_URF_RXS 0xc0 /* Receiver status */ 218 #endif 219 220 + #if defined(CONFIG_M54xx) 221 #define MCFUART_TXFIFOSIZE 512 222 #elif defined(CONFIG_M5272) 223 #define MCFUART_TXFIFOSIZE 25
+8 -5
arch/m68k/include/asm/processor.h
··· 20 21 static inline unsigned long rdusp(void) 22 { 23 - #ifdef CONFIG_COLDFIRE 24 extern unsigned int sw_usp; 25 return sw_usp; 26 #else 27 - unsigned long usp; 28 - __asm__ __volatile__("move %/usp,%0" : "=a" (usp)); 29 return usp; 30 #endif 31 } 32 33 static inline void wrusp(unsigned long usp) 34 { 35 - #ifdef CONFIG_COLDFIRE 36 extern unsigned int sw_usp; 37 sw_usp = usp; 38 #else 39 - __asm__ __volatile__("move %0,%/usp" : : "a" (usp)); 40 #endif 41 } 42
··· 20 21 static inline unsigned long rdusp(void) 22 { 23 + #ifdef CONFIG_COLDFIRE_SW_A7 24 extern unsigned int sw_usp; 25 return sw_usp; 26 #else 27 + register unsigned long usp __asm__("a0"); 28 + /* move %usp,%a0 */ 29 + __asm__ __volatile__(".word 0x4e68" : "=a" (usp)); 30 return usp; 31 #endif 32 } 33 34 static inline void wrusp(unsigned long usp) 35 { 36 + #ifdef CONFIG_COLDFIRE_SW_A7 37 extern unsigned int sw_usp; 38 sw_usp = usp; 39 #else 40 + register unsigned long a0 __asm__("a0") = usp; 41 + /* move %a0,%usp */ 42 + __asm__ __volatile__(".word 0x4e60" : : "a" (a0) ); 43 #endif 44 } 45
+87 -11
arch/m68knommu/Kconfig
··· 75 config NO_IOPORT 76 def_bool y 77 78 source "init/Kconfig" 79 80 source "kernel/Kconfig.freezer" ··· 117 118 config M5206 119 bool "MCF5206" 120 help 121 Motorola ColdFire 5206 processor support. 122 123 config M5206e 124 bool "MCF5206e" 125 help 126 Motorola ColdFire 5206e processor support. 127 128 config M520x 129 bool "MCF520x" 130 select GENERIC_CLOCKEVENTS 131 help 132 Freescale Coldfire 5207/5208 processor support. 133 134 config M523x 135 bool "MCF523x" 136 select GENERIC_CLOCKEVENTS 137 help 138 Freescale Coldfire 5230/1/2/4/5 processor support 139 140 config M5249 141 bool "MCF5249" 142 help 143 Motorola ColdFire 5249 processor support. 144 145 config M5271 146 bool "MCF5271" 147 help 148 Freescale (Motorola) ColdFire 5270/5271 processor support. 149 150 config M5272 151 bool "MCF5272" 152 help 153 Motorola ColdFire 5272 processor support. 154 155 config M5275 156 bool "MCF5275" 157 help 158 Freescale (Motorola) ColdFire 5274/5275 processor support. 159 160 config M528x 161 bool "MCF528x" 162 select GENERIC_CLOCKEVENTS 163 help 164 Motorola ColdFire 5280/5282 processor support. 165 166 config M5307 167 bool "MCF5307" 168 help 169 Motorola ColdFire 5307 processor support. 170 171 config M532x 172 bool "MCF532x" 173 help 174 Freescale (Motorola) ColdFire 532x processor support. 175 176 config M5407 177 bool "MCF5407" 178 help 179 Motorola ColdFire 5407 processor support. 180 181 config M548x 182 bool "MCF548x" 183 help 184 Freescale ColdFire 5480/5481/5482/5483/5484/5485 processor support. 185 ··· 212 select GENERIC_CLOCKEVENTS 213 default y 214 215 config COLDFIRE 216 bool 217 - depends on (M5206 || M5206e || M520x || M523x || M5249 || M527x || M5272 || M528x || M5307 || M532x || M5407 || M548x) 218 select GENERIC_GPIO 219 select ARCH_REQUIRE_GPIOLIB 220 default y ··· 266 Build support for the older revision ColdFire 5307 silicon. 267 Specifically this is the 1H55J mask revision. 268 269 comment "Platform" 270 271 config PILOT3 ··· 321 Support the bugs of Xcopilot. 322 323 config UC5272 324 - bool 'Arcturus Networks uC5272 dimm board support' 325 - depends on M5272 326 - help 327 - Support for the Arcturus Networks uC5272 dimm board. 328 329 config UC5282 330 - bool "Arcturus Networks uC5282 board support" 331 - depends on M528x 332 - help 333 - Support for the Arcturus Networks uC5282 dimm board. 334 335 config UCSIMM 336 bool "uCsimm module support" ··· 355 depends on (UCSIMM || UCDIMM || DRAGEN2) 356 help 357 Disable the CPU internal registers protection in user mode, 358 - to allow a user application to read/write them. 359 360 config INIT_LCD 361 bool "Initialize LCD" ··· 593 depends on (SOM5282EM) 594 595 config SNEHA 596 - bool 597 default y 598 depends on CPU16B 599
··· 75 config NO_IOPORT 76 def_bool y 77 78 + config COLDFIRE_SW_A7 79 + bool 80 + default n 81 + 82 + config HAVE_CACHE_SPLIT 83 + bool 84 + 85 + config HAVE_CACHE_CB 86 + bool 87 + 88 source "init/Kconfig" 89 90 source "kernel/Kconfig.freezer" ··· 107 108 config M5206 109 bool "MCF5206" 110 + select COLDFIRE_SW_A7 111 help 112 Motorola ColdFire 5206 processor support. 113 114 config M5206e 115 bool "MCF5206e" 116 + select COLDFIRE_SW_A7 117 help 118 Motorola ColdFire 5206e processor support. 119 120 config M520x 121 bool "MCF520x" 122 select GENERIC_CLOCKEVENTS 123 + select HAVE_CACHE_SPLIT 124 help 125 Freescale Coldfire 5207/5208 processor support. 126 127 config M523x 128 bool "MCF523x" 129 select GENERIC_CLOCKEVENTS 130 + select HAVE_CACHE_SPLIT 131 help 132 Freescale Coldfire 5230/1/2/4/5 processor support 133 134 config M5249 135 bool "MCF5249" 136 + select COLDFIRE_SW_A7 137 help 138 Motorola ColdFire 5249 processor support. 139 140 config M5271 141 bool "MCF5271" 142 + select HAVE_CACHE_SPLIT 143 help 144 Freescale (Motorola) ColdFire 5270/5271 processor support. 145 146 config M5272 147 bool "MCF5272" 148 + select COLDFIRE_SW_A7 149 help 150 Motorola ColdFire 5272 processor support. 151 152 config M5275 153 bool "MCF5275" 154 + select HAVE_CACHE_SPLIT 155 help 156 Freescale (Motorola) ColdFire 5274/5275 processor support. 157 158 config M528x 159 bool "MCF528x" 160 select GENERIC_CLOCKEVENTS 161 + select HAVE_CACHE_SPLIT 162 help 163 Motorola ColdFire 5280/5282 processor support. 164 165 config M5307 166 bool "MCF5307" 167 + select COLDFIRE_SW_A7 168 + select HAVE_CACHE_CB 169 help 170 Motorola ColdFire 5307 processor support. 171 172 config M532x 173 bool "MCF532x" 174 + select HAVE_CACHE_CB 175 help 176 Freescale (Motorola) ColdFire 532x processor support. 177 178 config M5407 179 bool "MCF5407" 180 + select COLDFIRE_SW_A7 181 + select HAVE_CACHE_CB 182 help 183 Motorola ColdFire 5407 processor support. 184 185 + config M547x 186 + bool "MCF547x" 187 + select HAVE_CACHE_CB 188 + help 189 + Freescale ColdFire 5470/5471/5472/5473/5474/5475 processor support. 190 + 191 config M548x 192 bool "MCF548x" 193 + select HAVE_CACHE_CB 194 help 195 Freescale ColdFire 5480/5481/5482/5483/5484/5485 processor support. 196 ··· 181 select GENERIC_CLOCKEVENTS 182 default y 183 184 + config M54xx 185 + bool 186 + depends on (M548x || M547x) 187 + default y 188 + 189 config COLDFIRE 190 bool 191 + depends on (M5206 || M5206e || M520x || M523x || M5249 || M527x || M5272 || M528x || M5307 || M532x || M5407 || M54xx) 192 select GENERIC_GPIO 193 select ARCH_REQUIRE_GPIOLIB 194 default y ··· 230 Build support for the older revision ColdFire 5307 silicon. 231 Specifically this is the 1H55J mask revision. 232 233 + if HAVE_CACHE_SPLIT 234 + choice 235 + prompt "Split Cache Configuration" 236 + default CACHE_I 237 + 238 + config CACHE_I 239 + bool "Instruction" 240 + help 241 + Use all of the ColdFire CPU cache memory as an instruction cache. 242 + 243 + config CACHE_D 244 + bool "Data" 245 + help 246 + Use all of the ColdFire CPU cache memory as a data cache. 247 + 248 + config CACHE_BOTH 249 + bool "Both" 250 + help 251 + Split the ColdFire CPU cache, and use half as an instruction cache 252 + and half as a data cache. 253 + endchoice 254 + endif 255 + 256 + if HAVE_CACHE_CB 257 + choice 258 + prompt "Data cache mode" 259 + default CACHE_WRITETHRU 260 + 261 + config CACHE_WRITETHRU 262 + bool "Write-through" 263 + help 264 + The ColdFire CPU cache is set into Write-through mode. 265 + 266 + config CACHE_COPYBACK 267 + bool "Copy-back" 268 + help 269 + The ColdFire CPU cache is set into Copy-back mode. 270 + endchoice 271 + endif 272 + 273 comment "Platform" 274 275 config PILOT3 ··· 245 Support the bugs of Xcopilot. 246 247 config UC5272 248 + bool 'Arcturus Networks uC5272 dimm board support' 249 + depends on M5272 250 + help 251 + Support for the Arcturus Networks uC5272 dimm board. 252 253 config UC5282 254 + bool "Arcturus Networks uC5282 board support" 255 + depends on M528x 256 + help 257 + Support for the Arcturus Networks uC5282 dimm board. 258 259 config UCSIMM 260 bool "uCsimm module support" ··· 279 depends on (UCSIMM || UCDIMM || DRAGEN2) 280 help 281 Disable the CPU internal registers protection in user mode, 282 + to allow a user application to read/write them. 283 284 config INIT_LCD 285 bool "Initialize LCD" ··· 517 depends on (SOM5282EM) 518 519 config SNEHA 520 + bool 521 default y 522 depends on CPU16B 523
+7 -7
arch/m68knommu/Makefile
··· 25 platform-$(CONFIG_M5307) := 5307 26 platform-$(CONFIG_M532x) := 532x 27 platform-$(CONFIG_M5407) := 5407 28 - platform-$(CONFIG_M548x) := 548x 29 PLATFORM := $(platform-y) 30 31 board-$(CONFIG_PILOT) := pilot ··· 74 cpuclass-$(CONFIG_M5307) := coldfire 75 cpuclass-$(CONFIG_M532x) := coldfire 76 cpuclass-$(CONFIG_M5407) := coldfire 77 - cpuclass-$(CONFIG_M548x) := coldfire 78 cpuclass-$(CONFIG_M68328) := 68328 79 cpuclass-$(CONFIG_M68EZ328) := 68328 80 cpuclass-$(CONFIG_M68VZ328) := 68328 ··· 91 # Some CFLAG additions based on specific CPU type. 92 # 93 cflags-$(CONFIG_M5206) := $(call cc-option,-mcpu=5206,-m5200) 94 - cflags-$(CONFIG_M5206e) := $(call cc-option,-m5206e,-m5200) 95 cflags-$(CONFIG_M520x) := $(call cc-option,-mcpu=5208,-m5200) 96 cflags-$(CONFIG_M523x) := $(call cc-option,-mcpu=523x,-m5307) 97 cflags-$(CONFIG_M5249) := $(call cc-option,-mcpu=5249,-m5200) 98 cflags-$(CONFIG_M5271) := $(call cc-option,-mcpu=5271,-m5307) 99 cflags-$(CONFIG_M5272) := $(call cc-option,-mcpu=5272,-m5307) 100 cflags-$(CONFIG_M5275) := $(call cc-option,-mcpu=5275,-m5307) 101 - cflags-$(CONFIG_M528x) := $(call cc-option,-m528x,-m5307) 102 - cflags-$(CONFIG_M5307) := $(call cc-option,-m5307,-m5200) 103 cflags-$(CONFIG_M532x) := $(call cc-option,-mcpu=532x,-m5307) 104 - cflags-$(CONFIG_M5407) := $(call cc-option,-m5407,-m5200) 105 - cflags-$(CONFIG_M548x) := $(call cc-option,-m5407,-m5200) 106 cflags-$(CONFIG_M68328) := -m68000 107 cflags-$(CONFIG_M68EZ328) := -m68000 108 cflags-$(CONFIG_M68VZ328) := -m68000
··· 25 platform-$(CONFIG_M5307) := 5307 26 platform-$(CONFIG_M532x) := 532x 27 platform-$(CONFIG_M5407) := 5407 28 + platform-$(CONFIG_M54xx) := 54xx 29 PLATFORM := $(platform-y) 30 31 board-$(CONFIG_PILOT) := pilot ··· 74 cpuclass-$(CONFIG_M5307) := coldfire 75 cpuclass-$(CONFIG_M532x) := coldfire 76 cpuclass-$(CONFIG_M5407) := coldfire 77 + cpuclass-$(CONFIG_M54xx) := coldfire 78 cpuclass-$(CONFIG_M68328) := 68328 79 cpuclass-$(CONFIG_M68EZ328) := 68328 80 cpuclass-$(CONFIG_M68VZ328) := 68328 ··· 91 # Some CFLAG additions based on specific CPU type. 92 # 93 cflags-$(CONFIG_M5206) := $(call cc-option,-mcpu=5206,-m5200) 94 + cflags-$(CONFIG_M5206e) := $(call cc-option,-mcpu=5206e,-m5200) 95 cflags-$(CONFIG_M520x) := $(call cc-option,-mcpu=5208,-m5200) 96 cflags-$(CONFIG_M523x) := $(call cc-option,-mcpu=523x,-m5307) 97 cflags-$(CONFIG_M5249) := $(call cc-option,-mcpu=5249,-m5200) 98 cflags-$(CONFIG_M5271) := $(call cc-option,-mcpu=5271,-m5307) 99 cflags-$(CONFIG_M5272) := $(call cc-option,-mcpu=5272,-m5307) 100 cflags-$(CONFIG_M5275) := $(call cc-option,-mcpu=5275,-m5307) 101 + cflags-$(CONFIG_M528x) := $(call cc-option,-mcpu=528x,-m5307) 102 + cflags-$(CONFIG_M5307) := $(call cc-option,-mcpu=5307,-m5200) 103 cflags-$(CONFIG_M532x) := $(call cc-option,-mcpu=532x,-m5307) 104 + cflags-$(CONFIG_M5407) := $(call cc-option,-mcpu=5407,-m5200) 105 + cflags-$(CONFIG_M54xx) := $(call cc-option,-mcpu=5475,-m5200) 106 cflags-$(CONFIG_M68328) := -m68000 107 cflags-$(CONFIG_M68EZ328) := -m68000 108 cflags-$(CONFIG_M68VZ328) := -m68000
+18 -54
arch/m68knommu/kernel/setup.c
··· 55 void (*mach_power_off)(void); 56 57 #ifdef CONFIG_M68328 58 - #define CPU "MC68328" 59 #endif 60 #ifdef CONFIG_M68EZ328 61 - #define CPU "MC68EZ328" 62 #endif 63 #ifdef CONFIG_M68VZ328 64 - #define CPU "MC68VZ328" 65 #endif 66 #ifdef CONFIG_M68360 67 - #define CPU "MC68360" 68 #endif 69 - #if defined(CONFIG_M5206) 70 - #define CPU "COLDFIRE(m5206)" 71 #endif 72 - #if defined(CONFIG_M5206e) 73 - #define CPU "COLDFIRE(m5206e)" 74 - #endif 75 - #if defined(CONFIG_M520x) 76 - #define CPU "COLDFIRE(m520x)" 77 - #endif 78 - #if defined(CONFIG_M523x) 79 - #define CPU "COLDFIRE(m523x)" 80 - #endif 81 - #if defined(CONFIG_M5249) 82 - #define CPU "COLDFIRE(m5249)" 83 - #endif 84 - #if defined(CONFIG_M5271) 85 - #define CPU "COLDFIRE(m5270/5271)" 86 - #endif 87 - #if defined(CONFIG_M5272) 88 - #define CPU "COLDFIRE(m5272)" 89 - #endif 90 - #if defined(CONFIG_M5275) 91 - #define CPU "COLDFIRE(m5274/5275)" 92 - #endif 93 - #if defined(CONFIG_M528x) 94 - #define CPU "COLDFIRE(m5280/5282)" 95 - #endif 96 - #if defined(CONFIG_M5307) 97 - #define CPU "COLDFIRE(m5307)" 98 - #endif 99 - #if defined(CONFIG_M532x) 100 - #define CPU "COLDFIRE(m532x)" 101 - #endif 102 - #if defined(CONFIG_M5407) 103 - #define CPU "COLDFIRE(m5407)" 104 - #endif 105 - #ifndef CPU 106 - #define CPU "UNKNOWN" 107 #endif 108 109 extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end; ··· 182 command_line[sizeof(command_line) - 1] = 0; 183 #endif /* CONFIG_UBOOT */ 184 185 - printk(KERN_INFO "\x0F\r\n\nuClinux/" CPU "\n"); 186 187 #ifdef CONFIG_UCDIMM 188 printk(KERN_INFO "uCdimm by Lineo, Inc. <www.lineo.com>\n"); ··· 231 memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); 232 boot_command_line[COMMAND_LINE_SIZE-1] = 0; 233 234 - #ifdef DEBUG 235 - if (strlen(*cmdline_p)) 236 - printk(KERN_DEBUG "Command line: '%s'\n", *cmdline_p); 237 - #endif 238 - 239 #if defined(CONFIG_FRAMEBUFFER_CONSOLE) && defined(CONFIG_DUMMY_CONSOLE) 240 conswitchp = &dummy_con; 241 #endif ··· 272 char *cpu, *mmu, *fpu; 273 u_long clockfreq; 274 275 - cpu = CPU; 276 mmu = "none"; 277 fpu = "none"; 278 - 279 - #ifdef CONFIG_COLDFIRE 280 - clockfreq = (loops_per_jiffy * HZ) * 3; 281 - #else 282 - clockfreq = (loops_per_jiffy * HZ) * 16; 283 - #endif 284 285 seq_printf(m, "CPU:\t\t%s\n" 286 "MMU:\t\t%s\n"
··· 55 void (*mach_power_off)(void); 56 57 #ifdef CONFIG_M68328 58 + #define CPU_NAME "MC68328" 59 #endif 60 #ifdef CONFIG_M68EZ328 61 + #define CPU_NAME "MC68EZ328" 62 #endif 63 #ifdef CONFIG_M68VZ328 64 + #define CPU_NAME "MC68VZ328" 65 #endif 66 #ifdef CONFIG_M68360 67 + #define CPU_NAME "MC68360" 68 #endif 69 + #ifndef CPU_NAME 70 + #define CPU_NAME "UNKNOWN" 71 #endif 72 + 73 + /* 74 + * Different cores have different instruction execution timings. 75 + * The old/traditional 68000 cores are basically all the same, at 16. 76 + * The ColdFire cores vary a little, their values are defined in their 77 + * headers. We default to the standard 68000 value here. 78 + */ 79 + #ifndef CPU_INSTR_PER_JIFFY 80 + #define CPU_INSTR_PER_JIFFY 16 81 #endif 82 83 extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end; ··· 208 command_line[sizeof(command_line) - 1] = 0; 209 #endif /* CONFIG_UBOOT */ 210 211 + printk(KERN_INFO "\x0F\r\n\nuClinux/" CPU_NAME "\n"); 212 213 #ifdef CONFIG_UCDIMM 214 printk(KERN_INFO "uCdimm by Lineo, Inc. <www.lineo.com>\n"); ··· 257 memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); 258 boot_command_line[COMMAND_LINE_SIZE-1] = 0; 259 260 #if defined(CONFIG_FRAMEBUFFER_CONSOLE) && defined(CONFIG_DUMMY_CONSOLE) 261 conswitchp = &dummy_con; 262 #endif ··· 303 char *cpu, *mmu, *fpu; 304 u_long clockfreq; 305 306 + cpu = CPU_NAME; 307 mmu = "none"; 308 fpu = "none"; 309 + clockfreq = (loops_per_jiffy * HZ) * CPU_INSTR_PER_JIFFY; 310 311 seq_printf(m, "CPU:\t\t%s\n" 312 "MMU:\t\t%s\n"
+1 -1
arch/m68knommu/mm/Makefile
··· 2 # Makefile for the linux m68knommu specific parts of the memory manager. 3 # 4 5 - obj-y += init.o fault.o memory.o kmap.o
··· 2 # Makefile for the linux m68knommu specific parts of the memory manager. 3 # 4 5 + obj-y += init.o kmap.o
-57
arch/m68knommu/mm/fault.c
··· 1 - /* 2 - * linux/arch/m68knommu/mm/fault.c 3 - * 4 - * Copyright (C) 1998 D. Jeff Dionne <jeff@lineo.ca>, 5 - * Copyright (C) 2000 Lineo, Inc. (www.lineo.com) 6 - * 7 - * Based on: 8 - * 9 - * linux/arch/m68k/mm/fault.c 10 - * 11 - * Copyright (C) 1995 Hamish Macdonald 12 - */ 13 - 14 - #include <linux/mman.h> 15 - #include <linux/mm.h> 16 - #include <linux/kernel.h> 17 - #include <linux/ptrace.h> 18 - 19 - #include <asm/system.h> 20 - #include <asm/pgtable.h> 21 - 22 - extern void die_if_kernel(char *, struct pt_regs *, long); 23 - 24 - /* 25 - * This routine handles page faults. It determines the problem, and 26 - * then passes it off to one of the appropriate routines. 27 - * 28 - * error_code: 29 - * bit 0 == 0 means no page found, 1 means protection fault 30 - * bit 1 == 0 means read, 1 means write 31 - * 32 - * If this routine detects a bad access, it returns 1, otherwise it 33 - * returns 0. 34 - */ 35 - asmlinkage int do_page_fault(struct pt_regs *regs, unsigned long address, 36 - unsigned long error_code) 37 - { 38 - #ifdef DEBUG 39 - printk(KERN_DEBUG "regs->sr=%#x, regs->pc=%#lx, address=%#lx, %ld\n", 40 - regs->sr, regs->pc, address, error_code); 41 - #endif 42 - 43 - /* 44 - * Oops. The kernel tried to access some bad page. We'll have to 45 - * terminate things with extreme prejudice. 46 - */ 47 - if ((unsigned long) address < PAGE_SIZE) 48 - printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference"); 49 - else 50 - printk(KERN_ALERT "Unable to handle kernel access"); 51 - printk(KERN_ALERT " at virtual address %08lx\n", address); 52 - die_if_kernel("Oops", regs, error_code); 53 - do_exit(SIGKILL); 54 - 55 - return 1; 56 - } 57 -
···
-9
arch/m68knommu/mm/kmap.c
··· 36 } 37 38 /* 39 - * __iounmap unmaps nearly everything, so be careful 40 - * it doesn't free currently pointer/page tables anymore but it 41 - * wans't used anyway and might be added later. 42 - */ 43 - void __iounmap(void *addr, unsigned long size) 44 - { 45 - } 46 - 47 - /* 48 * Set new cache mode for some kernel address space. 49 * The caller must push data for that range itself, if such data may already 50 * be in the cache.
··· 36 } 37 38 /* 39 * Set new cache mode for some kernel address space. 40 * The caller must push data for that range itself, if such data may already 41 * be in the cache.
-33
arch/m68knommu/mm/memory.c
··· 1 - /* 2 - * linux/arch/m68knommu/mm/memory.c 3 - * 4 - * Copyright (C) 1998 Kenneth Albanowski <kjahds@kjahds.com>, 5 - * Copyright (C) 1999-2002, Greg Ungerer (gerg@snapgear.com) 6 - * 7 - * Based on: 8 - * 9 - * linux/arch/m68k/mm/memory.c 10 - * 11 - * Copyright (C) 1995 Hamish Macdonald 12 - */ 13 - 14 - #include <linux/mm.h> 15 - #include <linux/kernel.h> 16 - #include <linux/string.h> 17 - #include <linux/types.h> 18 - 19 - #include <asm/segment.h> 20 - #include <asm/page.h> 21 - #include <asm/pgtable.h> 22 - #include <asm/system.h> 23 - 24 - /* 25 - * Map some physical address range into the kernel address space. 26 - */ 27 - 28 - unsigned long kernel_map(unsigned long paddr, unsigned long size, 29 - int nocacheflag, unsigned long *memavailp ) 30 - { 31 - return paddr; 32 - } 33 -
···
arch/m68knommu/platform/548x/Makefile arch/m68knommu/platform/54xx/Makefile
+16 -16
arch/m68knommu/platform/548x/config.c arch/m68knommu/platform/54xx/config.c
··· 1 /***************************************************************************/ 2 3 /* 4 - * linux/arch/m68knommu/platform/548x/config.c 5 * 6 * Copyright (C) 2010, Philippe De Muyter <phdm@macqel.be> 7 */ ··· 15 #include <linux/io.h> 16 #include <asm/machdep.h> 17 #include <asm/coldfire.h> 18 - #include <asm/m548xsim.h> 19 #include <asm/mcfuart.h> 20 - #include <asm/m548xgpt.h> 21 22 /***************************************************************************/ 23 24 - static struct mcf_platform_uart m548x_uart_platform[] = { 25 { 26 .mapbase = MCF_MBAR + MCFUART_BASE1, 27 .irq = 64 + 35, ··· 40 }, 41 }; 42 43 - static struct platform_device m548x_uart = { 44 .name = "mcfuart", 45 .id = 0, 46 - .dev.platform_data = m548x_uart_platform, 47 }; 48 49 - static struct platform_device *m548x_devices[] __initdata = { 50 - &m548x_uart, 51 }; 52 53 54 /***************************************************************************/ 55 56 - static void __init m548x_uart_init_line(int line, int irq) 57 { 58 int rts_cts; 59 ··· 72 MCF_MBAR + MCF_PAR_PSC(line)); 73 } 74 75 - static void __init m548x_uarts_init(void) 76 { 77 - const int nrlines = ARRAY_SIZE(m548x_uart_platform); 78 int line; 79 80 for (line = 0; (line < nrlines); line++) 81 - m548x_uart_init_line(line, m548x_uart_platform[line].irq); 82 } 83 84 /***************************************************************************/ 85 86 - static void mcf548x_reset(void) 87 { 88 /* disable interrupts and enable the watchdog */ 89 asm("movew #0x2700, %sr\n"); ··· 97 98 void __init config_BSP(char *commandp, int size) 99 { 100 - mach_reset = mcf548x_reset; 101 - m548x_uarts_init(); 102 } 103 104 /***************************************************************************/ ··· 106 static int __init init_BSP(void) 107 { 108 109 - platform_add_devices(m548x_devices, ARRAY_SIZE(m548x_devices)); 110 return 0; 111 } 112
··· 1 /***************************************************************************/ 2 3 /* 4 + * linux/arch/m68knommu/platform/54xx/config.c 5 * 6 * Copyright (C) 2010, Philippe De Muyter <phdm@macqel.be> 7 */ ··· 15 #include <linux/io.h> 16 #include <asm/machdep.h> 17 #include <asm/coldfire.h> 18 + #include <asm/m54xxsim.h> 19 #include <asm/mcfuart.h> 20 + #include <asm/m54xxgpt.h> 21 22 /***************************************************************************/ 23 24 + static struct mcf_platform_uart m54xx_uart_platform[] = { 25 { 26 .mapbase = MCF_MBAR + MCFUART_BASE1, 27 .irq = 64 + 35, ··· 40 }, 41 }; 42 43 + static struct platform_device m54xx_uart = { 44 .name = "mcfuart", 45 .id = 0, 46 + .dev.platform_data = m54xx_uart_platform, 47 }; 48 49 + static struct platform_device *m54xx_devices[] __initdata = { 50 + &m54xx_uart, 51 }; 52 53 54 /***************************************************************************/ 55 56 + static void __init m54xx_uart_init_line(int line, int irq) 57 { 58 int rts_cts; 59 ··· 72 MCF_MBAR + MCF_PAR_PSC(line)); 73 } 74 75 + static void __init m54xx_uarts_init(void) 76 { 77 + const int nrlines = ARRAY_SIZE(m54xx_uart_platform); 78 int line; 79 80 for (line = 0; (line < nrlines); line++) 81 + m54xx_uart_init_line(line, m54xx_uart_platform[line].irq); 82 } 83 84 /***************************************************************************/ 85 86 + static void mcf54xx_reset(void) 87 { 88 /* disable interrupts and enable the watchdog */ 89 asm("movew #0x2700, %sr\n"); ··· 97 98 void __init config_BSP(char *commandp, int size) 99 { 100 + mach_reset = mcf54xx_reset; 101 + m54xx_uarts_init(); 102 } 103 104 /***************************************************************************/ ··· 106 static int __init init_BSP(void) 107 { 108 109 + platform_add_devices(m54xx_devices, ARRAY_SIZE(m54xx_devices)); 110 return 0; 111 } 112
+2 -2
arch/m68knommu/platform/68328/ints.c
··· 179 IMR = ~0; 180 181 for (i = 0; (i < NR_IRQS); i++) { 182 - set_irq_chip(irq, &intc_irq_chip); 183 - set_irq_handler(irq, handle_level_irq); 184 } 185 } 186
··· 179 IMR = ~0; 180 181 for (i = 0; (i < NR_IRQS); i++) { 182 + set_irq_chip(i, &intc_irq_chip); 183 + set_irq_handler(i, handle_level_irq); 184 } 185 } 186
+2 -2
arch/m68knommu/platform/coldfire/Makefile
··· 14 15 asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1 16 17 - obj-$(CONFIG_COLDFIRE) += clk.o dma.o entry.o vectors.o 18 obj-$(CONFIG_M5206) += timers.o intc.o 19 obj-$(CONFIG_M5206e) += timers.o intc.o 20 obj-$(CONFIG_M520x) += pit.o intc-simr.o ··· 26 obj-$(CONFIG_M5307) += timers.o intc.o 27 obj-$(CONFIG_M532x) += timers.o intc-simr.o 28 obj-$(CONFIG_M5407) += timers.o intc.o 29 - obj-$(CONFIG_M548x) += sltimers.o intc-2.o 30 31 obj-y += pinmux.o gpio.o 32 extra-y := head.o
··· 14 15 asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1 16 17 + obj-$(CONFIG_COLDFIRE) += cache.o clk.o dma.o entry.o vectors.o 18 obj-$(CONFIG_M5206) += timers.o intc.o 19 obj-$(CONFIG_M5206e) += timers.o intc.o 20 obj-$(CONFIG_M520x) += pit.o intc-simr.o ··· 26 obj-$(CONFIG_M5307) += timers.o intc.o 27 obj-$(CONFIG_M532x) += timers.o intc-simr.o 28 obj-$(CONFIG_M5407) += timers.o intc.o 29 + obj-$(CONFIG_M54xx) += sltimers.o intc-2.o 30 31 obj-y += pinmux.o gpio.o 32 extra-y := head.o
+48
arch/m68knommu/platform/coldfire/cache.c
···
··· 1 + /***************************************************************************/ 2 + 3 + /* 4 + * cache.c -- general ColdFire Cache maintainence code 5 + * 6 + * Copyright (C) 2010, Greg Ungerer (gerg@snapgear.com) 7 + */ 8 + 9 + /***************************************************************************/ 10 + 11 + #include <linux/kernel.h> 12 + #include <asm/coldfire.h> 13 + #include <asm/mcfsim.h> 14 + 15 + /***************************************************************************/ 16 + #ifdef CACHE_PUSH 17 + /***************************************************************************/ 18 + 19 + /* 20 + * Use cpushl to push all dirty cache lines back to memory. 21 + * Older versions of GAS don't seem to know how to generate the 22 + * ColdFire cpushl instruction... Oh well, bit stuff it for now. 23 + */ 24 + 25 + void mcf_cache_push(void) 26 + { 27 + __asm__ __volatile__ ( 28 + "clrl %%d0\n\t" 29 + "1:\n\t" 30 + "movel %%d0,%%a0\n\t" 31 + "2:\n\t" 32 + ".word 0xf468\n\t" 33 + "addl %0,%%a0\n\t" 34 + "cmpl %1,%%a0\n\t" 35 + "blt 2b\n\t" 36 + "addql #1,%%d0\n\t" 37 + "cmpil %2,%%d0\n\t" 38 + "bne 1b\n\t" 39 + : /* No output */ 40 + : "i" (CACHE_LINE_SIZE), 41 + "i" (DCACHE_SIZE / CACHE_WAYS), 42 + "i" (CACHE_WAYS) 43 + : "d0", "a0" ); 44 + } 45 + 46 + /***************************************************************************/ 47 + #endif /* CACHE_PUSH */ 48 + /***************************************************************************/
+10 -46
arch/m68knommu/platform/coldfire/entry.S
··· 36 #include <asm/asm-offsets.h> 37 #include <asm/entry.h> 38 39 .bss 40 - 41 sw_ksp: 42 .long 0 43 - 44 sw_usp: 45 .long 0 46 47 .text 48 ··· 54 .globl ret_from_exception 55 .globl ret_from_signal 56 .globl sys_call_table 57 - .globl ret_from_interrupt 58 .globl inthandler 59 .globl fasthandler 60 ··· 142 jne Lwork_to_do /* still work to do */ 143 144 Lreturn: 145 - move #0x2700,%sr /* disable intrs */ 146 - movel sw_usp,%a0 /* get usp */ 147 - movel %sp@(PT_OFF_PC),%a0@- /* copy exception program counter */ 148 - movel %sp@(PT_OFF_FORMATVEC),%a0@- /* copy exception format/vector/sr */ 149 - moveml %sp@,%d1-%d5/%a0-%a2 150 - lea %sp@(32),%sp /* space for 8 regs */ 151 - movel %sp@+,%d0 152 - addql #4,%sp /* orig d0 */ 153 - addl %sp@+,%sp /* stk adj */ 154 - addql #8,%sp /* remove exception */ 155 - movel %sp,sw_ksp /* save ksp */ 156 - subql #8,sw_usp /* set exception */ 157 - movel sw_usp,%sp /* restore usp */ 158 - rte 159 160 Lwork_to_do: 161 movel %a0@(TI_FLAGS),%d1 /* get thread_info->flags */ ··· 180 jbsr do_IRQ /* call high level irq handler */ 181 lea %sp@(8),%sp /* pop args off stack */ 182 183 - bra ret_from_interrupt /* this was fallthrough */ 184 - 185 - /* 186 - * This is the fast interrupt handler (for certain hardware interrupt 187 - * sources). Unlike the normal interrupt handler it just uses the 188 - * current stack (doesn't care if it is user or kernel). It also 189 - * doesn't bother doing the bottom half handlers. 190 - */ 191 - ENTRY(fasthandler) 192 - SAVE_LOCAL 193 - 194 - movew %sp@(PT_OFF_FORMATVEC),%d0 195 - andl #0x03fc,%d0 /* mask out vector only */ 196 - 197 - movel %sp,%sp@- /* push regs arg */ 198 - lsrl #2,%d0 /* calculate real vector # */ 199 - movel %d0,%sp@- /* push vector number */ 200 - jbsr do_IRQ /* call high level irq handler */ 201 - lea %sp@(8),%sp /* pop args off stack */ 202 - 203 - RESTORE_LOCAL 204 - 205 - ENTRY(ret_from_interrupt) 206 - /* the fasthandler is confusing me, haven't seen any user */ 207 - jmp ret_from_exception 208 209 /* 210 * Beware - when entering resume, prev (the current task) is ··· 191 */ 192 ENTRY(resume) 193 movel %a0, %d1 /* get prev thread in d1 */ 194 - 195 - movel sw_usp,%d0 /* save usp */ 196 - movel %d0,%a0@(TASK_THREAD+THREAD_USP) 197 198 SAVE_SWITCH_STACK 199 movel %sp,%a0@(TASK_THREAD+THREAD_KSP) /* save kernel stack pointer */ ··· 200 RESTORE_SWITCH_STACK 201 202 movel %a1@(TASK_THREAD+THREAD_USP),%a0 /* restore thread user stack */ 203 - movel %a0, sw_usp 204 rts
··· 36 #include <asm/asm-offsets.h> 37 #include <asm/entry.h> 38 39 + #ifdef CONFIG_COLDFIRE_SW_A7 40 + /* 41 + * Define software copies of the supervisor and user stack pointers. 42 + */ 43 .bss 44 sw_ksp: 45 .long 0 46 sw_usp: 47 .long 0 48 + #endif /* CONFIG_COLDFIRE_SW_A7 */ 49 50 .text 51 ··· 51 .globl ret_from_exception 52 .globl ret_from_signal 53 .globl sys_call_table 54 .globl inthandler 55 .globl fasthandler 56 ··· 140 jne Lwork_to_do /* still work to do */ 141 142 Lreturn: 143 + RESTORE_USER 144 145 Lwork_to_do: 146 movel %a0@(TI_FLAGS),%d1 /* get thread_info->flags */ ··· 191 jbsr do_IRQ /* call high level irq handler */ 192 lea %sp@(8),%sp /* pop args off stack */ 193 194 + bra ret_from_exception 195 196 /* 197 * Beware - when entering resume, prev (the current task) is ··· 226 */ 227 ENTRY(resume) 228 movel %a0, %d1 /* get prev thread in d1 */ 229 + RDUSP 230 + movel %a2,%a0@(TASK_THREAD+THREAD_USP) 231 232 SAVE_SWITCH_STACK 233 movel %sp,%a0@(TASK_THREAD+THREAD_KSP) /* save kernel stack pointer */ ··· 236 RESTORE_SWITCH_STACK 237 238 movel %a1@(TASK_THREAD+THREAD_USP),%a0 /* restore thread user stack */ 239 + WRUSP 240 rts
+21 -5
arch/m68knommu/platform/coldfire/head.S
··· 3 /* 4 * head.S -- common startup code for ColdFire CPUs. 5 * 6 - * (C) Copyright 1999-2006, Greg Ungerer <gerg@snapgear.com>. 7 */ 8 9 /*****************************************************************************/ ··· 13 #include <linux/init.h> 14 #include <asm/asm-offsets.h> 15 #include <asm/coldfire.h> 16 - #include <asm/mcfcache.h> 17 #include <asm/mcfsim.h> 18 #include <asm/thread_info.h> 19 ··· 172 173 /* 174 * Now that we know what the memory is, lets enable cache 175 - * and get things moving. This is Coldfire CPU specific. 176 */ 177 - CACHE_ENABLE /* enable CPU cache */ 178 - 179 180 #ifdef CONFIG_ROMFS_FS 181 /*
··· 3 /* 4 * head.S -- common startup code for ColdFire CPUs. 5 * 6 + * (C) Copyright 1999-2010, Greg Ungerer <gerg@snapgear.com>. 7 */ 8 9 /*****************************************************************************/ ··· 13 #include <linux/init.h> 14 #include <asm/asm-offsets.h> 15 #include <asm/coldfire.h> 16 #include <asm/mcfsim.h> 17 #include <asm/thread_info.h> 18 ··· 173 174 /* 175 * Now that we know what the memory is, lets enable cache 176 + * and get things moving. This is Coldfire CPU specific. Not 177 + * all version cores have identical cache register setup. But 178 + * it is very similar. Define the exact settings in the headers 179 + * then the code here is the same for all. 180 */ 181 + movel #CACHE_INIT,%d0 /* invalidate whole cache */ 182 + movec %d0,%CACR 183 + nop 184 + movel #ACR0_MODE,%d0 /* set RAM region for caching */ 185 + movec %d0,%ACR0 186 + movel #ACR1_MODE,%d0 /* anything else to cache? */ 187 + movec %d0,%ACR1 188 + #ifdef ACR2_MODE 189 + movel #ACR2_MODE,%d0 190 + movec %d0,%ACR2 191 + movel #ACR3_MODE,%d0 192 + movec %d0,%ACR3 193 + #endif 194 + movel #CACHE_MODE,%d0 /* enable cache */ 195 + movec %d0,%CACR 196 + nop 197 198 #ifdef CONFIG_ROMFS_FS 199 /*