m68knommu: merge bit definitions for version 3 ColdFire cache controller

All version 3 based ColdFire CPU cores have a similar cache controller.
Merge all the exitsing definitions into a single file, and make them
similar in style and naming to the existing version 2 and version 4
cache controller definitions.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>

+56 -54
+2 -27
arch/m68k/include/asm/m5307sim.h
··· 17 17 #define CPU_NAME "COLDFIRE(m5307)" 18 18 #define CPU_INSTR_PER_JIFFY 3 19 19 20 + #include <asm/m53xxacr.h> 21 + 20 22 /* 21 23 * Define the 5307 SIM register set addresses. 22 24 */ ··· 161 159 */ 162 160 #define MCF_IRQ_TIMER 30 /* Timer0, Level 6 */ 163 161 #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 162 192 163 /****************************************************************************/ 193 164 #endif /* m5307sim_h */
+2 -27
arch/m68k/include/asm/m532xsim.h
··· 12 12 #define CPU_NAME "COLDFIRE(m532x)" 13 13 #define CPU_INSTR_PER_JIFFY 3 14 14 15 + #include <asm/m53xxacr.h> 16 + 15 17 #define MCF_REG32(x) (*(volatile unsigned long *)(x)) 16 18 #define MCF_REG16(x) (*(volatile unsigned short *)(x)) 17 19 #define MCF_REG08(x) (*(volatile unsigned char *)(x)) ··· 77 75 */ 78 76 #define MCF_IRQ_TIMER (64 + 32) /* Timer0 */ 79 77 #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 78 108 79 /* 109 80 * UART module.
+52
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 + #endif /* m53xxsim_h */