aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/include/mach/hardware.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/include/mach/hardware.h')
-rw-r--r--arch/arm/mach-pxa/include/mach/hardware.h52
1 files changed, 34 insertions, 18 deletions
diff --git a/arch/arm/mach-pxa/include/mach/hardware.h b/arch/arm/mach-pxa/include/mach/hardware.h
index a582a6d9b92b..16ab79547dae 100644
--- a/arch/arm/mach-pxa/include/mach/hardware.h
+++ b/arch/arm/mach-pxa/include/mach/hardware.h
@@ -102,6 +102,9 @@
102 * PXA930 B0 0x69056835 0x5E643013 102 * PXA930 B0 0x69056835 0x5E643013
103 * PXA930 B1 0x69056837 0x7E643013 103 * PXA930 B1 0x69056837 0x7E643013
104 * PXA930 B2 0x69056838 0x8E643013 104 * PXA930 B2 0x69056838 0x8E643013
105 *
106 * PXA935 A0 0x56056931 0x1E653013
107 * PXA935 B0 0x56056936 0x6E653013
105 */ 108 */
106#ifdef CONFIG_PXA25x 109#ifdef CONFIG_PXA25x
107#define __cpu_is_pxa210(id) \ 110#define __cpu_is_pxa210(id) \
@@ -178,12 +181,22 @@
178#define __cpu_is_pxa930(id) \ 181#define __cpu_is_pxa930(id) \
179 ({ \ 182 ({ \
180 unsigned int _id = (id) >> 4 & 0xfff; \ 183 unsigned int _id = (id) >> 4 & 0xfff; \
181 _id == 0x683; \ 184 _id == 0x683; \
182 }) 185 })
183#else 186#else
184#define __cpu_is_pxa930(id) (0) 187#define __cpu_is_pxa930(id) (0)
185#endif 188#endif
186 189
190#ifdef CONFIG_CPU_PXA935
191#define __cpu_is_pxa935(id) \
192 ({ \
193 unsigned int _id = (id) >> 4 & 0xfff; \
194 _id == 0x693; \
195 })
196#else
197#define __cpu_is_pxa935(id) (0)
198#endif
199
187#define cpu_is_pxa210() \ 200#define cpu_is_pxa210() \
188 ({ \ 201 ({ \
189 __cpu_is_pxa210(read_cpuid_id()); \ 202 __cpu_is_pxa210(read_cpuid_id()); \
@@ -204,8 +217,6 @@
204 __cpu_is_pxa25x(read_cpuid_id()); \ 217 __cpu_is_pxa25x(read_cpuid_id()); \
205 }) 218 })
206 219
207extern int cpu_is_pxa26x(void);
208
209#define cpu_is_pxa27x() \ 220#define cpu_is_pxa27x() \
210 ({ \ 221 ({ \
211 __cpu_is_pxa27x(read_cpuid_id()); \ 222 __cpu_is_pxa27x(read_cpuid_id()); \
@@ -232,6 +243,12 @@ extern int cpu_is_pxa26x(void);
232 __cpu_is_pxa930(id); \ 243 __cpu_is_pxa930(id); \
233 }) 244 })
234 245
246#define cpu_is_pxa935() \
247 ({ \
248 unsigned int id = read_cpuid(CPUID_ID); \
249 __cpu_is_pxa935(id); \
250 })
251
235/* 252/*
236 * CPUID Core Generation Bit 253 * CPUID Core Generation Bit
237 * <= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x 254 * <= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x
@@ -249,6 +266,12 @@ extern int cpu_is_pxa26x(void);
249 _id == 0x3; \ 266 _id == 0x3; \
250 }) 267 })
251 268
269#define __cpu_is_pxa9xx(id) \
270 ({ \
271 unsigned int _id = (id) >> 4 & 0xfff; \
272 _id == 0x683 || _id == 0x693; \
273 })
274
252#define cpu_is_pxa2xx() \ 275#define cpu_is_pxa2xx() \
253 ({ \ 276 ({ \
254 __cpu_is_pxa2xx(read_cpuid_id()); \ 277 __cpu_is_pxa2xx(read_cpuid_id()); \
@@ -259,32 +282,25 @@ extern int cpu_is_pxa26x(void);
259 __cpu_is_pxa3xx(read_cpuid_id()); \ 282 __cpu_is_pxa3xx(read_cpuid_id()); \
260 }) 283 })
261 284
262/* 285#define cpu_is_pxa9xx() \
263 * Handy routine to set GPIO alternate functions 286 ({ \
264 */ 287 __cpu_is_pxa9xx(read_cpuid_id()); \
265extern int pxa_gpio_mode( int gpio_mode ); 288 })
266
267/*
268 * Return GPIO level, nonzero means high, zero is low
269 */
270extern int pxa_gpio_get_value(unsigned gpio);
271
272/*
273 * Set output GPIO level
274 */
275extern void pxa_gpio_set_value(unsigned gpio, int value);
276
277/* 289/*
278 * return current memory and LCD clock frequency in units of 10kHz 290 * return current memory and LCD clock frequency in units of 10kHz
279 */ 291 */
280extern unsigned int get_memclk_frequency_10khz(void); 292extern unsigned int get_memclk_frequency_10khz(void);
281 293
294/* return the clock tick rate of the OS timer */
295extern unsigned long get_clock_tick_rate(void);
282#endif 296#endif
283 297
284#if defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI) 298#if defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI)
285#define PCIBIOS_MIN_IO 0 299#define PCIBIOS_MIN_IO 0
286#define PCIBIOS_MIN_MEM 0 300#define PCIBIOS_MIN_MEM 0
287#define pcibios_assign_all_busses() 1 301#define pcibios_assign_all_busses() 1
302#define HAVE_ARCH_PCI_SET_DMA_MASK 1
288#endif 303#endif
289 304
305
290#endif /* _ASM_ARCH_HARDWARE_H */ 306#endif /* _ASM_ARCH_HARDWARE_H */