aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel/cplb-nompu/cacheinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/kernel/cplb-nompu/cacheinit.c')
-rw-r--r--arch/blackfin/kernel/cplb-nompu/cacheinit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/blackfin/kernel/cplb-nompu/cacheinit.c b/arch/blackfin/kernel/cplb-nompu/cacheinit.c
index d5a86c3017f7..a082681faa8e 100644
--- a/arch/blackfin/kernel/cplb-nompu/cacheinit.c
+++ b/arch/blackfin/kernel/cplb-nompu/cacheinit.c
@@ -30,13 +30,14 @@ void __cpuinit bfin_icache_init(struct cplb_entry *icplb_tbl)
30 unsigned long ctrl; 30 unsigned long ctrl;
31 int i; 31 int i;
32 32
33 SSYNC();
34 for (i = 0; i < MAX_CPLBS; i++) { 33 for (i = 0; i < MAX_CPLBS; i++) {
35 bfin_write32(ICPLB_ADDR0 + i * 4, icplb_tbl[i].addr); 34 bfin_write32(ICPLB_ADDR0 + i * 4, icplb_tbl[i].addr);
36 bfin_write32(ICPLB_DATA0 + i * 4, icplb_tbl[i].data); 35 bfin_write32(ICPLB_DATA0 + i * 4, icplb_tbl[i].data);
37 } 36 }
38 ctrl = bfin_read_IMEM_CONTROL(); 37 ctrl = bfin_read_IMEM_CONTROL();
39 ctrl |= IMC | ENICPLB; 38 ctrl |= IMC | ENICPLB;
39 /* CSYNC to ensure load store ordering */
40 CSYNC();
40 bfin_write_IMEM_CONTROL(ctrl); 41 bfin_write_IMEM_CONTROL(ctrl);
41 SSYNC(); 42 SSYNC();
42} 43}
@@ -48,7 +49,6 @@ void __cpuinit bfin_dcache_init(struct cplb_entry *dcplb_tbl)
48 unsigned long ctrl; 49 unsigned long ctrl;
49 int i; 50 int i;
50 51
51 SSYNC();
52 for (i = 0; i < MAX_CPLBS; i++) { 52 for (i = 0; i < MAX_CPLBS; i++) {
53 bfin_write32(DCPLB_ADDR0 + i * 4, dcplb_tbl[i].addr); 53 bfin_write32(DCPLB_ADDR0 + i * 4, dcplb_tbl[i].addr);
54 bfin_write32(DCPLB_DATA0 + i * 4, dcplb_tbl[i].data); 54 bfin_write32(DCPLB_DATA0 + i * 4, dcplb_tbl[i].data);
@@ -63,6 +63,8 @@ void __cpuinit bfin_dcache_init(struct cplb_entry *dcplb_tbl)
63 * to port B 63 * to port B
64 */ 64 */
65 ctrl |= DMEM_CNTR | PORT_PREF0 | (ANOMALY_05000287 ? PORT_PREF1 : 0); 65 ctrl |= DMEM_CNTR | PORT_PREF0 | (ANOMALY_05000287 ? PORT_PREF1 : 0);
66 /* CSYNC to ensure load store ordering */
67 CSYNC();
66 bfin_write_DMEM_CONTROL(ctrl); 68 bfin_write_DMEM_CONTROL(ctrl);
67 SSYNC(); 69 SSYNC();
68} 70}