#include <linux/config.h>
#ifndef __ASSEMBLER__
#include <asm/types.h>
+#include <asm/arch/cpu.h>
#endif
#include <asm/arch/io.h>
#define ARM_RSTCT1 (CLKGEN_REG_BASE + 0x10)
#define ARM_RSTCT2 (CLKGEN_REG_BASE + 0x14)
#define ARM_SYSST (CLKGEN_REG_BASE + 0x18)
+#define ARM_IDLECT3 (CLKGEN_REG_BASE + 0x24)
#define CK_RATEF 1
#define CK_IDLEF 2
/* CNTL_TIMER register bits */
#define MPUTIM_FREE (1<<6)
#define MPUTIM_CLOCK_ENABLE (1<<5)
-#define MPUTIM_PTV_MASK (0x7<<PTV_BIT)
+#define MPUTIM_PTV_MASK (0x7<<MPUTIM_PTV_BIT)
#define MPUTIM_PTV_BIT 2
#define MPUTIM_AR (1<<1)
#define MPUTIM_ST (1<<0)
-/* Watchdog */
-#define OMAP_WATCHDOG_BASE (0xfffec800)
-#define OMAP_WDT_TIMER (OMAP_WATCHDOG_BASE + 0x0)
-#define OMAP_WDT_LOAD_TIM (OMAP_WATCHDOG_BASE + 0x4)
-#define OMAP_WDT_READ_TIM (OMAP_WATCHDOG_BASE + 0x4)
-#define OMAP_WDT_TIMER_MODE (OMAP_WATCHDOG_BASE + 0x8)
+/* Watchdog timer within the OMAP3.2 gigacell */
+#define OMAP_MPU_WATCHDOG_BASE (0xfffec800)
+#define OMAP_WDT_TIMER (OMAP_MPU_WATCHDOG_BASE + 0x0)
+#define OMAP_WDT_LOAD_TIM (OMAP_MPU_WATCHDOG_BASE + 0x4)
+#define OMAP_WDT_READ_TIM (OMAP_MPU_WATCHDOG_BASE + 0x4)
+#define OMAP_WDT_TIMER_MODE (OMAP_MPU_WATCHDOG_BASE + 0x8)
/*
* ---------------------------------------------------------------------------
#define IRQ_CONTROL_REG_OFFSET 0x18
#define IRQ_ISR_REG_OFFSET 0x9c
#define IRQ_ILR0_REG_OFFSET 0x1c
+#define IRQ_GMR_REG_OFFSET 0xa0
/*
* ---------------------------------------------------------------------------
#define TC_ENDIANISM (TCMIF_BASE + 0x34)
#define EMIFF_SDRAM_CONFIG_2 (TCMIF_BASE + 0x3c)
#define EMIF_CFG_DYNAMIC_WS (TCMIF_BASE + 0x40)
+
/*
* ----------------------------------------------------------------------------
* System control registers
#define PULL_DWN_CTRL_1 0xfffe1044
#define PULL_DWN_CTRL_2 0xfffe1048
#define PULL_DWN_CTRL_3 0xfffe104c
+#define PULL_DWN_CTRL_4 0xfffe10ac
/* OMAP-1610 specific multiplexing registers */
#define FUNC_MUX_CTRL_E 0xfffe1090
#define PU_PD_SEL_3 0xfffe10c0
#define PU_PD_SEL_4 0xfffe10c4
+/* Timer32K for 1610 and 1710*/
+#define OMAP_TIMER32K_BASE 0xFFFBC400
+
/*
* ---------------------------------------------------------------------------
* TIPB bus interface
/*
* ---------------------------------------------------------------------------
- * Processor differentiation
+ * Serial ports
* ---------------------------------------------------------------------------
*/
-#define OMAP_ID_BASE (0xfffed400)
-#define OMAP_ID_REG __REG32(OMAP_ID_BASE + 0x04)
-
-#define ID_SHIFT 12
-#define ID_MASK 0x7fff
-
-/* See also uncompress.h */
-#define OMAP_ID_730 0x355F
-#define OMAP_ID_1510 0x3470
-#define OMAP_ID_1610 0x3576
-#define OMAP_ID_1710 0x35F7
-#define OMAP_ID_5912 0x358C
+#define OMAP_UART1_BASE (unsigned char *)0xfffb0000
+#define OMAP_UART2_BASE (unsigned char *)0xfffb0800
+#define OMAP_UART3_BASE (unsigned char *)0xfffb9800
+#define OMAP_MAX_NR_PORTS 3
+#define OMAP1510_BASE_BAUD (12000000/16)
+#define OMAP16XX_BASE_BAUD (48000000/16)
+
+#define is_omap_port(p) ({int __ret = 0; \
+ if (p == (char*)IO_ADDRESS(OMAP_UART1_BASE) || \
+ p == (char*)IO_ADDRESS(OMAP_UART2_BASE) || \
+ p == (char*)IO_ADDRESS(OMAP_UART3_BASE)) \
+ __ret = 1; \
+ __ret; \
+ })
+/*
+ * ---------------------------------------------------------------------------
+ * Processor specific defines
+ * ---------------------------------------------------------------------------
+ */
#ifdef CONFIG_ARCH_OMAP730
#include "omap730.h"
-#define cpu_is_omap730() (((OMAP_ID_REG >> ID_SHIFT) & ID_MASK) == OMAP_ID_730)
-#else
-#define cpu_is_omap730() 0
#endif
#ifdef CONFIG_ARCH_OMAP1510
#include "omap1510.h"
-#define cpu_is_omap1510() (((OMAP_ID_REG >> ID_SHIFT) & ID_MASK) == OMAP_ID_1510)
-#else
-#define cpu_is_omap1510() 0
-#endif
-
-#ifdef CONFIG_ARCH_OMAP1610
-#include "omap1610.h"
-#define cpu_is_omap1710() (((OMAP_ID_REG >> ID_SHIFT) & ID_MASK) == OMAP_ID_1710)
-/* Detect 1710 as 1610 for now */
-#define cpu_is_omap1610() (((OMAP_ID_REG >> ID_SHIFT) & ID_MASK) == OMAP_ID_1610 \
- || cpu_is_omap1710())
-#else
-#define cpu_is_omap1610() 0
-#define cpu_is_omap1710() 0
#endif
-#ifdef CONFIG_ARCH_OMAP5912
-#include "omap5912.h"
-#define cpu_is_omap5912() (((OMAP_ID_REG >> ID_SHIFT) & ID_MASK) == OMAP_ID_5912)
-#else
-#define cpu_is_omap5912() 0
+#ifdef CONFIG_ARCH_OMAP16XX
+#include "omap16xx.h"
#endif
/*
* ---------------------------------------------------------------------------
- * Board differentiation
+ * Board specific defines
* ---------------------------------------------------------------------------
*/
#ifdef CONFIG_MACH_OMAP_H3
#include "board-h3.h"
-#error "Support for H3 board not yet implemented."
#endif
#ifdef CONFIG_MACH_OMAP_H4