xref: /linux/arch/arm/mach-pxa/generic.h (revision 4508f7751728980873c0368dedb298fc6f550b50)
11da177e4SLinus Torvalds /*
21da177e4SLinus Torvalds  *  linux/arch/arm/mach-pxa/generic.h
31da177e4SLinus Torvalds  *
41da177e4SLinus Torvalds  * Author:	Nicolas Pitre
51da177e4SLinus Torvalds  * Copyright:	MontaVista Software Inc.
61da177e4SLinus Torvalds  *
71da177e4SLinus Torvalds  * This program is free software; you can redistribute it and/or modify
81da177e4SLinus Torvalds  * it under the terms of the GNU General Public License version 2 as
91da177e4SLinus Torvalds  * published by the Free Software Foundation.
101da177e4SLinus Torvalds  */
111da177e4SLinus Torvalds 
127b6d864bSRobin Holt #include <linux/reboot.h>
137b6d864bSRobin Holt 
14a3f4c927SLennert Buytenhek struct irq_data;
151da177e4SLinus Torvalds 
161da177e4SLinus Torvalds extern unsigned int get_clk_frequency_khz(int info);
17*4508f775SRobert Jarzmik extern void __init pxa_dt_irq_init(int (*fn)(struct irq_data *,
18*4508f775SRobert Jarzmik 					     unsigned int));
19*4508f775SRobert Jarzmik extern void __init pxa_map_io(void);
20*4508f775SRobert Jarzmik extern void pxa_timer_init(void);
211da177e4SLinus Torvalds 
221da177e4SLinus Torvalds #define SET_BANK(__nr,__start,__size) \
231da177e4SLinus Torvalds 	mi->bank[__nr].start = (__start), \
24be370302SRussell King 	mi->bank[__nr].size = (__size)
251da177e4SLinus Torvalds 
263d3934c3Seric miao #define ARRAY_AND_SIZE(x)	(x), ARRAY_SIZE(x)
273d3934c3Seric miao 
28*4508f775SRobert Jarzmik #define pxa25x_handle_irq icip_handle_irq
29*4508f775SRobert Jarzmik extern void __init pxa25x_init_irq(void);
30*4508f775SRobert Jarzmik extern void __init pxa25x_map_io(void);
31*4508f775SRobert Jarzmik extern void __init pxa26x_init_irq(void);
3215a40333SRussell King 
33*4508f775SRobert Jarzmik #define pxa27x_handle_irq ichp_handle_irq
34*4508f775SRobert Jarzmik extern void __init pxa27x_dt_init_irq(void);
3515a40333SRussell King extern unsigned	pxa27x_get_clk_frequency_khz(int);
36*4508f775SRobert Jarzmik extern void __init pxa27x_init_irq(void);
37*4508f775SRobert Jarzmik extern void __init pxa27x_map_io(void);
3815a40333SRussell King 
39*4508f775SRobert Jarzmik #define pxa3xx_handle_irq ichp_handle_irq
40*4508f775SRobert Jarzmik extern void __init pxa3xx_dt_init_irq(void);
41*4508f775SRobert Jarzmik extern void __init pxa3xx_init_irq(void);
42*4508f775SRobert Jarzmik extern void __init pxa3xx_map_io(void);
43c0165504Seric miao 
442eaa03b5SRafael J. Wysocki extern struct syscore_ops pxa_irq_syscore_ops;
452eaa03b5SRafael J. Wysocki extern struct syscore_ops pxa2xx_mfp_syscore_ops;
462eaa03b5SRafael J. Wysocki extern struct syscore_ops pxa3xx_mfp_syscore_ops;
47cc155c6fSRussell King 
48cc155c6fSRussell King void __init pxa_set_ffuart_info(void *info);
49cc155c6fSRussell King void __init pxa_set_btuart_info(void *info);
50cc155c6fSRussell King void __init pxa_set_stuart_info(void *info);
51cc155c6fSRussell King void __init pxa_set_hwuart_info(void *info);
52271a74fcSRussell King 
537b6d864bSRobin Holt void pxa_restart(enum reboot_mode, const char *);
54*4508f775SRobert Jarzmik 
55*4508f775SRobert Jarzmik #if defined(CONFIG_PXA25x) || defined(CONFIG_PXA27x)
56*4508f775SRobert Jarzmik extern void pxa2xx_clear_reset_status(unsigned int);
57*4508f775SRobert Jarzmik #else
58*4508f775SRobert Jarzmik static inline void pxa2xx_clear_reset_status(unsigned int mask) {}
59*4508f775SRobert Jarzmik #endif
60*4508f775SRobert Jarzmik 
61*4508f775SRobert Jarzmik /*
62*4508f775SRobert Jarzmik  * Once fully converted to the clock framework, all these functions should be
63*4508f775SRobert Jarzmik  * removed, and replaced with a clk_get(NULL, "core").
64*4508f775SRobert Jarzmik  */
65*4508f775SRobert Jarzmik #ifdef CONFIG_PXA25x
66*4508f775SRobert Jarzmik extern unsigned pxa25x_get_clk_frequency_khz(int);
67*4508f775SRobert Jarzmik #else
68*4508f775SRobert Jarzmik #define pxa25x_get_clk_frequency_khz(x)		(0)
69*4508f775SRobert Jarzmik #endif
70*4508f775SRobert Jarzmik 
71*4508f775SRobert Jarzmik #ifdef CONFIG_PXA27x
72*4508f775SRobert Jarzmik #else
73*4508f775SRobert Jarzmik #define pxa27x_get_clk_frequency_khz(x)		(0)
74*4508f775SRobert Jarzmik #endif
75*4508f775SRobert Jarzmik 
76*4508f775SRobert Jarzmik #ifdef CONFIG_PXA3xx
77*4508f775SRobert Jarzmik extern unsigned	pxa3xx_get_clk_frequency_khz(int);
78*4508f775SRobert Jarzmik #else
79*4508f775SRobert Jarzmik #define pxa3xx_get_clk_frequency_khz(x)		(0)
80*4508f775SRobert Jarzmik #endif
81