1*d2912cb1SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 21da177e4SLinus Torvalds /* 31da177e4SLinus Torvalds * linux/arch/arm/mach-pxa/generic.h 41da177e4SLinus Torvalds * 51da177e4SLinus Torvalds * Author: Nicolas Pitre 61da177e4SLinus Torvalds * Copyright: MontaVista Software Inc. 71da177e4SLinus Torvalds */ 81da177e4SLinus Torvalds 97b6d864bSRobin Holt #include <linux/reboot.h> 107b6d864bSRobin Holt 11a3f4c927SLennert Buytenhek struct irq_data; 121da177e4SLinus Torvalds 131da177e4SLinus Torvalds extern unsigned int get_clk_frequency_khz(int info); 144508f775SRobert Jarzmik extern void __init pxa_dt_irq_init(int (*fn)(struct irq_data *, 154508f775SRobert Jarzmik unsigned int)); 164508f775SRobert Jarzmik extern void __init pxa_map_io(void); 174508f775SRobert Jarzmik extern void pxa_timer_init(void); 181da177e4SLinus Torvalds 191da177e4SLinus Torvalds #define SET_BANK(__nr,__start,__size) \ 201da177e4SLinus Torvalds mi->bank[__nr].start = (__start), \ 21be370302SRussell King mi->bank[__nr].size = (__size) 221da177e4SLinus Torvalds 233d3934c3Seric miao #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) 243d3934c3Seric miao 254508f775SRobert Jarzmik #define pxa25x_handle_irq icip_handle_irq 265e1d0128SRobert Jarzmik extern int __init pxa25x_clocks_init(void); 274508f775SRobert Jarzmik extern void __init pxa25x_init_irq(void); 284508f775SRobert Jarzmik extern void __init pxa25x_map_io(void); 294508f775SRobert Jarzmik extern void __init pxa26x_init_irq(void); 3015a40333SRussell King 314508f775SRobert Jarzmik #define pxa27x_handle_irq ichp_handle_irq 325e1d0128SRobert Jarzmik extern int __init pxa27x_clocks_init(void); 3315a40333SRussell King extern unsigned pxa27x_get_clk_frequency_khz(int); 344508f775SRobert Jarzmik extern void __init pxa27x_init_irq(void); 354508f775SRobert Jarzmik extern void __init pxa27x_map_io(void); 3615a40333SRussell King 374508f775SRobert Jarzmik #define pxa3xx_handle_irq ichp_handle_irq 38a1c0a6adSRobert Jarzmik extern int __init pxa3xx_clocks_init(void); 394508f775SRobert Jarzmik extern void __init pxa3xx_init_irq(void); 404508f775SRobert Jarzmik extern void __init pxa3xx_map_io(void); 41c0165504Seric miao 422eaa03b5SRafael J. Wysocki extern struct syscore_ops pxa_irq_syscore_ops; 432eaa03b5SRafael J. Wysocki extern struct syscore_ops pxa2xx_mfp_syscore_ops; 442eaa03b5SRafael J. Wysocki extern struct syscore_ops pxa3xx_mfp_syscore_ops; 45cc155c6fSRussell King 46cc155c6fSRussell King void __init pxa_set_ffuart_info(void *info); 47cc155c6fSRussell King void __init pxa_set_btuart_info(void *info); 48cc155c6fSRussell King void __init pxa_set_stuart_info(void *info); 49cc155c6fSRussell King void __init pxa_set_hwuart_info(void *info); 50271a74fcSRussell King 517b6d864bSRobin Holt void pxa_restart(enum reboot_mode, const char *); 524508f775SRobert Jarzmik 534508f775SRobert Jarzmik #if defined(CONFIG_PXA25x) || defined(CONFIG_PXA27x) 544508f775SRobert Jarzmik extern void pxa2xx_clear_reset_status(unsigned int); 554508f775SRobert Jarzmik #else 564508f775SRobert Jarzmik static inline void pxa2xx_clear_reset_status(unsigned int mask) {} 574508f775SRobert Jarzmik #endif 584508f775SRobert Jarzmik 594508f775SRobert Jarzmik /* 604508f775SRobert Jarzmik * Once fully converted to the clock framework, all these functions should be 614508f775SRobert Jarzmik * removed, and replaced with a clk_get(NULL, "core"). 624508f775SRobert Jarzmik */ 634508f775SRobert Jarzmik #ifdef CONFIG_PXA25x 644508f775SRobert Jarzmik extern unsigned pxa25x_get_clk_frequency_khz(int); 654508f775SRobert Jarzmik #else 664508f775SRobert Jarzmik #define pxa25x_get_clk_frequency_khz(x) (0) 674508f775SRobert Jarzmik #endif 684508f775SRobert Jarzmik 694508f775SRobert Jarzmik #ifdef CONFIG_PXA27x 704508f775SRobert Jarzmik #else 714508f775SRobert Jarzmik #define pxa27x_get_clk_frequency_khz(x) (0) 724508f775SRobert Jarzmik #endif 734508f775SRobert Jarzmik 744508f775SRobert Jarzmik #ifdef CONFIG_PXA3xx 754508f775SRobert Jarzmik extern unsigned pxa3xx_get_clk_frequency_khz(int); 764508f775SRobert Jarzmik #else 774508f775SRobert Jarzmik #define pxa3xx_get_clk_frequency_khz(x) (0) 784508f775SRobert Jarzmik #endif 79