diff options
Diffstat (limited to 'arch/blackfin/include/asm/cplb.h')
-rw-r--r-- | arch/blackfin/include/asm/cplb.h | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/arch/blackfin/include/asm/cplb.h b/arch/blackfin/include/asm/cplb.h index 9e8b4035fcec..ad566ff9ad16 100644 --- a/arch/blackfin/include/asm/cplb.h +++ b/arch/blackfin/include/asm/cplb.h | |||
@@ -30,7 +30,6 @@ | |||
30 | #ifndef _CPLB_H | 30 | #ifndef _CPLB_H |
31 | #define _CPLB_H | 31 | #define _CPLB_H |
32 | 32 | ||
33 | #include <asm/blackfin.h> | ||
34 | #include <mach/anomaly.h> | 33 | #include <mach/anomaly.h> |
35 | 34 | ||
36 | #define SDRAM_IGENERIC (CPLB_L1_CHBL | CPLB_USER_RD | CPLB_VALID | CPLB_PORTPRIO) | 35 | #define SDRAM_IGENERIC (CPLB_L1_CHBL | CPLB_USER_RD | CPLB_VALID | CPLB_PORTPRIO) |
@@ -55,13 +54,24 @@ | |||
55 | #endif | 54 | #endif |
56 | 55 | ||
57 | #define L1_DMEMORY (CPLB_LOCK | CPLB_COMMON) | 56 | #define L1_DMEMORY (CPLB_LOCK | CPLB_COMMON) |
57 | |||
58 | #ifdef CONFIG_SMP | ||
59 | #define L2_ATTR (INITIAL_T | I_CPLB | D_CPLB) | ||
60 | #define L2_IMEMORY (CPLB_COMMON | CPLB_LOCK) | ||
61 | #define L2_DMEMORY (CPLB_COMMON | CPLB_LOCK) | ||
62 | |||
63 | #else | ||
58 | #ifdef CONFIG_BFIN_L2_CACHEABLE | 64 | #ifdef CONFIG_BFIN_L2_CACHEABLE |
59 | #define L2_IMEMORY (SDRAM_IGENERIC) | 65 | #define L2_IMEMORY (SDRAM_IGENERIC) |
60 | #define L2_DMEMORY (SDRAM_DGENERIC) | 66 | #define L2_DMEMORY (SDRAM_DGENERIC) |
61 | #else | 67 | #else |
62 | #define L2_IMEMORY (CPLB_COMMON) | 68 | #define L2_IMEMORY (CPLB_COMMON) |
63 | #define L2_DMEMORY (CPLB_COMMON) | 69 | #define L2_DMEMORY (CPLB_COMMON) |
64 | #endif | 70 | #endif /* CONFIG_BFIN_L2_CACHEABLE */ |
71 | |||
72 | #define L2_ATTR (INITIAL_T | SWITCH_T | I_CPLB | D_CPLB) | ||
73 | #endif /* CONFIG_SMP */ | ||
74 | |||
65 | #define SDRAM_DNON_CHBL (CPLB_COMMON) | 75 | #define SDRAM_DNON_CHBL (CPLB_COMMON) |
66 | #define SDRAM_EBIU (CPLB_COMMON) | 76 | #define SDRAM_EBIU (CPLB_COMMON) |
67 | #define SDRAM_OOPS (CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_LOCK | CPLB_DIRTY) | 77 | #define SDRAM_OOPS (CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_LOCK | CPLB_DIRTY) |
@@ -71,14 +81,7 @@ | |||
71 | #define SIZE_1M 0x00100000 /* 1M */ | 81 | #define SIZE_1M 0x00100000 /* 1M */ |
72 | #define SIZE_4M 0x00400000 /* 4M */ | 82 | #define SIZE_4M 0x00400000 /* 4M */ |
73 | 83 | ||
74 | #ifdef CONFIG_MPU | ||
75 | #define MAX_CPLBS 16 | 84 | #define MAX_CPLBS 16 |
76 | #else | ||
77 | #define MAX_CPLBS (16 * 2) | ||
78 | #endif | ||
79 | |||
80 | #define ASYNC_MEMORY_CPLB_COVERAGE ((ASYNC_BANK0_SIZE + ASYNC_BANK1_SIZE + \ | ||
81 | ASYNC_BANK2_SIZE + ASYNC_BANK3_SIZE) / SIZE_4M) | ||
82 | 85 | ||
83 | #define CPLB_ENABLE_ICACHE_P 0 | 86 | #define CPLB_ENABLE_ICACHE_P 0 |
84 | #define CPLB_ENABLE_DCACHE_P 1 | 87 | #define CPLB_ENABLE_DCACHE_P 1 |
@@ -113,4 +116,8 @@ | |||
113 | #define CPLB_INOCACHE CPLB_USER_RD | CPLB_VALID | 116 | #define CPLB_INOCACHE CPLB_USER_RD | CPLB_VALID |
114 | #define CPLB_IDOCACHE CPLB_INOCACHE | CPLB_L1_CHBL | 117 | #define CPLB_IDOCACHE CPLB_INOCACHE | CPLB_L1_CHBL |
115 | 118 | ||
119 | #define FAULT_RW (1 << 16) | ||
120 | #define FAULT_USERSUPV (1 << 17) | ||
121 | #define FAULT_CPLBBITS 0x0000ffff | ||
122 | |||
116 | #endif /* _CPLB_H */ | 123 | #endif /* _CPLB_H */ |