xref: /linux/arch/arm/mach-omap1/common.h (revision b5c5353d417580f7a6ac21a0954f1c500a5cc4f5)
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 
294e65331cSTony Lindgren #include <plat/common.h>
3031cde044SPaul Walmsley #include <linux/mtd/mtd.h>
314e65331cSTony Lindgren 
324e65331cSTony Lindgren #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
334e65331cSTony Lindgren void omap7xx_map_io(void);
344e65331cSTony Lindgren #else
354e65331cSTony Lindgren static inline void omap7xx_map_io(void)
364e65331cSTony Lindgren {
374e65331cSTony Lindgren }
384e65331cSTony Lindgren #endif
394e65331cSTony Lindgren 
404e65331cSTony Lindgren #ifdef CONFIG_ARCH_OMAP15XX
414e65331cSTony Lindgren void omap15xx_map_io(void);
424e65331cSTony Lindgren #else
434e65331cSTony Lindgren static inline void omap15xx_map_io(void)
444e65331cSTony Lindgren {
454e65331cSTony Lindgren }
464e65331cSTony Lindgren #endif
474e65331cSTony Lindgren 
484e65331cSTony Lindgren #ifdef CONFIG_ARCH_OMAP16XX
494e65331cSTony Lindgren void omap16xx_map_io(void);
504e65331cSTony Lindgren #else
514e65331cSTony Lindgren static inline void omap16xx_map_io(void)
524e65331cSTony Lindgren {
534e65331cSTony Lindgren }
544e65331cSTony Lindgren #endif
554e65331cSTony Lindgren 
5682c3bd03SShawn Guo #ifdef CONFIG_OMAP_SERIAL_WAKE
5782c3bd03SShawn Guo int omap_serial_wakeup_init(void);
5882c3bd03SShawn Guo #else
5982c3bd03SShawn Guo static inline int omap_serial_wakeup_init(void)
6082c3bd03SShawn Guo {
6182c3bd03SShawn Guo 	return 0;
6282c3bd03SShawn Guo }
6382c3bd03SShawn Guo #endif
6482c3bd03SShawn Guo 
654e65331cSTony Lindgren void omap1_init_early(void);
664e65331cSTony Lindgren void omap1_init_irq(void);
6782c3bd03SShawn Guo void omap1_init_late(void);
68baa95883SRussell King void omap1_restart(char, const char *);
694e65331cSTony Lindgren 
70e2ed89fcSPaul Walmsley extern void __init omap_check_revision(void);
71e2ed89fcSPaul Walmsley 
7231cde044SPaul Walmsley extern void omap1_nand_cmd_ctl(struct mtd_info *mtd, int cmd,
7331cde044SPaul Walmsley 			       unsigned int ctrl);
7431cde044SPaul Walmsley 
754e65331cSTony Lindgren extern struct sys_timer omap1_timer;
7618799911SVaibhav Hiremath #ifdef CONFIG_OMAP_32K_TIMER
7718799911SVaibhav Hiremath extern int omap_32k_timer_init(void);
7818799911SVaibhav Hiremath #else
7918799911SVaibhav Hiremath static inline int __init omap_32k_timer_init(void)
8018799911SVaibhav Hiremath {
8118799911SVaibhav Hiremath 	return -ENODEV;
8218799911SVaibhav Hiremath }
8318799911SVaibhav Hiremath #endif
84e2ed89fcSPaul Walmsley 
85e2ed89fcSPaul Walmsley extern u32 omap_irq_flags;
864e65331cSTony Lindgren 
87121e1a73SPaul Walmsley #ifdef CONFIG_ARCH_OMAP16XX
886f3c1af2SPaul Walmsley extern int ocpi_enable(void);
89121e1a73SPaul Walmsley #else
90121e1a73SPaul Walmsley static inline int ocpi_enable(void) { return 0; }
91121e1a73SPaul Walmsley #endif
926f3c1af2SPaul Walmsley 
93*b5c5353dSPaul Walmsley extern int omap1_get_reset_sources(void);
94*b5c5353dSPaul Walmsley 
954e65331cSTony Lindgren #endif /* __ARCH_ARM_MACH_OMAP1_COMMON_H */
96