diff options
author | Graf Yang <graf.yang@analog.com> | 2008-11-18 04:48:22 -0500 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2008-11-18 04:48:22 -0500 |
commit | b8a989893cbdeb6c97a7b5af5f38fb0e480235f9 (patch) | |
tree | 658cf6df93dac687f0d6b94111d0f53b3dd0177c /arch/blackfin/include/asm/cplb.h | |
parent | 6b3087c64a92a36ae20d33479b4df6d7afc910d4 (diff) |
Blackfin arch: SMP supporting patchset: Blackfin CPLB related code
Blackfin dual core BF561 processor can support SMP like features.
https://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:smp-like
In this patch, we provide SMP extend to Blackfin CPLB related code
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/include/asm/cplb.h')
-rw-r--r-- | arch/blackfin/include/asm/cplb.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/arch/blackfin/include/asm/cplb.h b/arch/blackfin/include/asm/cplb.h index 9e8b4035fcec..5f7545d06200 100644 --- a/arch/blackfin/include/asm/cplb.h +++ b/arch/blackfin/include/asm/cplb.h | |||
@@ -30,7 +30,6 @@ | |||
30 | #ifndef _CPLB_H | 30 | #ifndef _CPLB_H |
31 | #define _CPLB_H | 31 | #define _CPLB_H |
32 | 32 | ||
33 | #include <asm/blackfin.h> | ||
34 | #include <mach/anomaly.h> | 33 | #include <mach/anomaly.h> |
35 | 34 | ||
36 | #define SDRAM_IGENERIC (CPLB_L1_CHBL | CPLB_USER_RD | CPLB_VALID | CPLB_PORTPRIO) | 35 | #define SDRAM_IGENERIC (CPLB_L1_CHBL | CPLB_USER_RD | CPLB_VALID | CPLB_PORTPRIO) |
@@ -55,13 +54,24 @@ | |||
55 | #endif | 54 | #endif |
56 | 55 | ||
57 | #define L1_DMEMORY (CPLB_LOCK | CPLB_COMMON) | 56 | #define L1_DMEMORY (CPLB_LOCK | CPLB_COMMON) |
57 | |||
58 | #ifdef CONFIG_SMP | ||
59 | #define L2_ATTR (INITIAL_T | I_CPLB | D_CPLB) | ||
60 | #define L2_IMEMORY (CPLB_COMMON | CPLB_LOCK) | ||
61 | #define L2_DMEMORY (CPLB_COMMON | CPLB_LOCK) | ||
62 | |||
63 | #else | ||
58 | #ifdef CONFIG_BFIN_L2_CACHEABLE | 64 | #ifdef CONFIG_BFIN_L2_CACHEABLE |
59 | #define L2_IMEMORY (SDRAM_IGENERIC) | 65 | #define L2_IMEMORY (SDRAM_IGENERIC) |
60 | #define L2_DMEMORY (SDRAM_DGENERIC) | 66 | #define L2_DMEMORY (SDRAM_DGENERIC) |
61 | #else | 67 | #else |
62 | #define L2_IMEMORY (CPLB_COMMON) | 68 | #define L2_IMEMORY (CPLB_COMMON) |
63 | #define L2_DMEMORY (CPLB_COMMON) | 69 | #define L2_DMEMORY (CPLB_COMMON) |
64 | #endif | 70 | #endif /* CONFIG_BFIN_L2_CACHEABLE */ |
71 | |||
72 | #define L2_ATTR (INITIAL_T | SWITCH_T | I_CPLB | D_CPLB) | ||
73 | #endif /* CONFIG_SMP */ | ||
74 | |||
65 | #define SDRAM_DNON_CHBL (CPLB_COMMON) | 75 | #define SDRAM_DNON_CHBL (CPLB_COMMON) |
66 | #define SDRAM_EBIU (CPLB_COMMON) | 76 | #define SDRAM_EBIU (CPLB_COMMON) |
67 | #define SDRAM_OOPS (CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_LOCK | CPLB_DIRTY) | 77 | #define SDRAM_OOPS (CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_LOCK | CPLB_DIRTY) |
@@ -71,14 +81,7 @@ | |||
71 | #define SIZE_1M 0x00100000 /* 1M */ | 81 | #define SIZE_1M 0x00100000 /* 1M */ |
72 | #define SIZE_4M 0x00400000 /* 4M */ | 82 | #define SIZE_4M 0x00400000 /* 4M */ |
73 | 83 | ||
74 | #ifdef CONFIG_MPU | ||
75 | #define MAX_CPLBS 16 | 84 | #define MAX_CPLBS 16 |
76 | #else | ||
77 | #define MAX_CPLBS (16 * 2) | ||
78 | #endif | ||
79 | |||
80 | #define ASYNC_MEMORY_CPLB_COVERAGE ((ASYNC_BANK0_SIZE + ASYNC_BANK1_SIZE + \ | ||
81 | ASYNC_BANK2_SIZE + ASYNC_BANK3_SIZE) / SIZE_4M) | ||
82 | 85 | ||
83 | #define CPLB_ENABLE_ICACHE_P 0 | 86 | #define CPLB_ENABLE_ICACHE_P 0 |
84 | #define CPLB_ENABLE_DCACHE_P 1 | 87 | #define CPLB_ENABLE_DCACHE_P 1 |