xref: /linux/arch/arm/mach-pxa/generic.h (revision 2eaa03b5bebd1e80014f780d7bf27c3e66daefd6)
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 
12a3f4c927SLennert Buytenhek struct irq_data;
131da177e4SLinus Torvalds struct sys_timer;
141da177e4SLinus Torvalds 
151da177e4SLinus Torvalds extern struct sys_timer pxa_timer;
16a58fbcd8SEric Miao extern void __init pxa_init_irq(int irq_nr,
17a3f4c927SLennert Buytenhek 				int (*set_wake)(struct irq_data *,
18a3f4c927SLennert Buytenhek 						unsigned int));
19cd49104dSEric Miao extern void __init pxa25x_init_irq(void);
20918c71c0SMarek Vasut #ifdef CONFIG_CPU_PXA26x
21918c71c0SMarek Vasut extern void __init pxa26x_init_irq(void);
22918c71c0SMarek Vasut #endif
23cd49104dSEric Miao extern void __init pxa27x_init_irq(void);
242c8086a5Seric miao extern void __init pxa3xx_init_irq(void);
25a4553358SHaojian Zhuang extern void __init pxa95x_init_irq(void);
26851982c1SMarek Vasut 
271da177e4SLinus Torvalds extern void __init pxa_map_io(void);
28851982c1SMarek Vasut extern void __init pxa25x_map_io(void);
29851982c1SMarek Vasut extern void __init pxa27x_map_io(void);
30851982c1SMarek Vasut extern void __init pxa3xx_map_io(void);
311da177e4SLinus Torvalds 
321da177e4SLinus Torvalds extern unsigned int get_clk_frequency_khz(int info);
331da177e4SLinus Torvalds 
341da177e4SLinus Torvalds #define SET_BANK(__nr,__start,__size) \
351da177e4SLinus Torvalds 	mi->bank[__nr].start = (__start), \
36be370302SRussell King 	mi->bank[__nr].size = (__size)
371da177e4SLinus Torvalds 
383d3934c3Seric miao #define ARRAY_AND_SIZE(x)	(x), ARRAY_SIZE(x)
393d3934c3Seric miao 
4015a40333SRussell King #ifdef CONFIG_PXA25x
4115a40333SRussell King extern unsigned pxa25x_get_clk_frequency_khz(int);
4215a40333SRussell King #else
4315a40333SRussell King #define pxa25x_get_clk_frequency_khz(x)		(0)
4415a40333SRussell King #endif
4515a40333SRussell King 
4615a40333SRussell King #ifdef CONFIG_PXA27x
4715a40333SRussell King extern unsigned pxa27x_get_clk_frequency_khz(int);
4815a40333SRussell King #else
4915a40333SRussell King #define pxa27x_get_clk_frequency_khz(x)		(0)
5015a40333SRussell King #endif
5115a40333SRussell King 
5204fef228SEric Miao #if defined(CONFIG_PXA25x) || defined(CONFIG_PXA27x)
5304fef228SEric Miao extern void pxa2xx_clear_reset_status(unsigned int);
5404fef228SEric Miao #else
5504fef228SEric Miao static inline void pxa2xx_clear_reset_status(unsigned int mask) {}
5604fef228SEric Miao #endif
5704fef228SEric Miao 
582c8086a5Seric miao #ifdef CONFIG_PXA3xx
592c8086a5Seric miao extern unsigned pxa3xx_get_clk_frequency_khz(int);
602c8086a5Seric miao #else
612c8086a5Seric miao #define pxa3xx_get_clk_frequency_khz(x)		(0)
622c8086a5Seric miao #endif
63c0165504Seric miao 
64*2eaa03b5SRafael J. Wysocki extern struct syscore_ops pxa_irq_syscore_ops;
65*2eaa03b5SRafael J. Wysocki extern struct syscore_ops pxa_gpio_syscore_ops;
66*2eaa03b5SRafael J. Wysocki extern struct syscore_ops pxa2xx_mfp_syscore_ops;
67*2eaa03b5SRafael J. Wysocki extern struct syscore_ops pxa3xx_mfp_syscore_ops;
68cc155c6fSRussell King 
69cc155c6fSRussell King void __init pxa_set_ffuart_info(void *info);
70cc155c6fSRussell King void __init pxa_set_btuart_info(void *info);
71cc155c6fSRussell King void __init pxa_set_stuart_info(void *info);
72cc155c6fSRussell King void __init pxa_set_hwuart_info(void *info);
73