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); 174508f775SRobert Jarzmik extern void __init pxa_dt_irq_init(int (*fn)(struct irq_data *, 184508f775SRobert Jarzmik unsigned int)); 194508f775SRobert Jarzmik extern void __init pxa_map_io(void); 204508f775SRobert 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 284508f775SRobert Jarzmik #define pxa25x_handle_irq icip_handle_irq 29*5e1d0128SRobert Jarzmik extern int __init pxa25x_clocks_init(void); 304508f775SRobert Jarzmik extern void __init pxa25x_init_irq(void); 314508f775SRobert Jarzmik extern void __init pxa25x_map_io(void); 324508f775SRobert Jarzmik extern void __init pxa26x_init_irq(void); 3315a40333SRussell King 344508f775SRobert Jarzmik #define pxa27x_handle_irq ichp_handle_irq 35*5e1d0128SRobert Jarzmik extern int __init pxa27x_clocks_init(void); 364508f775SRobert Jarzmik extern void __init pxa27x_dt_init_irq(void); 3715a40333SRussell King extern unsigned pxa27x_get_clk_frequency_khz(int); 384508f775SRobert Jarzmik extern void __init pxa27x_init_irq(void); 394508f775SRobert Jarzmik extern void __init pxa27x_map_io(void); 4015a40333SRussell King 414508f775SRobert Jarzmik #define pxa3xx_handle_irq ichp_handle_irq 424508f775SRobert Jarzmik extern void __init pxa3xx_dt_init_irq(void); 434508f775SRobert Jarzmik extern void __init pxa3xx_init_irq(void); 444508f775SRobert Jarzmik extern void __init pxa3xx_map_io(void); 45c0165504Seric miao 462eaa03b5SRafael J. Wysocki extern struct syscore_ops pxa_irq_syscore_ops; 472eaa03b5SRafael J. Wysocki extern struct syscore_ops pxa2xx_mfp_syscore_ops; 482eaa03b5SRafael J. Wysocki extern struct syscore_ops pxa3xx_mfp_syscore_ops; 49cc155c6fSRussell King 50cc155c6fSRussell King void __init pxa_set_ffuart_info(void *info); 51cc155c6fSRussell King void __init pxa_set_btuart_info(void *info); 52cc155c6fSRussell King void __init pxa_set_stuart_info(void *info); 53cc155c6fSRussell King void __init pxa_set_hwuart_info(void *info); 54271a74fcSRussell King 557b6d864bSRobin Holt void pxa_restart(enum reboot_mode, const char *); 564508f775SRobert Jarzmik 574508f775SRobert Jarzmik #if defined(CONFIG_PXA25x) || defined(CONFIG_PXA27x) 584508f775SRobert Jarzmik extern void pxa2xx_clear_reset_status(unsigned int); 594508f775SRobert Jarzmik #else 604508f775SRobert Jarzmik static inline void pxa2xx_clear_reset_status(unsigned int mask) {} 614508f775SRobert Jarzmik #endif 624508f775SRobert Jarzmik 634508f775SRobert Jarzmik /* 644508f775SRobert Jarzmik * Once fully converted to the clock framework, all these functions should be 654508f775SRobert Jarzmik * removed, and replaced with a clk_get(NULL, "core"). 664508f775SRobert Jarzmik */ 674508f775SRobert Jarzmik #ifdef CONFIG_PXA25x 684508f775SRobert Jarzmik extern unsigned pxa25x_get_clk_frequency_khz(int); 694508f775SRobert Jarzmik #else 704508f775SRobert Jarzmik #define pxa25x_get_clk_frequency_khz(x) (0) 714508f775SRobert Jarzmik #endif 724508f775SRobert Jarzmik 734508f775SRobert Jarzmik #ifdef CONFIG_PXA27x 744508f775SRobert Jarzmik #else 754508f775SRobert Jarzmik #define pxa27x_get_clk_frequency_khz(x) (0) 764508f775SRobert Jarzmik #endif 774508f775SRobert Jarzmik 784508f775SRobert Jarzmik #ifdef CONFIG_PXA3xx 794508f775SRobert Jarzmik extern unsigned pxa3xx_get_clk_frequency_khz(int); 804508f775SRobert Jarzmik #else 814508f775SRobert Jarzmik #define pxa3xx_get_clk_frequency_khz(x) (0) 824508f775SRobert Jarzmik #endif 83