Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
bf548.h
Go to the documentation of this file.
1 /*
2  * Copyright 2007-2009 Analog Devices Inc.
3  *
4  * Licensed under the GPL-2 or later.
5  */
6 
7 #ifndef __MACH_BF548_H__
8 #define __MACH_BF548_H__
9 
10 #define OFFSET_(x) ((x) & 0x0000FFFF)
11 
12 /*some misc defines*/
13 #define IMASK_IVG15 0x8000
14 #define IMASK_IVG14 0x4000
15 #define IMASK_IVG13 0x2000
16 #define IMASK_IVG12 0x1000
17 
18 #define IMASK_IVG11 0x0800
19 #define IMASK_IVG10 0x0400
20 #define IMASK_IVG9 0x0200
21 #define IMASK_IVG8 0x0100
22 
23 #define IMASK_IVG7 0x0080
24 #define IMASK_IVGTMR 0x0040
25 #define IMASK_IVGHW 0x0020
26 
27 /***************************/
28 
29 
30 #define BFIN_DSUBBANKS 4
31 #define BFIN_DWAYS 2
32 #define BFIN_DLINES 64
33 #define BFIN_ISUBBANKS 4
34 #define BFIN_IWAYS 4
35 #define BFIN_ILINES 32
36 
37 #define WAY0_L 0x1
38 #define WAY1_L 0x2
39 #define WAY01_L 0x3
40 #define WAY2_L 0x4
41 #define WAY02_L 0x5
42 #define WAY12_L 0x6
43 #define WAY012_L 0x7
44 
45 #define WAY3_L 0x8
46 #define WAY03_L 0x9
47 #define WAY13_L 0xA
48 #define WAY013_L 0xB
49 
50 #define WAY32_L 0xC
51 #define WAY320_L 0xD
52 #define WAY321_L 0xE
53 #define WAYALL_L 0xF
54 
55 #define DMC_ENABLE (2<<2) /*yes, 2, not 1 */
56 
57 /********************************* EBIU Settings ************************************/
58 #define AMBCTL0VAL ((CONFIG_BANK_1 << 16) | CONFIG_BANK_0)
59 #define AMBCTL1VAL ((CONFIG_BANK_3 << 16) | CONFIG_BANK_2)
60 
61 #ifdef CONFIG_C_AMBEN_ALL
62 #define V_AMBEN AMBEN_ALL
63 #endif
64 #ifdef CONFIG_C_AMBEN
65 #define V_AMBEN 0x0
66 #endif
67 #ifdef CONFIG_C_AMBEN_B0
68 #define V_AMBEN AMBEN_B0
69 #endif
70 #ifdef CONFIG_C_AMBEN_B0_B1
71 #define V_AMBEN AMBEN_B0_B1
72 #endif
73 #ifdef CONFIG_C_AMBEN_B0_B1_B2
74 #define V_AMBEN AMBEN_B0_B1_B2
75 #endif
76 #ifdef CONFIG_C_AMCKEN
77 #define V_AMCKEN AMCKEN
78 #else
79 #define V_AMCKEN 0x0
80 #endif
81 
82 #define AMGCTLVAL (V_AMBEN | V_AMCKEN)
83 
84 #if defined(CONFIG_BF542)
85 # define CPU "BF542"
86 # define CPUID 0x27de
87 #elif defined(CONFIG_BF544)
88 # define CPU "BF544"
89 # define CPUID 0x27de
90 #elif defined(CONFIG_BF547)
91 # define CPU "BF547"
92 # define CPUID 0x27de
93 #elif defined(CONFIG_BF548)
94 # define CPU "BF548"
95 # define CPUID 0x27de
96 #elif defined(CONFIG_BF549)
97 # define CPU "BF549"
98 # define CPUID 0x27de
99 #endif
100 
101 #ifndef CPU
102 #error "Unknown CPU type - This kernel doesn't seem to be configured properly"
103 #endif
104 
105 #endif /* __MACH_BF48_H__ */