aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/include/asm/cplb.h
diff options
context:
space:
mode:
authorGraf Yang <graf.yang@analog.com>2009-05-07 00:09:15 -0400
committerMike Frysinger <vapier@gentoo.org>2009-06-12 06:11:41 -0400
commit5ba766752d14a741aa2d7a3c321917a310b34afb (patch)
treea97d8174cded42843de44b08d613c350b28a2729 /arch/blackfin/include/asm/cplb.h
parenta261eec0009b6093727fb7a59b12a10c6c981714 (diff)
Blackfin: work around anomaly 05000220
When possible, work around anomaly 05000220 (external memory is write back cached, but L2 is not cached). If not possible, detect the conditions at build time and reject any qualifying configurations. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/include/asm/cplb.h')
-rw-r--r--arch/blackfin/include/asm/cplb.h35
1 files changed, 19 insertions, 16 deletions
diff --git a/arch/blackfin/include/asm/cplb.h b/arch/blackfin/include/asm/cplb.h
index ad566ff9ad16..a75a6a9f0949 100644
--- a/arch/blackfin/include/asm/cplb.h
+++ b/arch/blackfin/include/asm/cplb.h
@@ -53,29 +53,32 @@
53#define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_WT | CPLB_L1_AOW | CPLB_COMMON) 53#define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_WT | CPLB_L1_AOW | CPLB_COMMON)
54#endif 54#endif
55 55
56#define SDRAM_DNON_CHBL (CPLB_COMMON)
57#define SDRAM_EBIU (CPLB_COMMON)
58#define SDRAM_OOPS (CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_LOCK | CPLB_DIRTY)
59
56#define L1_DMEMORY (CPLB_LOCK | CPLB_COMMON) 60#define L1_DMEMORY (CPLB_LOCK | CPLB_COMMON)
57 61
58#ifdef CONFIG_SMP 62#ifdef CONFIG_SMP
59#define L2_ATTR (INITIAL_T | I_CPLB | D_CPLB) 63#define L2_ATTR (INITIAL_T | I_CPLB | D_CPLB)
60#define L2_IMEMORY (CPLB_COMMON | CPLB_LOCK) 64#define L2_IMEMORY (CPLB_COMMON)
61#define L2_DMEMORY (CPLB_COMMON | CPLB_LOCK) 65#define L2_DMEMORY (CPLB_LOCK | CPLB_COMMON)
62 66
63#else 67#else
64#ifdef CONFIG_BFIN_L2_CACHEABLE 68#define L2_ATTR (INITIAL_T | SWITCH_T | I_CPLB | D_CPLB)
65#define L2_IMEMORY (SDRAM_IGENERIC) 69#define L2_IMEMORY (SDRAM_IGENERIC)
66#define L2_DMEMORY (SDRAM_DGENERIC) 70
67#else 71# if defined(CONFIG_BFIN_L2_WB)
68#define L2_IMEMORY (CPLB_COMMON) 72# define L2_DMEMORY (CPLB_L1_CHBL | CPLB_COMMON)
69#define L2_DMEMORY (CPLB_COMMON) 73# elif defined(CONFIG_BFIN_L2_WT)
70#endif /* CONFIG_BFIN_L2_CACHEABLE */ 74# define L2_DMEMORY (CPLB_L1_CHBL | CPLB_WT | CPLB_L1_AOW | CPLB_COMMON)
71 75# elif defined(CONFIG_BFIN_L2_NOT_CACHED)
72#define L2_ATTR (INITIAL_T | SWITCH_T | I_CPLB | D_CPLB) 76# define L2_DMEMORY (CPLB_COMMON)
77# else
78# define L2_DMEMORY (0)
79# endif
73#endif /* CONFIG_SMP */ 80#endif /* CONFIG_SMP */
74 81
75#define SDRAM_DNON_CHBL (CPLB_COMMON)
76#define SDRAM_EBIU (CPLB_COMMON)
77#define SDRAM_OOPS (CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_LOCK | CPLB_DIRTY)
78
79#define SIZE_1K 0x00000400 /* 1K */ 82#define SIZE_1K 0x00000400 /* 1K */
80#define SIZE_4K 0x00001000 /* 4K */ 83#define SIZE_4K 0x00001000 /* 4K */
81#define SIZE_1M 0x00100000 /* 1M */ 84#define SIZE_1M 0x00100000 /* 1M */