diff options
Diffstat (limited to 'arch/blackfin/include/asm/cplb.h')
-rw-r--r-- | arch/blackfin/include/asm/cplb.h | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/arch/blackfin/include/asm/cplb.h b/arch/blackfin/include/asm/cplb.h index a75a6a9f0949..c5dacf8f8cf9 100644 --- a/arch/blackfin/include/asm/cplb.h +++ b/arch/blackfin/include/asm/cplb.h | |||
@@ -37,8 +37,6 @@ | |||
37 | #define L1_IMEMORY ( CPLB_USER_RD | CPLB_VALID | CPLB_LOCK) | 37 | #define L1_IMEMORY ( CPLB_USER_RD | CPLB_VALID | CPLB_LOCK) |
38 | #define SDRAM_INON_CHBL ( CPLB_USER_RD | CPLB_VALID) | 38 | #define SDRAM_INON_CHBL ( CPLB_USER_RD | CPLB_VALID) |
39 | 39 | ||
40 | /*Use the menuconfig cache policy here - CONFIG_BFIN_WT/CONFIG_BFIN_WB*/ | ||
41 | |||
42 | #if ANOMALY_05000158 | 40 | #if ANOMALY_05000158 |
43 | #define ANOMALY_05000158_WORKAROUND 0x200 | 41 | #define ANOMALY_05000158_WORKAROUND 0x200 |
44 | #else | 42 | #else |
@@ -47,10 +45,12 @@ | |||
47 | 45 | ||
48 | #define CPLB_COMMON (CPLB_DIRTY | CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND) | 46 | #define CPLB_COMMON (CPLB_DIRTY | CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND) |
49 | 47 | ||
50 | #ifdef CONFIG_BFIN_WB /*Write Back Policy */ | 48 | #ifdef CONFIG_BFIN_EXTMEM_WRITEBACK |
51 | #define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_COMMON) | 49 | #define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_COMMON) |
52 | #else /*Write Through */ | 50 | #elif defined(CONFIG_BFIN_EXTMEM_WRITETHROUGH) |
53 | #define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_WT | CPLB_L1_AOW | CPLB_COMMON) | 51 | #define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_WT | CPLB_L1_AOW | CPLB_COMMON) |
52 | #else | ||
53 | #define SDRAM_DGENERIC (CPLB_COMMON) | ||
54 | #endif | 54 | #endif |
55 | 55 | ||
56 | #define SDRAM_DNON_CHBL (CPLB_COMMON) | 56 | #define SDRAM_DNON_CHBL (CPLB_COMMON) |
@@ -61,21 +61,23 @@ | |||
61 | 61 | ||
62 | #ifdef CONFIG_SMP | 62 | #ifdef CONFIG_SMP |
63 | #define L2_ATTR (INITIAL_T | I_CPLB | D_CPLB) | 63 | #define L2_ATTR (INITIAL_T | I_CPLB | D_CPLB) |
64 | #define L2_IMEMORY (CPLB_COMMON) | 64 | #define L2_IMEMORY (CPLB_COMMON | PAGE_SIZE_1MB) |
65 | #define L2_DMEMORY (CPLB_LOCK | CPLB_COMMON) | 65 | #define L2_DMEMORY (CPLB_LOCK | CPLB_COMMON | PAGE_SIZE_1MB) |
66 | 66 | ||
67 | #else | 67 | #else |
68 | #define L2_ATTR (INITIAL_T | SWITCH_T | I_CPLB | D_CPLB) | 68 | #define L2_ATTR (INITIAL_T | SWITCH_T | I_CPLB | D_CPLB) |
69 | #define L2_IMEMORY (SDRAM_IGENERIC) | 69 | # if defined(CONFIG_BFIN_L2_ICACHEABLE) |
70 | 70 | # define L2_IMEMORY (CPLB_L1_CHBL | CPLB_USER_RD | CPLB_VALID | PAGE_SIZE_1MB) | |
71 | # if defined(CONFIG_BFIN_L2_WB) | 71 | # else |
72 | # define L2_DMEMORY (CPLB_L1_CHBL | CPLB_COMMON) | 72 | # define L2_IMEMORY ( CPLB_USER_RD | CPLB_VALID | PAGE_SIZE_1MB) |
73 | # elif defined(CONFIG_BFIN_L2_WT) | 73 | # endif |
74 | # define L2_DMEMORY (CPLB_L1_CHBL | CPLB_WT | CPLB_L1_AOW | CPLB_COMMON) | 74 | |
75 | # elif defined(CONFIG_BFIN_L2_NOT_CACHED) | 75 | # if defined(CONFIG_BFIN_L2_WRITEBACK) |
76 | # define L2_DMEMORY (CPLB_COMMON) | 76 | # define L2_DMEMORY (CPLB_L1_CHBL | CPLB_COMMON | PAGE_SIZE_1MB) |
77 | # elif defined(CONFIG_BFIN_L2_WRITETHROUGH) | ||
78 | # define L2_DMEMORY (CPLB_L1_CHBL | CPLB_WT | CPLB_L1_AOW | CPLB_COMMON | PAGE_SIZE_1MB) | ||
77 | # else | 79 | # else |
78 | # define L2_DMEMORY (0) | 80 | # define L2_DMEMORY (CPLB_COMMON | PAGE_SIZE_1MB) |
79 | # endif | 81 | # endif |
80 | #endif /* CONFIG_SMP */ | 82 | #endif /* CONFIG_SMP */ |
81 | 83 | ||