diff options
Diffstat (limited to 'arch/blackfin/kernel/cplb-nompu/cacheinit.c')
-rw-r--r-- | arch/blackfin/kernel/cplb-nompu/cacheinit.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/arch/blackfin/kernel/cplb-nompu/cacheinit.c b/arch/blackfin/kernel/cplb-nompu/cacheinit.c index 3a385aec67d5..c6ff947f9d37 100644 --- a/arch/blackfin/kernel/cplb-nompu/cacheinit.c +++ b/arch/blackfin/kernel/cplb-nompu/cacheinit.c | |||
@@ -25,19 +25,15 @@ | |||
25 | #include <asm/cplbinit.h> | 25 | #include <asm/cplbinit.h> |
26 | 26 | ||
27 | #if defined(CONFIG_BFIN_ICACHE) | 27 | #if defined(CONFIG_BFIN_ICACHE) |
28 | void __cpuinit bfin_icache_init(u_long icplb[]) | 28 | void __cpuinit bfin_icache_init(struct cplb_entry *icplb_tbl) |
29 | { | 29 | { |
30 | unsigned long *table = icplb; | ||
31 | unsigned long ctrl; | 30 | unsigned long ctrl; |
32 | int i; | 31 | int i; |
33 | 32 | ||
33 | SSYNC(); | ||
34 | for (i = 0; i < MAX_CPLBS; i++) { | 34 | for (i = 0; i < MAX_CPLBS; i++) { |
35 | unsigned long addr = *table++; | 35 | bfin_write32(ICPLB_ADDR0 + i * 4, icplb_tbl[i].addr); |
36 | unsigned long data = *table++; | 36 | bfin_write32(ICPLB_DATA0 + i * 4, icplb_tbl[i].data); |
37 | if (addr == (unsigned long)-1) | ||
38 | break; | ||
39 | bfin_write32(ICPLB_ADDR0 + i * 4, addr); | ||
40 | bfin_write32(ICPLB_DATA0 + i * 4, data); | ||
41 | } | 37 | } |
42 | ctrl = bfin_read_IMEM_CONTROL(); | 38 | ctrl = bfin_read_IMEM_CONTROL(); |
43 | ctrl |= IMC | ENICPLB; | 39 | ctrl |= IMC | ENICPLB; |
@@ -47,24 +43,20 @@ void __cpuinit bfin_icache_init(u_long icplb[]) | |||
47 | #endif | 43 | #endif |
48 | 44 | ||
49 | #if defined(CONFIG_BFIN_DCACHE) | 45 | #if defined(CONFIG_BFIN_DCACHE) |
50 | void __cpuinit bfin_dcache_init(u_long dcplb[]) | 46 | void __cpuinit bfin_dcache_init(struct cplb_entry *dcplb_tbl) |
51 | { | 47 | { |
52 | unsigned long *table = dcplb; | ||
53 | unsigned long ctrl; | 48 | unsigned long ctrl; |
54 | int i; | 49 | int i; |
55 | 50 | ||
51 | SSYNC(); | ||
56 | for (i = 0; i < MAX_CPLBS; i++) { | 52 | for (i = 0; i < MAX_CPLBS; i++) { |
57 | unsigned long addr = *table++; | 53 | bfin_write32(DCPLB_ADDR0 + i * 4, dcplb_tbl[i].addr); |
58 | unsigned long data = *table++; | 54 | bfin_write32(DCPLB_DATA0 + i * 4, dcplb_tbl[i].data); |
59 | if (addr == (unsigned long)-1) | ||
60 | break; | ||
61 | bfin_write32(DCPLB_ADDR0 + i * 4, addr); | ||
62 | bfin_write32(DCPLB_DATA0 + i * 4, data); | ||
63 | } | 55 | } |
56 | |||
64 | ctrl = bfin_read_DMEM_CONTROL(); | 57 | ctrl = bfin_read_DMEM_CONTROL(); |
65 | ctrl |= DMEM_CNTR; | 58 | ctrl |= DMEM_CNTR; |
66 | bfin_write_DMEM_CONTROL(ctrl); | 59 | bfin_write_DMEM_CONTROL(ctrl); |
67 | |||
68 | SSYNC(); | 60 | SSYNC(); |
69 | } | 61 | } |
70 | #endif | 62 | #endif |