xref: /linux/arch/arm/mach-omap1/common.h (revision 9a87ffc99ec8eb8d35eed7c4f816d75f5cc9662e)
14e65331cSTony Lindgren /*
24e65331cSTony Lindgren  *
34e65331cSTony Lindgren  * Header for code common to all OMAP1 machines.
44e65331cSTony Lindgren  *
54e65331cSTony Lindgren  * This program is free software; you can redistribute it and/or modify it
64e65331cSTony Lindgren  * under the terms of the GNU General Public License as published by the
74e65331cSTony Lindgren  * Free Software Foundation; either version 2 of the License, or (at your
84e65331cSTony Lindgren  * option) any later version.
94e65331cSTony Lindgren  *
104e65331cSTony Lindgren  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
114e65331cSTony Lindgren  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
124e65331cSTony Lindgren  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
134e65331cSTony Lindgren  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
144e65331cSTony Lindgren  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
154e65331cSTony Lindgren  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
164e65331cSTony Lindgren  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
174e65331cSTony Lindgren  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
184e65331cSTony Lindgren  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
194e65331cSTony Lindgren  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
204e65331cSTony Lindgren  *
214e65331cSTony Lindgren  * You should have received a copy of the  GNU General Public License along
224e65331cSTony Lindgren  * with this program; if not, write  to the Free Software Foundation, Inc.,
234e65331cSTony Lindgren  * 675 Mass Ave, Cambridge, MA 02139, USA.
244e65331cSTony Lindgren  */
254e65331cSTony Lindgren 
264e65331cSTony Lindgren #ifndef __ARCH_ARM_MACH_OMAP1_COMMON_H
274e65331cSTony Lindgren #define __ARCH_ARM_MACH_OMAP1_COMMON_H
284e65331cSTony Lindgren 
2979fc540fSWolfram Sang #include <linux/platform_data/i2c-omap.h>
307b6d864bSRobin Holt #include <linux/reboot.h>
313a8761c0STony Lindgren 
32b694331cSTony Lindgren #include <asm/exception.h>
33b694331cSTony Lindgren 
347e0a9e62SArnd Bergmann #include "irqs.h"
35e99b32e2STony Lindgren #include "soc.h"
369138f89eSSuman Anna #include "i2c.h"
37e99b32e2STony Lindgren 
3882c3bd03SShawn Guo #ifdef CONFIG_OMAP_SERIAL_WAKE
3982c3bd03SShawn Guo int omap_serial_wakeup_init(void);
4082c3bd03SShawn Guo #else
omap_serial_wakeup_init(void)4182c3bd03SShawn Guo static inline int omap_serial_wakeup_init(void)
4282c3bd03SShawn Guo {
4382c3bd03SShawn Guo 	return 0;
4482c3bd03SShawn Guo }
4582c3bd03SShawn Guo #endif
4682c3bd03SShawn Guo 
47*9a99b142SArnd Bergmann void omap1_map_io(void);
484e65331cSTony Lindgren void omap1_init_early(void);
494e65331cSTony Lindgren void omap1_init_irq(void);
50b694331cSTony Lindgren void __exception_irq_entry omap1_handle_irq(struct pt_regs *regs);
5182c3bd03SShawn Guo void omap1_init_late(void);
527b6d864bSRobin Holt void omap1_restart(enum reboot_mode, const char *);
534e65331cSTony Lindgren 
54e2ed89fcSPaul Walmsley extern void __init omap_check_revision(void);
55e2ed89fcSPaul Walmsley 
5647bd59e5SBoris Brezillon struct nand_chip;
5747bd59e5SBoris Brezillon extern void omap1_nand_cmd_ctl(struct nand_chip *this, int cmd,
5831cde044SPaul Walmsley 			       unsigned int ctrl);
5931cde044SPaul Walmsley 
606bb27d73SStephen Warren extern void omap1_timer_init(void);
6118799911SVaibhav Hiremath #ifdef CONFIG_OMAP_32K_TIMER
6218799911SVaibhav Hiremath extern int omap_32k_timer_init(void);
6318799911SVaibhav Hiremath #else
omap_32k_timer_init(void)6418799911SVaibhav Hiremath static inline int __init omap_32k_timer_init(void)
6518799911SVaibhav Hiremath {
6618799911SVaibhav Hiremath 	return -ENODEV;
6718799911SVaibhav Hiremath }
6818799911SVaibhav Hiremath #endif
69e2ed89fcSPaul Walmsley 
70121e1a73SPaul Walmsley #ifdef CONFIG_ARCH_OMAP16XX
716f3c1af2SPaul Walmsley extern int ocpi_enable(void);
72121e1a73SPaul Walmsley #else
ocpi_enable(void)73121e1a73SPaul Walmsley static inline int ocpi_enable(void) { return 0; }
74121e1a73SPaul Walmsley #endif
756f3c1af2SPaul Walmsley 
76508c0d47SPaul Walmsley extern u32 omap1_get_reset_sources(void);
77b5c5353dSPaul Walmsley 
784e65331cSTony Lindgren #endif /* __ARCH_ARM_MACH_OMAP1_COMMON_H */
79