diff options
author | Robin Getz <robin.getz@analog.com> | 2007-10-10 11:55:26 -0400 |
---|---|---|
committer | Bryan Wu <bryan.wu@analog.com> | 2007-10-10 11:55:26 -0400 |
commit | 3bebca2d20796dd3dc62c5d3e74148087c7ce5bd (patch) | |
tree | fdb5eb8eb774fa5e8df41ebbf0e0d2c82b9ff627 /include/asm-blackfin/cplb.h | |
parent | a298049180d2c56fc8ac1796b24973bf4f019cc7 (diff) |
Blackfin arch: to do some consolidation of common code and common name spaces
now all BLKFIN should be BFIN, should be no functional changes.
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'include/asm-blackfin/cplb.h')
-rw-r--r-- | include/asm-blackfin/cplb.h | 89 |
1 files changed, 81 insertions, 8 deletions
diff --git a/include/asm-blackfin/cplb.h b/include/asm-blackfin/cplb.h index e0dd56bfa4c7..c9fc77684fb2 100644 --- a/include/asm-blackfin/cplb.h +++ b/include/asm-blackfin/cplb.h | |||
@@ -1,18 +1,93 @@ | |||
1 | /************************************************************************ | 1 | /* |
2 | * File: include/asm-blackfin/cplb.h | ||
3 | * Based on: include/asm-blackfin/mach-bf537/bf537.h | ||
4 | * Author: Robin Getz <rgetz@blackfin.uclinux.org> | ||
2 | * | 5 | * |
3 | * cplb.h | 6 | * Created: 2000 |
7 | * Description: Common CPLB definitions for CPLB init | ||
4 | * | 8 | * |
5 | * (c) Copyright 2002-2003 Analog Devices, Inc. All rights reserved. | 9 | * Modified: |
10 | * Copyright 2004-2007 Analog Devices Inc. | ||
6 | * | 11 | * |
7 | ************************************************************************/ | 12 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ |
8 | 13 | * | |
9 | /* Defines necessary for cplb initialisation routines. */ | 14 | * This program is free software; you can redistribute it and/or modify |
15 | * it under the terms of the GNU General Public License as published by | ||
16 | * the Free Software Foundation; either version 2 of the License, or | ||
17 | * (at your option) any later version. | ||
18 | * | ||
19 | * This program is distributed in the hope that it will be useful, | ||
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
22 | * GNU General Public License for more details. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License | ||
25 | * along with this program; if not, see the file COPYING, or write | ||
26 | * to the Free Software Foundation, Inc., | ||
27 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
28 | */ | ||
10 | 29 | ||
11 | #ifndef _CPLB_H | 30 | #ifndef _CPLB_H |
12 | #define _CPLB_H | 31 | #define _CPLB_H |
13 | 32 | ||
14 | # include <asm/blackfin.h> | 33 | # include <asm/blackfin.h> |
15 | 34 | ||
35 | #define SDRAM_IGENERIC (CPLB_L1_CHBL | CPLB_USER_RD | CPLB_VALID | CPLB_PORTPRIO) | ||
36 | #define SDRAM_IKERNEL (SDRAM_IGENERIC | CPLB_LOCK) | ||
37 | #define L1_IMEMORY ( CPLB_USER_RD | CPLB_VALID | CPLB_LOCK) | ||
38 | #define SDRAM_INON_CHBL ( CPLB_USER_RD | CPLB_VALID) | ||
39 | |||
40 | /*Use the menuconfig cache policy here - CONFIG_BFIN_WT/CONFIG_BFIN_WB*/ | ||
41 | |||
42 | #if ANOMALY_05000158 | ||
43 | #define ANOMALY_05000158_WORKAROUND 0x200 | ||
44 | #else | ||
45 | #define ANOMALY_05000158_WORKAROUND 0x0 | ||
46 | #endif | ||
47 | |||
48 | #define CPLB_COMMON (CPLB_DIRTY | CPLB_SUPV_WR | CPLB_USER_WR | CPLB_USER_RD | CPLB_VALID | ANOMALY_05000158_WORKAROUND) | ||
49 | |||
50 | #ifdef CONFIG_BFIN_WB /*Write Back Policy */ | ||
51 | #define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_COMMON) | ||
52 | #else /*Write Through */ | ||
53 | #define SDRAM_DGENERIC (CPLB_L1_CHBL | CPLB_WT | CPLB_L1_AOW | CPLB_COMMON) | ||
54 | #endif | ||
55 | |||
56 | #define L1_DMEMORY (CPLB_LOCK | CPLB_COMMON) | ||
57 | #define SDRAM_DNON_CHBL (CPLB_COMMON) | ||
58 | #define SDRAM_EBIU (CPLB_COMMON) | ||
59 | #define SDRAM_OOPS (CPLB_VALID | ANOMALY_05000158_WORKAROUND | CPLB_LOCK | CPLB_DIRTY) | ||
60 | |||
61 | #define SIZE_1K 0x00000400 /* 1K */ | ||
62 | #define SIZE_4K 0x00001000 /* 4K */ | ||
63 | #define SIZE_1M 0x00100000 /* 1M */ | ||
64 | #define SIZE_4M 0x00400000 /* 4M */ | ||
65 | |||
66 | #define MAX_CPLBS (16 * 2) | ||
67 | |||
68 | /* | ||
69 | * Number of required data CPLB switchtable entries | ||
70 | * MEMSIZE / 4 (we mostly install 4M page size CPLBs | ||
71 | * approx 16 for smaller 1MB page size CPLBs for allignment purposes | ||
72 | * 1 for L1 Data Memory | ||
73 | * 1 for CONFIG_DEBUG_HUNT_FOR_ZERO | ||
74 | * 1 for ASYNC Memory | ||
75 | */ | ||
76 | |||
77 | |||
78 | #define MAX_SWITCH_D_CPLBS (((CONFIG_MEM_SIZE / 4) + 16 + 1 + 1 + 1) * 2) | ||
79 | |||
80 | /* | ||
81 | * Number of required instruction CPLB switchtable entries | ||
82 | * MEMSIZE / 4 (we mostly install 4M page size CPLBs | ||
83 | * approx 12 for smaller 1MB page size CPLBs for allignment purposes | ||
84 | * 1 for L1 Instruction Memory | ||
85 | * 1 for CONFIG_DEBUG_HUNT_FOR_ZERO | ||
86 | */ | ||
87 | |||
88 | #define MAX_SWITCH_I_CPLBS (((CONFIG_MEM_SIZE / 4) + 12 + 1 + 1) * 2) | ||
89 | |||
90 | |||
16 | #define CPLB_ENABLE_ICACHE_P 0 | 91 | #define CPLB_ENABLE_ICACHE_P 0 |
17 | #define CPLB_ENABLE_DCACHE_P 1 | 92 | #define CPLB_ENABLE_DCACHE_P 1 |
18 | #define CPLB_ENABLE_DCACHE2_P 2 | 93 | #define CPLB_ENABLE_DCACHE2_P 2 |
@@ -39,8 +114,6 @@ | |||
39 | #define CPLB_DEF_CACHE CPLB_L1_CHBL | CPLB_WT | 114 | #define CPLB_DEF_CACHE CPLB_L1_CHBL | CPLB_WT |
40 | #define CPLB_CACHE_ENABLED CPLB_L1_CHBL | CPLB_DIRTY | 115 | #define CPLB_CACHE_ENABLED CPLB_L1_CHBL | CPLB_DIRTY |
41 | 116 | ||
42 | #define CPLB_ALL_ACCESS CPLB_SUPV_WR | CPLB_USER_RD | CPLB_USER_WR | ||
43 | |||
44 | #define CPLB_I_PAGE_MGMT CPLB_LOCK | CPLB_VALID | 117 | #define CPLB_I_PAGE_MGMT CPLB_LOCK | CPLB_VALID |
45 | #define CPLB_D_PAGE_MGMT CPLB_LOCK | CPLB_ALL_ACCESS | CPLB_VALID | 118 | #define CPLB_D_PAGE_MGMT CPLB_LOCK | CPLB_ALL_ACCESS | CPLB_VALID |
46 | #define CPLB_DNOCACHE CPLB_ALL_ACCESS | CPLB_VALID | 119 | #define CPLB_DNOCACHE CPLB_ALL_ACCESS | CPLB_VALID |