summaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel/cplb-mpu
diff options
context:
space:
mode:
authorMike Frysinger <vapier.adi@gmail.com>2008-04-23 23:44:32 +0200
committerBryan Wu <cooloney@kernel.org>2008-04-23 23:44:32 +0200
commit4e354b54991fd7d589c8e5753eea58a1afcae30a (patch)
tree4e50e675fe70502cb2a81c995b10fea37ae6b630 /arch/blackfin/kernel/cplb-mpu
parent[Blackfin] arch: Give the DMA base registers a more descriptive name (diff)
downloadlinux-4e354b54991fd7d589c8e5753eea58a1afcae30a.tar.xz
linux-4e354b54991fd7d589c8e5753eea58a1afcae30a.zip
[Blackfin] arch: cplb-mpu code clean up
- allow bootrom to be readable from supervisor mode - delete unused local variable "addr" - punt unused local defines of cplbinfo.c Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/kernel/cplb-mpu')
-rw-r--r--arch/blackfin/kernel/cplb-mpu/cplbinfo.c8
-rw-r--r--arch/blackfin/kernel/cplb-mpu/cplbmgr.c6
2 files changed, 5 insertions, 9 deletions
diff --git a/arch/blackfin/kernel/cplb-mpu/cplbinfo.c b/arch/blackfin/kernel/cplb-mpu/cplbinfo.c
index bd072299f7f2..822beefa3a4b 100644
--- a/arch/blackfin/kernel/cplb-mpu/cplbinfo.c
+++ b/arch/blackfin/kernel/cplb-mpu/cplbinfo.c
@@ -39,14 +39,6 @@
#include <asm/cplbinit.h>
#include <asm/blackfin.h>
-#define CPLB_I 1
-#define CPLB_D 2
-
-#define SYNC_SYS SSYNC()
-#define SYNC_CORE CSYNC()
-
-#define CPLB_BIT_PAGESIZE 0x30000
-
static char page_size_string_table[][4] = { "1K", "4K", "1M", "4M" };
static char *cplb_print_entry(char *buf, struct cplb_entry *tbl, int switched)
diff --git a/arch/blackfin/kernel/cplb-mpu/cplbmgr.c b/arch/blackfin/kernel/cplb-mpu/cplbmgr.c
index 3377cbf28fb4..3b165bbe90fa 100644
--- a/arch/blackfin/kernel/cplb-mpu/cplbmgr.c
+++ b/arch/blackfin/kernel/cplb-mpu/cplbmgr.c
@@ -161,6 +161,11 @@ static noinline int dcplb_miss(void)
addr &= ~0x3fffff;
d_data &= ~PAGE_SIZE_4KB;
d_data |= PAGE_SIZE_4MB;
+ } else if (addr >= BOOT_ROM_START && addr < BOOT_ROM_START + BOOT_ROM_LENGTH
+ && (status & (FAULT_RW | FAULT_USERSUPV)) == FAULT_USERSUPV) {
+ addr &= ~(1 * 1024 * 1024 - 1);
+ d_data &= ~PAGE_SIZE_4KB;
+ d_data |= PAGE_SIZE_1MB | CPLB_USER_RD;
} else
return CPLB_PROT_VIOL;
} else if (addr >= _ramend) {
@@ -277,7 +282,6 @@ static noinline int icplb_miss(void)
static noinline int dcplb_protection_fault(void)
{
- unsigned long addr = bfin_read_DCPLB_FAULT_ADDR();
int status = bfin_read_DCPLB_STATUS();
nr_dcplb_prot++;