diff options
Diffstat (limited to 'include/asm-arm/arch-pxa/hardware.h')
-rw-r--r-- | include/asm-arm/arch-pxa/hardware.h | 99 |
1 files changed, 97 insertions, 2 deletions
diff --git a/include/asm-arm/arch-pxa/hardware.h b/include/asm-arm/arch-pxa/hardware.h index 386121746417..ab2d963e742a 100644 --- a/include/asm-arm/arch-pxa/hardware.h +++ b/include/asm-arm/arch-pxa/hardware.h | |||
@@ -62,6 +62,7 @@ | |||
62 | 62 | ||
63 | #ifndef __ASSEMBLY__ | 63 | #ifndef __ASSEMBLY__ |
64 | 64 | ||
65 | #ifdef CONFIG_PXA25x | ||
65 | #define __cpu_is_pxa21x(id) \ | 66 | #define __cpu_is_pxa21x(id) \ |
66 | ({ \ | 67 | ({ \ |
67 | unsigned int _id = (id) >> 4 & 0xf3f; \ | 68 | unsigned int _id = (id) >> 4 & 0xf3f; \ |
@@ -73,12 +74,50 @@ | |||
73 | unsigned int _id = (id) >> 4 & 0xfff; \ | 74 | unsigned int _id = (id) >> 4 & 0xfff; \ |
74 | _id == 0x2d0 || _id == 0x290; \ | 75 | _id == 0x2d0 || _id == 0x290; \ |
75 | }) | 76 | }) |
77 | #else | ||
78 | #define __cpu_is_pxa21x(id) (0) | ||
79 | #define __cpu_is_pxa25x(id) (0) | ||
80 | #endif | ||
76 | 81 | ||
82 | #ifdef CONFIG_PXA27x | ||
77 | #define __cpu_is_pxa27x(id) \ | 83 | #define __cpu_is_pxa27x(id) \ |
78 | ({ \ | 84 | ({ \ |
79 | unsigned int _id = (id) >> 4 & 0xfff; \ | 85 | unsigned int _id = (id) >> 4 & 0xfff; \ |
80 | _id == 0x411; \ | 86 | _id == 0x411; \ |
81 | }) | 87 | }) |
88 | #else | ||
89 | #define __cpu_is_pxa27x(id) (0) | ||
90 | #endif | ||
91 | |||
92 | #ifdef CONFIG_CPU_PXA300 | ||
93 | #define __cpu_is_pxa300(id) \ | ||
94 | ({ \ | ||
95 | unsigned int _id = (id) >> 4 & 0xfff; \ | ||
96 | _id == 0x688; \ | ||
97 | }) | ||
98 | #else | ||
99 | #define __cpu_is_pxa300(id) (0) | ||
100 | #endif | ||
101 | |||
102 | #ifdef CONFIG_CPU_PXA310 | ||
103 | #define __cpu_is_pxa310(id) \ | ||
104 | ({ \ | ||
105 | unsigned int _id = (id) >> 4 & 0xfff; \ | ||
106 | _id == 0x689; \ | ||
107 | }) | ||
108 | #else | ||
109 | #define __cpu_is_pxa310(id) (0) | ||
110 | #endif | ||
111 | |||
112 | #ifdef CONFIG_CPU_PXA320 | ||
113 | #define __cpu_is_pxa320(id) \ | ||
114 | ({ \ | ||
115 | unsigned int _id = (id) >> 4 & 0xfff; \ | ||
116 | _id == 0x603 || _id == 0x682; \ | ||
117 | }) | ||
118 | #else | ||
119 | #define __cpu_is_pxa320(id) (0) | ||
120 | #endif | ||
82 | 121 | ||
83 | #define cpu_is_pxa21x() \ | 122 | #define cpu_is_pxa21x() \ |
84 | ({ \ | 123 | ({ \ |
@@ -98,6 +137,53 @@ | |||
98 | __cpu_is_pxa27x(id); \ | 137 | __cpu_is_pxa27x(id); \ |
99 | }) | 138 | }) |
100 | 139 | ||
140 | #define cpu_is_pxa300() \ | ||
141 | ({ \ | ||
142 | unsigned int id = read_cpuid(CPUID_ID); \ | ||
143 | __cpu_is_pxa300(id); \ | ||
144 | }) | ||
145 | |||
146 | #define cpu_is_pxa310() \ | ||
147 | ({ \ | ||
148 | unsigned int id = read_cpuid(CPUID_ID); \ | ||
149 | __cpu_is_pxa310(id); \ | ||
150 | }) | ||
151 | |||
152 | #define cpu_is_pxa320() \ | ||
153 | ({ \ | ||
154 | unsigned int id = read_cpuid(CPUID_ID); \ | ||
155 | __cpu_is_pxa320(id); \ | ||
156 | }) | ||
157 | |||
158 | /* | ||
159 | * CPUID Core Generation Bit | ||
160 | * <= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x | ||
161 | * == 0x3 for pxa300/pxa310/pxa320 | ||
162 | */ | ||
163 | #define __cpu_is_pxa2xx(id) \ | ||
164 | ({ \ | ||
165 | unsigned int _id = (id) >> 13 & 0x7; \ | ||
166 | _id <= 0x2; \ | ||
167 | }) | ||
168 | |||
169 | #define __cpu_is_pxa3xx(id) \ | ||
170 | ({ \ | ||
171 | unsigned int _id = (id) >> 13 & 0x7; \ | ||
172 | _id == 0x3; \ | ||
173 | }) | ||
174 | |||
175 | #define cpu_is_pxa2xx() \ | ||
176 | ({ \ | ||
177 | unsigned int id = read_cpuid(CPUID_ID); \ | ||
178 | __cpu_is_pxa2xx(id); \ | ||
179 | }) | ||
180 | |||
181 | #define cpu_is_pxa3xx() \ | ||
182 | ({ \ | ||
183 | unsigned int id = read_cpuid(CPUID_ID); \ | ||
184 | __cpu_is_pxa3xx(id); \ | ||
185 | }) | ||
186 | |||
101 | /* | 187 | /* |
102 | * Handy routine to set GPIO alternate functions | 188 | * Handy routine to set GPIO alternate functions |
103 | */ | 189 | */ |
@@ -116,14 +202,23 @@ extern void pxa_gpio_set_value(unsigned gpio, int value); | |||
116 | /* | 202 | /* |
117 | * Routine to enable or disable CKEN | 203 | * Routine to enable or disable CKEN |
118 | */ | 204 | */ |
119 | extern void pxa_set_cken(int clock, int enable); | 205 | static inline void __deprecated pxa_set_cken(int clock, int enable) |
206 | { | ||
207 | extern void __pxa_set_cken(int clock, int enable); | ||
208 | __pxa_set_cken(clock, enable); | ||
209 | } | ||
120 | 210 | ||
121 | /* | 211 | /* |
122 | * return current memory and LCD clock frequency in units of 10kHz | 212 | * return current memory and LCD clock frequency in units of 10kHz |
123 | */ | 213 | */ |
124 | extern unsigned int get_memclk_frequency_10khz(void); | 214 | extern unsigned int get_memclk_frequency_10khz(void); |
125 | extern unsigned int get_lcdclk_frequency_10khz(void); | ||
126 | 215 | ||
127 | #endif | 216 | #endif |
128 | 217 | ||
218 | #if defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI) | ||
219 | #define PCIBIOS_MIN_IO 0 | ||
220 | #define PCIBIOS_MIN_MEM 0 | ||
221 | #define pcibios_assign_all_busses() 1 | ||
222 | #endif | ||
223 | |||
129 | #endif /* _ASM_ARCH_HARDWARE_H */ | 224 | #endif /* _ASM_ARCH_HARDWARE_H */ |