162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * 362306a36Sopenharmony_ci * Header for code common to all OMAP1 machines. 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * This program is free software; you can redistribute it and/or modify it 662306a36Sopenharmony_ci * under the terms of the GNU General Public License as published by the 762306a36Sopenharmony_ci * Free Software Foundation; either version 2 of the License, or (at your 862306a36Sopenharmony_ci * option) any later version. 962306a36Sopenharmony_ci * 1062306a36Sopenharmony_ci * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED 1162306a36Sopenharmony_ci * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 1262306a36Sopenharmony_ci * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 1362306a36Sopenharmony_ci * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 1462306a36Sopenharmony_ci * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 1562306a36Sopenharmony_ci * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 1662306a36Sopenharmony_ci * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 1762306a36Sopenharmony_ci * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1862306a36Sopenharmony_ci * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 1962306a36Sopenharmony_ci * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2062306a36Sopenharmony_ci * 2162306a36Sopenharmony_ci * You should have received a copy of the GNU General Public License along 2262306a36Sopenharmony_ci * with this program; if not, write to the Free Software Foundation, Inc., 2362306a36Sopenharmony_ci * 675 Mass Ave, Cambridge, MA 02139, USA. 2462306a36Sopenharmony_ci */ 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ci#ifndef __ARCH_ARM_MACH_OMAP1_COMMON_H 2762306a36Sopenharmony_ci#define __ARCH_ARM_MACH_OMAP1_COMMON_H 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ci#include <linux/platform_data/i2c-omap.h> 3062306a36Sopenharmony_ci#include <linux/reboot.h> 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ci#include <asm/exception.h> 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ci#include "irqs.h" 3562306a36Sopenharmony_ci#include "soc.h" 3662306a36Sopenharmony_ci#include "i2c.h" 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ci#ifdef CONFIG_OMAP_SERIAL_WAKE 3962306a36Sopenharmony_ciint omap_serial_wakeup_init(void); 4062306a36Sopenharmony_ci#else 4162306a36Sopenharmony_cistatic inline int omap_serial_wakeup_init(void) 4262306a36Sopenharmony_ci{ 4362306a36Sopenharmony_ci return 0; 4462306a36Sopenharmony_ci} 4562306a36Sopenharmony_ci#endif 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_civoid omap1_map_io(void); 4862306a36Sopenharmony_civoid omap1_init_early(void); 4962306a36Sopenharmony_civoid omap1_init_irq(void); 5062306a36Sopenharmony_civoid __exception_irq_entry omap1_handle_irq(struct pt_regs *regs); 5162306a36Sopenharmony_civoid omap1_init_late(void); 5262306a36Sopenharmony_civoid omap1_restart(enum reboot_mode, const char *); 5362306a36Sopenharmony_ci 5462306a36Sopenharmony_ciextern void __init omap_check_revision(void); 5562306a36Sopenharmony_ci 5662306a36Sopenharmony_cistruct nand_chip; 5762306a36Sopenharmony_ciextern void omap1_nand_cmd_ctl(struct nand_chip *this, int cmd, 5862306a36Sopenharmony_ci unsigned int ctrl); 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ciextern void omap1_timer_init(void); 6162306a36Sopenharmony_ci#ifdef CONFIG_OMAP_32K_TIMER 6262306a36Sopenharmony_ciextern int omap_32k_timer_init(void); 6362306a36Sopenharmony_ci#else 6462306a36Sopenharmony_cistatic inline int __init omap_32k_timer_init(void) 6562306a36Sopenharmony_ci{ 6662306a36Sopenharmony_ci return -ENODEV; 6762306a36Sopenharmony_ci} 6862306a36Sopenharmony_ci#endif 6962306a36Sopenharmony_ci 7062306a36Sopenharmony_ci#ifdef CONFIG_ARCH_OMAP16XX 7162306a36Sopenharmony_ciextern int ocpi_enable(void); 7262306a36Sopenharmony_ci#else 7362306a36Sopenharmony_cistatic inline int ocpi_enable(void) { return 0; } 7462306a36Sopenharmony_ci#endif 7562306a36Sopenharmony_ci 7662306a36Sopenharmony_ciextern u32 omap1_get_reset_sources(void); 7762306a36Sopenharmony_ci 7862306a36Sopenharmony_ci#endif /* __ARCH_ARM_MACH_OMAP1_COMMON_H */ 79