Commit 07b265bb authored by Syed Mohammed, Khasim's avatar Syed Mohammed, Khasim Committed by Tony Lindgren

ARM: OMAP: Add omap3430 support

ARM: OMAP: Add omap3430 support
Signed-off-by: default avatarSyed Mohammed Khasim <x0khasim@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent f8e5e1a4
......@@ -5,6 +5,10 @@ config ARCH_OMAP24XX
bool "OMAP24xx Based System"
depends on ARCH_OMAP2
config ARCH_OMAP34XX
bool "OMAP34xx Based System"
depends on ARCH_OMAP3
config ARCH_OMAP2420
bool "OMAP2420 support"
depends on ARCH_OMAP24XX
......@@ -15,8 +19,12 @@ config ARCH_OMAP2430
bool "OMAP2430 support"
depends on ARCH_OMAP24XX
config ARCH_OMAP3430
bool "OMAP3430 support"
depends on ARCH_OMAP3 && ARCH_OMAP34XX
comment "OMAP Board Type"
depends on ARCH_OMAP2
depends on ARCH_OMAP2 || ARCH_OMAP3
config MACH_OMAP_GENERIC
bool "Generic OMAP board"
......@@ -37,6 +45,10 @@ config MACH_OMAP_H4
select OMAP_DEBUG_DEVICES
select GPIOEXPANDER_OMAP
config MACH_OMAP_3430SDP
bool "OMAP 3430 SDP board"
depends on ARCH_OMAP3 && ARCH_OMAP34XX
config MACH_OMAP_H4_TUSB
bool "TUSB 6010 EVM board"
depends on MACH_OMAP_H4
......
......@@ -23,6 +23,7 @@ obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o
obj-$(CONFIG_MACH_OMAP_2430SDP) += board-2430sdp.o \
board-2430sdp-flash.o \
board-2430sdp-usb.o
obj-$(CONFIG_MACH_OMAP_3430SDP) += board-3430sdp.o
obj-$(CONFIG_MACH_OMAP_APOLLON) += board-apollon.o \
board-apollon-keys.o
obj-$(CONFIG_MACH_NOKIA_N800) += board-n800.o board-n800-flash.o \
......
......@@ -22,12 +22,10 @@
#undef DEBUG
#ifdef CONFIG_ARCH_OMAP2420
#if defined(CONFIG_ARCH_OMAP2420)
#define GPMC_BASE 0x6800a000
#endif
#ifdef CONFIG_ARCH_OMAP2430
#define GPMC_BASE 0x6E000000
#elif defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3430)
#define GPMC_BASE 0x6e000000
#endif
#define GPMC_REVISION 0x00
......
......@@ -18,11 +18,11 @@
#include <asm/io.h>
#if defined(CONFIG_ARCH_OMAP2420)
#define OMAP24XX_TAP_BASE io_p2v(0x48014000)
#endif
#if defined(CONFIG_ARCH_OMAP2430)
#define OMAP24XX_TAP_BASE io_p2v(0x4900A000)
#define TAP_BASE io_p2v(0x48014000)
#elif defined(CONFIG_ARCH_OMAP2430)
#define TAP_BASE io_p2v(0x4900A000)
#elif defined(CONFIG_ARCH_OMAP34XX)
#define TAP_BASE io_p2v(0x54004000)
#endif
#define OMAP_TAP_IDCODE 0x0204
......@@ -58,7 +58,7 @@ static struct omap_id omap_ids[] __initdata = {
static u32 __init read_tap_reg(int reg)
{
return __raw_readl(OMAP24XX_TAP_BASE + reg);
return __raw_readl(TAP_BASE + reg);
}
void __init omap2_check_revision(void)
......@@ -118,9 +118,16 @@ void __init omap2_check_revision(void)
system_rev |= rev << 8;
/* Add the cpu class info (24xx) */
system_rev |= 0x24;
/* REVISIT:
* OMAP 3430 ES 1.0 does't populate IDCODE registers
* Following lines have to be revisited for next version
*/
#ifndef CONFIG_ARCH_OMAP3
system_rev |= 0x24;
#else
system_rev |= 0x34;
#endif
pr_info("OMAP%04x", system_rev >> 16);
if ((system_rev >> 8) & 0x0f)
printk("%x", (system_rev >> 8) & 0x0f);
......
......@@ -17,7 +17,6 @@
#include <asm/mach/irq.h>
#include <asm/irq.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
#define INTC_REVISION 0x0000
#define INTC_SYSCONFIG 0x0010
......@@ -117,10 +116,12 @@ void __init omap_init_irq(void)
for (i = 0; i < ARRAY_SIZE(irq_banks); i++) {
struct omap_irq_bank *bank = irq_banks + i;
if (cpu_is_omap24xx())
if (cpu_is_omap24xx()) {
bank->base_reg = IO_ADDRESS(OMAP24XX_IC_BASE);
else if (cpu_is_omap34xx())
}
if (cpu_is_omap34xx()) {
bank->base_reg = IO_ADDRESS(OMAP34XX_IC_BASE);
}
omap_irq_bank_init_one(bank);
nr_irqs += bank->nr_irqs;
......
......@@ -15,6 +15,9 @@ config ARCH_OMAP1
config ARCH_OMAP2
bool "TI OMAP2"
config ARCH_OMAP3
bool "TI OMAP3"
endchoice
comment "OMAP Feature Selections"
......@@ -148,13 +151,13 @@ config OMAP_MPU_TIMER
config OMAP_32K_TIMER
bool "Use 32KHz timer"
depends on ARCH_OMAP16XX || ARCH_OMAP24XX
depends on ARCH_OMAP16XX || ARCH_OMAP24XX || ARCH_OMAP34XX
help
Select this option if you want to enable the OMAP 32KHz timer.
This timer saves power compared to the OMAP_MPU_TIMER, and has
support for no tick during idle. The 32KHz timer provides less
intra-tick resolution than OMAP_MPU_TIMER. The 32KHz timer is
currently only available for OMAP16XX and 24XX.
currently only available for OMAP16XX, 24XX and 34XX.
endchoice
......@@ -169,7 +172,7 @@ config OMAP_32K_TIMER_HZ
config OMAP_DM_TIMER
bool "Use dual-mode timer"
depends on ARCH_OMAP16XX || ARCH_OMAP24XX
depends on ARCH_OMAP16XX || ARCH_OMAP24XX || ARCH_OMAP34XX
help
Select this option if you want to use OMAP Dual-Mode timers.
......
......@@ -218,7 +218,7 @@ static int __init omap_init_clocksource_32k(void)
static char err[] __initdata = KERN_ERR
"%s: can't register clocksource!\n";
if (cpu_is_omap16xx() || cpu_is_omap24xx()) {
if (cpu_is_omap16xx() || cpu_class_is_omap2()) {
clocksource_32k.mult = clocksource_hz2mult(32768,
clocksource_32k.shift);
......
......@@ -141,7 +141,7 @@ static void omap_init_i2c(void)
* either don't wire up I2C, or chips that mux it differently...
* it can include clocking and address info, maybe more.
*/
if (cpu_is_omap24xx()) {
if (cpu_class_is_omap2()) {
if (machine_is_omap_h4()) {
omap_cfg_reg(M19_24XX_I2C1_SCL);
omap_cfg_reg(L15_24XX_I2C1_SDA);
......@@ -164,7 +164,7 @@ static inline void omap_init_i2c(void) {}
static void omap_init_kp(void)
{
/* REVISIT: 2430 keypad is on TWL4030 */
if (cpu_is_omap2430())
if (cpu_is_omap2430() || cpu_is_omap34xx())
return;
if (machine_is_omap_h2() || machine_is_omap_h3()) {
......@@ -295,7 +295,7 @@ static void __init omap_init_mmc(void)
const struct omap_mmc_conf *mmc;
/* REVISIT: 2430 has HS MMC */
if (cpu_is_omap2430())
if (cpu_is_omap2430() || cpu_is_omap34xx())
return;
/* NOTE: assumes MMC was never (wrongly) enabled */
......@@ -537,7 +537,7 @@ static int __init omap_init_devices(void)
omap_init_uwire();
omap_init_wdt();
omap_init_rng();
if (!cpu_is_omap2430()) {
if (!cpu_is_omap2430() && !cpu_is_omap34xx()) {
omap_init_i2c();
}
return 0;
......
This diff is collapsed.
......@@ -31,7 +31,7 @@
#define OMAP2_SRAM_VA 0xd0000000
#define OMAP2_SRAM_PUB_VA 0xd0000800
#if defined(CONFIG_ARCH_OMAP24XX)
#if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX)
#define SRAM_BOOTLOADER_SZ 0x00
#else
#define SRAM_BOOTLOADER_SZ 0x80
......@@ -92,7 +92,7 @@ void __init omap_detect_sram(void)
{
unsigned long reserved;
if (cpu_is_omap24xx()) {
if (cpu_class_is_omap2()) {
if (is_sram_locked()) {
omap_sram_base = OMAP2_SRAM_PUB_VA;
omap_sram_start = OMAP2_SRAM_PUB_PA;
......@@ -102,7 +102,7 @@ void __init omap_detect_sram(void)
omap_sram_start = OMAP2_SRAM_PA;
if (cpu_is_omap242x())
omap_sram_size = 0xa0000; /* 640K */
else if (cpu_is_omap243x())
else if (cpu_is_omap243x() || cpu_is_omap34xx())
omap_sram_size = 0x10000; /* 64K */
}
} else {
......@@ -149,7 +149,7 @@ void __init omap_map_sram(void)
if (omap_sram_size == 0)
return;
if (cpu_is_omap24xx()) {
if (cpu_class_is_omap2()) {
omap_sram_io_desc[0].virtual = OMAP2_SRAM_VA;
base = OMAP2_SRAM_PA;
......@@ -224,7 +224,7 @@ int __init omap1_sram_init(void)
#define omap1_sram_init() do {} while (0)
#endif
#ifdef CONFIG_ARCH_OMAP2
#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
static void (*_omap2_sram_ddr_init)(u32 *slow_dll_ctrl, u32 fast_dll_ctrl,
u32 base_cs, u32 force_unlock);
......@@ -279,7 +279,7 @@ int __init omap_sram_init(void)
omap_detect_sram();
omap_map_sram();
if (!cpu_is_omap24xx())
if (!(cpu_class_is_omap2()))
omap1_sram_init();
else
omap2_sram_init();
......
......@@ -72,6 +72,8 @@ struct sys_timer omap_timer;
#define TIMER_32K_SYNCHRONIZED 0xfffbc410
#elif defined(CONFIG_ARCH_OMAP24XX)
#define TIMER_32K_SYNCHRONIZED (OMAP2_32KSYNCT_BASE + 0x10)
#elif defined(CONFIG_ARCH_OMAP34XX)
#define TIMER_32K_SYNCHRONIZED 0x48320010
#else
#error OMAP 32KHz timer does not currently work on 15XX!
#endif
......@@ -120,7 +122,7 @@ static inline void omap_32k_timer_stop(void)
#define omap_32k_timer_ack_irq()
#elif defined(CONFIG_ARCH_OMAP2)
#elif defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
static struct omap_dm_timer *gptimer;
......@@ -223,9 +225,9 @@ static __init void omap_init_32k_timer(void)
if (cpu_class_is_omap1())
setup_irq(INT_OS_TIMER, &omap_32k_timer_irq);
#ifdef CONFIG_ARCH_OMAP2
#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
/* REVISIT: Check 24xx TIOCP_CFG settings after idle works */
if (cpu_is_omap24xx()) {
if (cpu_class_is_omap2()) {
gptimer = omap_dm_timer_request_specific(1);
BUG_ON(gptimer == NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment