aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel/cplb-nompu/cplbinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/kernel/cplb-nompu/cplbinit.c')
-rw-r--r--arch/blackfin/kernel/cplb-nompu/cplbinit.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/arch/blackfin/kernel/cplb-nompu/cplbinit.c b/arch/blackfin/kernel/cplb-nompu/cplbinit.c
index 34e96ce02aa9..b49a53b583d5 100644
--- a/arch/blackfin/kernel/cplb-nompu/cplbinit.c
+++ b/arch/blackfin/kernel/cplb-nompu/cplbinit.c
@@ -30,6 +30,7 @@ void __init generate_cplb_tables_cpu(unsigned int cpu)
30{ 30{
31 int i_d, i_i; 31 int i_d, i_i;
32 unsigned long addr; 32 unsigned long addr;
33 unsigned long cplb_pageflags, cplb_pagesize;
33 34
34 struct cplb_entry *d_tbl = dcplb_tbl[cpu]; 35 struct cplb_entry *d_tbl = dcplb_tbl[cpu];
35 struct cplb_entry *i_tbl = icplb_tbl[cpu]; 36 struct cplb_entry *i_tbl = icplb_tbl[cpu];
@@ -49,11 +50,20 @@ void __init generate_cplb_tables_cpu(unsigned int cpu)
49 /* Cover kernel memory with 4M pages. */ 50 /* Cover kernel memory with 4M pages. */
50 addr = 0; 51 addr = 0;
51 52
52 for (; addr < memory_start; addr += 4 * 1024 * 1024) { 53#ifdef PAGE_SIZE_16MB
54 cplb_pageflags = PAGE_SIZE_16MB;
55 cplb_pagesize = SIZE_16M;
56#else
57 cplb_pageflags = PAGE_SIZE_4MB;
58 cplb_pagesize = SIZE_4M;
59#endif
60
61
62 for (; addr < memory_start; addr += cplb_pagesize) {
53 d_tbl[i_d].addr = addr; 63 d_tbl[i_d].addr = addr;
54 d_tbl[i_d++].data = SDRAM_DGENERIC | PAGE_SIZE_4MB; 64 d_tbl[i_d++].data = SDRAM_DGENERIC | cplb_pageflags;
55 i_tbl[i_i].addr = addr; 65 i_tbl[i_i].addr = addr;
56 i_tbl[i_i++].data = SDRAM_IGENERIC | PAGE_SIZE_4MB; 66 i_tbl[i_i++].data = SDRAM_IGENERIC | cplb_pageflags;
57 } 67 }
58 68
59#ifdef CONFIG_ROMKERNEL 69#ifdef CONFIG_ROMKERNEL