18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * 38c2ecf20Sopenharmony_ci * Header for code common to all OMAP1 machines. 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or modify it 68c2ecf20Sopenharmony_ci * under the terms of the GNU General Public License as published by the 78c2ecf20Sopenharmony_ci * Free Software Foundation; either version 2 of the License, or (at your 88c2ecf20Sopenharmony_ci * option) any later version. 98c2ecf20Sopenharmony_ci * 108c2ecf20Sopenharmony_ci * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED 118c2ecf20Sopenharmony_ci * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 128c2ecf20Sopenharmony_ci * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 138c2ecf20Sopenharmony_ci * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 148c2ecf20Sopenharmony_ci * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 158c2ecf20Sopenharmony_ci * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 168c2ecf20Sopenharmony_ci * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 178c2ecf20Sopenharmony_ci * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 188c2ecf20Sopenharmony_ci * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 198c2ecf20Sopenharmony_ci * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 208c2ecf20Sopenharmony_ci * 218c2ecf20Sopenharmony_ci * You should have received a copy of the GNU General Public License along 228c2ecf20Sopenharmony_ci * with this program; if not, write to the Free Software Foundation, Inc., 238c2ecf20Sopenharmony_ci * 675 Mass Ave, Cambridge, MA 02139, USA. 248c2ecf20Sopenharmony_ci */ 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci#ifndef __ARCH_ARM_MACH_OMAP1_COMMON_H 278c2ecf20Sopenharmony_ci#define __ARCH_ARM_MACH_OMAP1_COMMON_H 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci#include <linux/platform_data/i2c-omap.h> 308c2ecf20Sopenharmony_ci#include <linux/reboot.h> 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci#include <asm/exception.h> 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci#include <mach/irqs.h> 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci#include "soc.h" 378c2ecf20Sopenharmony_ci#include "i2c.h" 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) 408c2ecf20Sopenharmony_civoid omap7xx_map_io(void); 418c2ecf20Sopenharmony_ci#else 428c2ecf20Sopenharmony_cistatic inline void omap7xx_map_io(void) 438c2ecf20Sopenharmony_ci{ 448c2ecf20Sopenharmony_ci} 458c2ecf20Sopenharmony_ci#endif 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci#ifdef CONFIG_ARCH_OMAP15XX 488c2ecf20Sopenharmony_civoid omap1510_fpga_init_irq(void); 498c2ecf20Sopenharmony_civoid omap15xx_map_io(void); 508c2ecf20Sopenharmony_ci#else 518c2ecf20Sopenharmony_cistatic inline void omap1510_fpga_init_irq(void) 528c2ecf20Sopenharmony_ci{ 538c2ecf20Sopenharmony_ci} 548c2ecf20Sopenharmony_cistatic inline void omap15xx_map_io(void) 558c2ecf20Sopenharmony_ci{ 568c2ecf20Sopenharmony_ci} 578c2ecf20Sopenharmony_ci#endif 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ci#ifdef CONFIG_ARCH_OMAP16XX 608c2ecf20Sopenharmony_civoid omap16xx_map_io(void); 618c2ecf20Sopenharmony_ci#else 628c2ecf20Sopenharmony_cistatic inline void omap16xx_map_io(void) 638c2ecf20Sopenharmony_ci{ 648c2ecf20Sopenharmony_ci} 658c2ecf20Sopenharmony_ci#endif 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci#ifdef CONFIG_OMAP_SERIAL_WAKE 688c2ecf20Sopenharmony_ciint omap_serial_wakeup_init(void); 698c2ecf20Sopenharmony_ci#else 708c2ecf20Sopenharmony_cistatic inline int omap_serial_wakeup_init(void) 718c2ecf20Sopenharmony_ci{ 728c2ecf20Sopenharmony_ci return 0; 738c2ecf20Sopenharmony_ci} 748c2ecf20Sopenharmony_ci#endif 758c2ecf20Sopenharmony_ci 768c2ecf20Sopenharmony_civoid omap1_init_early(void); 778c2ecf20Sopenharmony_civoid omap1_init_irq(void); 788c2ecf20Sopenharmony_civoid __exception_irq_entry omap1_handle_irq(struct pt_regs *regs); 798c2ecf20Sopenharmony_civoid omap1_init_late(void); 808c2ecf20Sopenharmony_civoid omap1_restart(enum reboot_mode, const char *); 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ciextern void __init omap_check_revision(void); 838c2ecf20Sopenharmony_ci 848c2ecf20Sopenharmony_cistruct nand_chip; 858c2ecf20Sopenharmony_ciextern void omap1_nand_cmd_ctl(struct nand_chip *this, int cmd, 868c2ecf20Sopenharmony_ci unsigned int ctrl); 878c2ecf20Sopenharmony_ci 888c2ecf20Sopenharmony_ciextern void omap1_timer_init(void); 898c2ecf20Sopenharmony_ci#ifdef CONFIG_OMAP_32K_TIMER 908c2ecf20Sopenharmony_ciextern int omap_32k_timer_init(void); 918c2ecf20Sopenharmony_ci#else 928c2ecf20Sopenharmony_cistatic inline int __init omap_32k_timer_init(void) 938c2ecf20Sopenharmony_ci{ 948c2ecf20Sopenharmony_ci return -ENODEV; 958c2ecf20Sopenharmony_ci} 968c2ecf20Sopenharmony_ci#endif 978c2ecf20Sopenharmony_ci 988c2ecf20Sopenharmony_ci#ifdef CONFIG_ARCH_OMAP16XX 998c2ecf20Sopenharmony_ciextern int ocpi_enable(void); 1008c2ecf20Sopenharmony_ci#else 1018c2ecf20Sopenharmony_cistatic inline int ocpi_enable(void) { return 0; } 1028c2ecf20Sopenharmony_ci#endif 1038c2ecf20Sopenharmony_ci 1048c2ecf20Sopenharmony_ciextern u32 omap1_get_reset_sources(void); 1058c2ecf20Sopenharmony_ci 1068c2ecf20Sopenharmony_ci#endif /* __ARCH_ARM_MACH_OMAP1_COMMON_H */ 107