aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/blackfin/include/asm/cplbinit.h2
-rw-r--r--arch/blackfin/kernel/cplb-nompu/cplbinit.c8
2 files changed, 4 insertions, 6 deletions
diff --git a/arch/blackfin/include/asm/cplbinit.h b/arch/blackfin/include/asm/cplbinit.h
index 6bfc25788161..2aeec87d24e1 100644
--- a/arch/blackfin/include/asm/cplbinit.h
+++ b/arch/blackfin/include/asm/cplbinit.h
@@ -46,8 +46,6 @@ extern void bfin_dcache_init(struct cplb_entry *icplb_tbl);
46#define I_CPLB 0x4 46#define I_CPLB 0x4
47#define D_CPLB 0x8 47#define D_CPLB 0x8
48 48
49#define IN_KERNEL 1
50
51#define ASYNC_MEMORY_CPLB_COVERAGE ((ASYNC_BANK0_SIZE + ASYNC_BANK1_SIZE + \ 49#define ASYNC_MEMORY_CPLB_COVERAGE ((ASYNC_BANK0_SIZE + ASYNC_BANK1_SIZE + \
52 ASYNC_BANK2_SIZE + ASYNC_BANK3_SIZE) / SIZE_4M) 50 ASYNC_BANK2_SIZE + ASYNC_BANK3_SIZE) / SIZE_4M)
53 51
diff --git a/arch/blackfin/kernel/cplb-nompu/cplbinit.c b/arch/blackfin/kernel/cplb-nompu/cplbinit.c
index 8966c706b71a..c17c988fb719 100644
--- a/arch/blackfin/kernel/cplb-nompu/cplbinit.c
+++ b/arch/blackfin/kernel/cplb-nompu/cplbinit.c
@@ -160,13 +160,13 @@ static struct cplb_desc cplb_data[] = {
160 }, 160 },
161}; 161};
162 162
163static u16 __init lock_kernel_check(u32 start, u32 end) 163static bool __init lock_kernel_check(u32 start, u32 end)
164{ 164{
165 if (start >= (u32)_end || end <= (u32)_stext) 165 if (start >= (u32)_end || end <= (u32)_stext)
166 return 0; 166 return false;
167 167
168 /* This cplb block overlapped with kernel area. */ 168 /* This cplb block overlapped with kernel area. */
169 return IN_KERNEL; 169 return true;
170} 170}
171 171
172static unsigned short __init 172static unsigned short __init
@@ -198,7 +198,7 @@ fill_cplbtab(struct cplb_tab *table,
198 198
199 table->tab[table->pos++] = start; 199 table->tab[table->pos++] = start;
200 200
201 if (lock_kernel_check(start, start + block_size) == IN_KERNEL) 201 if (lock_kernel_check(start, start + block_size))
202 table->tab[table->pos++] = 202 table->tab[table->pos++] =
203 cplb_data | CPLB_LOCK | CPLB_DIRTY; 203 cplb_data | CPLB_LOCK | CPLB_DIRTY;
204 else 204 else