aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-06-14 17:31:36 -0400
committerOlof Johansson <olof@lixom.net>2013-06-14 17:32:01 -0400
commit10f8902b47340fc792cf503dd3caaba410d23615 (patch)
treec81e0af4e9b3b7c2f221c74c02dea034350f8907 /arch/arm/mach-omap2
parenteb25862dee69a0a0ba835f6ed093c75f8ed3123b (diff)
parent4f288f081bb67813d35c10d1b2fa68e863c4b188 (diff)
Merge tag 'omap-for-v3.11/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc
From Tony Lindgren: Omap SoC changes. Mostly improves am33xx support, and adds minimal support for am43x SoCs. * tag 'omap-for-v3.11/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: AM43x: SRAM base and size ARM: OMAP2+: AM43x: GP or HS ? ARM: OMAP2+: AM43x: early init ARM: OMAP2+: AM43x: static mapping ARM: OMAP2+: AM437x: SoC revision detection ARM: OMAP2+: AM43x: soc_is support ARM: OMAP2+: AM43x: kbuild ARM: OMAP2+: AM43x: Kconfig ARM: OMAP2+: separate out OMAP4 restart ARM: AM33XX: clk: Add clock node for EHRPWM TBCLK ARM: OMAP3: clock data: get rid of unused USB host clock aliases and dummies ARM: OMAP2+: AM33xx: Add missing reset status info to GFX hwmod + Linux 3.10-rc5 Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/Kconfig8
-rw-r--r--arch/arm/mach-omap2/Makefile8
-rw-r--r--arch/arm/mach-omap2/am33xx.h1
-rw-r--r--arch/arm/mach-omap2/cclock33xx_data.c30
-rw-r--r--arch/arm/mach-omap2/cclock3xxx_data.c11
-rw-r--r--arch/arm/mach-omap2/cm33xx.h2
-rw-r--r--arch/arm/mach-omap2/common.h1
-rw-r--r--arch/arm/mach-omap2/control.h8
-rw-r--r--arch/arm/mach-omap2/id.c8
-rw-r--r--arch/arm/mach-omap2/io.c17
-rw-r--r--arch/arm/mach-omap2/omap4-common.c16
-rw-r--r--arch/arm/mach-omap2/omap4-restart.c27
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_33xx_data.c3
-rw-r--r--arch/arm/mach-omap2/soc.h23
-rw-r--r--arch/arm/mach-omap2/sram.c3
15 files changed, 134 insertions, 32 deletions
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index f49cd51e162a..1bfe9ee0331b 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -149,6 +149,14 @@ config SOC_AM33XX
149 select MULTI_IRQ_HANDLER 149 select MULTI_IRQ_HANDLER
150 select COMMON_CLK 150 select COMMON_CLK
151 151
152config SOC_AM43XX
153 bool "TI AM43x"
154 select CPU_V7
155 select MULTI_IRQ_HANDLER
156 select ARM_GIC
157 select COMMON_CLK
158 select MACH_OMAP_GENERIC
159
152config OMAP_PACKAGE_ZAF 160config OMAP_PACKAGE_ZAF
153 bool 161 bool
154 162
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 55a9d6777683..955b64323a0b 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -22,6 +22,7 @@ obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(hwmod-common) $(secure-common)
22obj-$(CONFIG_ARCH_OMAP4) += prm44xx.o $(hwmod-common) $(secure-common) 22obj-$(CONFIG_ARCH_OMAP4) += prm44xx.o $(hwmod-common) $(secure-common)
23obj-$(CONFIG_SOC_AM33XX) += irq.o $(hwmod-common) 23obj-$(CONFIG_SOC_AM33XX) += irq.o $(hwmod-common)
24obj-$(CONFIG_SOC_OMAP5) += prm44xx.o $(hwmod-common) $(secure-common) 24obj-$(CONFIG_SOC_OMAP5) += prm44xx.o $(hwmod-common) $(secure-common)
25obj-$(CONFIG_SOC_AM43XX) += $(hwmod-common) $(secure-common)
25 26
26ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),) 27ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),)
27obj-y += mcbsp.o 28obj-y += mcbsp.o
@@ -38,6 +39,7 @@ omap-4-5-common = omap4-common.o omap-wakeupgen.o \
38 sleep44xx.o 39 sleep44xx.o
39obj-$(CONFIG_ARCH_OMAP4) += $(omap-4-5-common) $(smp-y) 40obj-$(CONFIG_ARCH_OMAP4) += $(omap-4-5-common) $(smp-y)
40obj-$(CONFIG_SOC_OMAP5) += $(omap-4-5-common) $(smp-y) 41obj-$(CONFIG_SOC_OMAP5) += $(omap-4-5-common) $(smp-y)
42obj-$(CONFIG_SOC_AM43XX) += $(omap-4-5-common)
41 43
42plus_sec := $(call as-instr,.arch_extension sec,+sec) 44plus_sec := $(call as-instr,.arch_extension sec,+sec)
43AFLAGS_omap-headsmp.o :=-Wa,-march=armv7-a$(plus_sec) 45AFLAGS_omap-headsmp.o :=-Wa,-march=armv7-a$(plus_sec)
@@ -58,6 +60,8 @@ obj-$(CONFIG_SOC_OMAP2420) += omap2-restart.o
58obj-$(CONFIG_SOC_OMAP2430) += omap2-restart.o 60obj-$(CONFIG_SOC_OMAP2430) += omap2-restart.o
59obj-$(CONFIG_SOC_AM33XX) += am33xx-restart.o 61obj-$(CONFIG_SOC_AM33XX) += am33xx-restart.o
60obj-$(CONFIG_ARCH_OMAP3) += omap3-restart.o 62obj-$(CONFIG_ARCH_OMAP3) += omap3-restart.o
63obj-$(CONFIG_ARCH_OMAP4) += omap4-restart.o
64obj-$(CONFIG_SOC_OMAP5) += omap4-restart.o
61 65
62# Pin multiplexing 66# Pin multiplexing
63obj-$(CONFIG_SOC_OMAP2420) += mux2420.o 67obj-$(CONFIG_SOC_OMAP2420) += mux2420.o
@@ -110,6 +114,7 @@ obj-$(CONFIG_ARCH_OMAP2) += prm2xxx_3xxx.o prm2xxx.o cm2xxx.o
110obj-$(CONFIG_ARCH_OMAP3) += prm2xxx_3xxx.o prm3xxx.o cm3xxx.o 114obj-$(CONFIG_ARCH_OMAP3) += prm2xxx_3xxx.o prm3xxx.o cm3xxx.o
111obj-$(CONFIG_ARCH_OMAP3) += vc3xxx_data.o vp3xxx_data.o 115obj-$(CONFIG_ARCH_OMAP3) += vc3xxx_data.o vp3xxx_data.o
112obj-$(CONFIG_SOC_AM33XX) += prm33xx.o cm33xx.o 116obj-$(CONFIG_SOC_AM33XX) += prm33xx.o cm33xx.o
117obj-$(CONFIG_SOC_AM43XX) += prm33xx.o cm33xx.o
113omap-prcm-4-5-common = cminst44xx.o cm44xx.o prm44xx.o \ 118omap-prcm-4-5-common = cminst44xx.o cm44xx.o prm44xx.o \
114 prcm_mpu44xx.o prminst44xx.o \ 119 prcm_mpu44xx.o prminst44xx.o \
115 vc44xx_data.o vp44xx_data.o 120 vc44xx_data.o vp44xx_data.o
@@ -126,6 +131,7 @@ obj-$(CONFIG_ARCH_OMAP4) += $(voltagedomain-common)
126obj-$(CONFIG_ARCH_OMAP4) += voltagedomains44xx_data.o 131obj-$(CONFIG_ARCH_OMAP4) += voltagedomains44xx_data.o
127obj-$(CONFIG_SOC_AM33XX) += $(voltagedomain-common) 132obj-$(CONFIG_SOC_AM33XX) += $(voltagedomain-common)
128obj-$(CONFIG_SOC_AM33XX) += voltagedomains33xx_data.o 133obj-$(CONFIG_SOC_AM33XX) += voltagedomains33xx_data.o
134obj-$(CONFIG_SOC_AM43XX) += $(voltagedomain-common)
129obj-$(CONFIG_SOC_OMAP5) += $(voltagedomain-common) 135obj-$(CONFIG_SOC_OMAP5) += $(voltagedomain-common)
130 136
131# OMAP powerdomain framework 137# OMAP powerdomain framework
@@ -140,6 +146,7 @@ obj-$(CONFIG_ARCH_OMAP4) += $(powerdomain-common)
140obj-$(CONFIG_ARCH_OMAP4) += powerdomains44xx_data.o 146obj-$(CONFIG_ARCH_OMAP4) += powerdomains44xx_data.o
141obj-$(CONFIG_SOC_AM33XX) += $(powerdomain-common) 147obj-$(CONFIG_SOC_AM33XX) += $(powerdomain-common)
142obj-$(CONFIG_SOC_AM33XX) += powerdomains33xx_data.o 148obj-$(CONFIG_SOC_AM33XX) += powerdomains33xx_data.o
149obj-$(CONFIG_SOC_AM43XX) += $(powerdomain-common)
143obj-$(CONFIG_SOC_OMAP5) += $(powerdomain-common) 150obj-$(CONFIG_SOC_OMAP5) += $(powerdomain-common)
144 151
145# PRCM clockdomain control 152# PRCM clockdomain control
@@ -155,6 +162,7 @@ obj-$(CONFIG_ARCH_OMAP4) += $(clockdomain-common)
155obj-$(CONFIG_ARCH_OMAP4) += clockdomains44xx_data.o 162obj-$(CONFIG_ARCH_OMAP4) += clockdomains44xx_data.o
156obj-$(CONFIG_SOC_AM33XX) += $(clockdomain-common) 163obj-$(CONFIG_SOC_AM33XX) += $(clockdomain-common)
157obj-$(CONFIG_SOC_AM33XX) += clockdomains33xx_data.o 164obj-$(CONFIG_SOC_AM33XX) += clockdomains33xx_data.o
165obj-$(CONFIG_SOC_AM43XX) += $(clockdomain-common)
158obj-$(CONFIG_SOC_OMAP5) += $(clockdomain-common) 166obj-$(CONFIG_SOC_OMAP5) += $(clockdomain-common)
159 167
160# Clock framework 168# Clock framework
diff --git a/arch/arm/mach-omap2/am33xx.h b/arch/arm/mach-omap2/am33xx.h
index 43296c1af9ee..5eef093e6738 100644
--- a/arch/arm/mach-omap2/am33xx.h
+++ b/arch/arm/mach-omap2/am33xx.h
@@ -21,6 +21,7 @@
21#define AM33XX_SCM_BASE 0x44E10000 21#define AM33XX_SCM_BASE 0x44E10000
22#define AM33XX_CTRL_BASE AM33XX_SCM_BASE 22#define AM33XX_CTRL_BASE AM33XX_SCM_BASE
23#define AM33XX_PRCM_BASE 0x44E00000 23#define AM33XX_PRCM_BASE 0x44E00000
24#define AM43XX_PRCM_BASE 0x44DF0000
24#define AM33XX_TAP_BASE (AM33XX_CTRL_BASE + 0x3FC) 25#define AM33XX_TAP_BASE (AM33XX_CTRL_BASE + 0x3FC)
25 26
26#endif /* __ASM_ARCH_AM33XX_H */ 27#endif /* __ASM_ARCH_AM33XX_H */
diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c
index af3544ce4f02..0346de56436c 100644
--- a/arch/arm/mach-omap2/cclock33xx_data.c
+++ b/arch/arm/mach-omap2/cclock33xx_data.c
@@ -862,6 +862,33 @@ static struct clk_hw_omap wdt1_fck_hw = {
862 862
863DEFINE_STRUCT_CLK(wdt1_fck, wdt_ck_parents, gpio_fck_ops); 863DEFINE_STRUCT_CLK(wdt1_fck, wdt_ck_parents, gpio_fck_ops);
864 864
865static const char *pwmss_clk_parents[] = {
866 "dpll_per_m2_ck",
867};
868
869static const struct clk_ops ehrpwm_tbclk_ops = {
870 .enable = &omap2_dflt_clk_enable,
871 .disable = &omap2_dflt_clk_disable,
872};
873
874DEFINE_CLK_OMAP_MUX_GATE(ehrpwm0_tbclk, "l4ls_clkdm",
875 NULL, NULL, 0,
876 AM33XX_CTRL_REGADDR(AM33XX_PWMSS_TBCLK_CLKCTRL),
877 AM33XX_PWMSS0_TBCLKEN_SHIFT,
878 NULL, pwmss_clk_parents, ehrpwm_tbclk_ops);
879
880DEFINE_CLK_OMAP_MUX_GATE(ehrpwm1_tbclk, "l4ls_clkdm",
881 NULL, NULL, 0,
882 AM33XX_CTRL_REGADDR(AM33XX_PWMSS_TBCLK_CLKCTRL),
883 AM33XX_PWMSS1_TBCLKEN_SHIFT,
884 NULL, pwmss_clk_parents, ehrpwm_tbclk_ops);
885
886DEFINE_CLK_OMAP_MUX_GATE(ehrpwm2_tbclk, "l4ls_clkdm",
887 NULL, NULL, 0,
888 AM33XX_CTRL_REGADDR(AM33XX_PWMSS_TBCLK_CLKCTRL),
889 AM33XX_PWMSS2_TBCLKEN_SHIFT,
890 NULL, pwmss_clk_parents, ehrpwm_tbclk_ops);
891
865/* 892/*
866 * clkdev 893 * clkdev
867 */ 894 */
@@ -942,6 +969,9 @@ static struct omap_clk am33xx_clks[] = {
942 CLK(NULL, "clkout2_div_ck", &clkout2_div_ck), 969 CLK(NULL, "clkout2_div_ck", &clkout2_div_ck),
943 CLK(NULL, "timer_32k_ck", &clkdiv32k_ick), 970 CLK(NULL, "timer_32k_ck", &clkdiv32k_ick),
944 CLK(NULL, "timer_sys_ck", &sys_clkin_ck), 971 CLK(NULL, "timer_sys_ck", &sys_clkin_ck),
972 CLK("48300200.ehrpwm", "tbclk", &ehrpwm0_tbclk),
973 CLK("48302200.ehrpwm", "tbclk", &ehrpwm1_tbclk),
974 CLK("48304200.ehrpwm", "tbclk", &ehrpwm2_tbclk),
945}; 975};
946 976
947 977
diff --git a/arch/arm/mach-omap2/cclock3xxx_data.c b/arch/arm/mach-omap2/cclock3xxx_data.c
index 45cd26430d1f..334b76745900 100644
--- a/arch/arm/mach-omap2/cclock3xxx_data.c
+++ b/arch/arm/mach-omap2/cclock3xxx_data.c
@@ -3329,11 +3329,7 @@ static struct omap_clk omap36xx_am35xx_omap3430es2plus_clks[] = {
3329 CLK(NULL, "cpefuse_fck", &cpefuse_fck), 3329 CLK(NULL, "cpefuse_fck", &cpefuse_fck),
3330 CLK(NULL, "ts_fck", &ts_fck), 3330 CLK(NULL, "ts_fck", &ts_fck),
3331 CLK(NULL, "usbtll_fck", &usbtll_fck), 3331 CLK(NULL, "usbtll_fck", &usbtll_fck),
3332 CLK("usbhs_omap", "usbtll_fck", &usbtll_fck),
3333 CLK("usbhs_tll", "usbtll_fck", &usbtll_fck),
3334 CLK(NULL, "usbtll_ick", &usbtll_ick), 3332 CLK(NULL, "usbtll_ick", &usbtll_ick),
3335 CLK("usbhs_omap", "usbtll_ick", &usbtll_ick),
3336 CLK("usbhs_tll", "usbtll_ick", &usbtll_ick),
3337 CLK("omap_hsmmc.2", "ick", &mmchs3_ick), 3333 CLK("omap_hsmmc.2", "ick", &mmchs3_ick),
3338 CLK(NULL, "mmchs3_ick", &mmchs3_ick), 3334 CLK(NULL, "mmchs3_ick", &mmchs3_ick),
3339 CLK(NULL, "mmchs3_fck", &mmchs3_fck), 3335 CLK(NULL, "mmchs3_fck", &mmchs3_fck),
@@ -3343,7 +3339,6 @@ static struct omap_clk omap36xx_am35xx_omap3430es2plus_clks[] = {
3343 CLK(NULL, "usbhost_120m_fck", &usbhost_120m_fck), 3339 CLK(NULL, "usbhost_120m_fck", &usbhost_120m_fck),
3344 CLK(NULL, "usbhost_48m_fck", &usbhost_48m_fck), 3340 CLK(NULL, "usbhost_48m_fck", &usbhost_48m_fck),
3345 CLK(NULL, "usbhost_ick", &usbhost_ick), 3341 CLK(NULL, "usbhost_ick", &usbhost_ick),
3346 CLK("usbhs_omap", "usbhost_ick", &usbhost_ick),
3347}; 3342};
3348 3343
3349/* 3344/*
@@ -3463,12 +3458,6 @@ static struct omap_clk omap3xxx_clks[] = {
3463 CLK(NULL, "utmi_p2_gfclk", &dummy_ck), 3458 CLK(NULL, "utmi_p2_gfclk", &dummy_ck),
3464 CLK(NULL, "xclk60mhsp1_ck", &dummy_ck), 3459 CLK(NULL, "xclk60mhsp1_ck", &dummy_ck),
3465 CLK(NULL, "xclk60mhsp2_ck", &dummy_ck), 3460 CLK(NULL, "xclk60mhsp2_ck", &dummy_ck),
3466 CLK(NULL, "usb_host_hs_utmi_p1_clk", &dummy_ck),
3467 CLK(NULL, "usb_host_hs_utmi_p2_clk", &dummy_ck),
3468 CLK("usbhs_omap", "usb_tll_hs_usb_ch0_clk", &dummy_ck),
3469 CLK("usbhs_omap", "usb_tll_hs_usb_ch1_clk", &dummy_ck),
3470 CLK("usbhs_tll", "usb_tll_hs_usb_ch0_clk", &dummy_ck),
3471 CLK("usbhs_tll", "usb_tll_hs_usb_ch1_clk", &dummy_ck),
3472 CLK(NULL, "init_60m_fclk", &dummy_ck), 3461 CLK(NULL, "init_60m_fclk", &dummy_ck),
3473 CLK(NULL, "gpt1_fck", &gpt1_fck), 3462 CLK(NULL, "gpt1_fck", &gpt1_fck),
3474 CLK(NULL, "aes2_ick", &aes2_ick), 3463 CLK(NULL, "aes2_ick", &aes2_ick),
diff --git a/arch/arm/mach-omap2/cm33xx.h b/arch/arm/mach-omap2/cm33xx.h
index 64f4bafe7bd9..9d1f4fcdebbb 100644
--- a/arch/arm/mach-omap2/cm33xx.h
+++ b/arch/arm/mach-omap2/cm33xx.h
@@ -383,7 +383,7 @@ extern void am33xx_cm_clkdm_disable_hwsup(s16 inst, u16 cdoffs);
383extern void am33xx_cm_clkdm_force_sleep(s16 inst, u16 cdoffs); 383extern void am33xx_cm_clkdm_force_sleep(s16 inst, u16 cdoffs);
384extern void am33xx_cm_clkdm_force_wakeup(s16 inst, u16 cdoffs); 384extern void am33xx_cm_clkdm_force_wakeup(s16 inst, u16 cdoffs);
385 385
386#ifdef CONFIG_SOC_AM33XX 386#if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX)
387extern int am33xx_cm_wait_module_idle(u16 inst, s16 cdoffs, 387extern int am33xx_cm_wait_module_idle(u16 inst, s16 cdoffs,
388 u16 clkctrl_offs); 388 u16 clkctrl_offs);
389extern void am33xx_cm_module_enable(u8 mode, u16 inst, s16 cdoffs, 389extern void am33xx_cm_module_enable(u8 mode, u16 inst, s16 cdoffs,
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 7d95bb053b93..72cab3f4f16d 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -96,6 +96,7 @@ void am33xx_init_early(void);
96void am35xx_init_early(void); 96void am35xx_init_early(void);
97void ti81xx_init_early(void); 97void ti81xx_init_early(void);
98void am33xx_init_early(void); 98void am33xx_init_early(void);
99void am43xx_init_early(void);
99void omap4430_init_early(void); 100void omap4430_init_early(void);
100void omap5_init_early(void); 101void omap5_init_early(void);
101void omap3_init_late(void); /* Do not use this one */ 102void omap3_init_late(void); /* Do not use this one */
diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h
index e6c328128a0a..35d17a6ec06b 100644
--- a/arch/arm/mach-omap2/control.h
+++ b/arch/arm/mach-omap2/control.h
@@ -358,6 +358,14 @@
358#define AM33XX_CONTROL_STATUS_SYSBOOT1_WIDTH 0x2 358#define AM33XX_CONTROL_STATUS_SYSBOOT1_WIDTH 0x2
359#define AM33XX_CONTROL_STATUS_SYSBOOT1_MASK (0x3 << 22) 359#define AM33XX_CONTROL_STATUS_SYSBOOT1_MASK (0x3 << 22)
360 360
361/* AM33XX PWMSS Control register */
362#define AM33XX_PWMSS_TBCLK_CLKCTRL 0x664
363
364/* AM33XX PWMSS Control bitfields */
365#define AM33XX_PWMSS0_TBCLKEN_SHIFT 0
366#define AM33XX_PWMSS1_TBCLKEN_SHIFT 1
367#define AM33XX_PWMSS2_TBCLKEN_SHIFT 2
368
361/* CONTROL OMAP STATUS register to identify OMAP3 features */ 369/* CONTROL OMAP STATUS register to identify OMAP3 features */
362#define OMAP3_CONTROL_OMAP_STATUS 0x044c 370#define OMAP3_CONTROL_OMAP_STATUS 0x044c
363 371
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 1272c41d4749..74f71abcd50e 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -55,7 +55,7 @@ int omap_type(void)
55 55
56 if (cpu_is_omap24xx()) { 56 if (cpu_is_omap24xx()) {
57 val = omap_ctrl_readl(OMAP24XX_CONTROL_STATUS); 57 val = omap_ctrl_readl(OMAP24XX_CONTROL_STATUS);
58 } else if (soc_is_am33xx()) { 58 } else if (soc_is_am33xx() || soc_is_am43xx()) {
59 val = omap_ctrl_readl(AM33XX_CONTROL_STATUS); 59 val = omap_ctrl_readl(AM33XX_CONTROL_STATUS);
60 } else if (cpu_is_omap34xx()) { 60 } else if (cpu_is_omap34xx()) {
61 val = omap_ctrl_readl(OMAP343X_CONTROL_STATUS); 61 val = omap_ctrl_readl(OMAP343X_CONTROL_STATUS);
@@ -209,6 +209,8 @@ static void __init omap3_cpuinfo(void)
209 cpu_name = "TI816X"; 209 cpu_name = "TI816X";
210 } else if (soc_is_am335x()) { 210 } else if (soc_is_am335x()) {
211 cpu_name = "AM335X"; 211 cpu_name = "AM335X";
212 } else if (soc_is_am437x()) {
213 cpu_name = "AM437x";
212 } else if (cpu_is_ti814x()) { 214 } else if (cpu_is_ti814x()) {
213 cpu_name = "TI814X"; 215 cpu_name = "TI814X";
214 } else if (omap3_has_iva() && omap3_has_sgx()) { 216 } else if (omap3_has_iva() && omap3_has_sgx()) {
@@ -430,6 +432,10 @@ void __init omap3xxx_check_revision(void)
430 break; 432 break;
431 } 433 }
432 break; 434 break;
435 case 0xb98c:
436 omap_revision = AM437X_REV_ES1_0;
437 cpu_rev = "1.0";
438 break;
433 case 0xb8f2: 439 case 0xb8f2:
434 switch (rev) { 440 switch (rev) {
435 case 0: 441 case 0:
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 09abf99e9e57..f96215075b92 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -202,7 +202,7 @@ static struct map_desc omapti81xx_io_desc[] __initdata = {
202}; 202};
203#endif 203#endif
204 204
205#ifdef CONFIG_SOC_AM33XX 205#if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX)
206static struct map_desc omapam33xx_io_desc[] __initdata = { 206static struct map_desc omapam33xx_io_desc[] __initdata = {
207 { 207 {
208 .virtual = L4_34XX_VIRT, 208 .virtual = L4_34XX_VIRT,
@@ -318,7 +318,7 @@ void __init ti81xx_map_io(void)
318} 318}
319#endif 319#endif
320 320
321#ifdef CONFIG_SOC_AM33XX 321#if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX)
322void __init am33xx_map_io(void) 322void __init am33xx_map_io(void)
323{ 323{
324 iotable_init(omapam33xx_io_desc, ARRAY_SIZE(omapam33xx_io_desc)); 324 iotable_init(omapam33xx_io_desc, ARRAY_SIZE(omapam33xx_io_desc));
@@ -586,6 +586,19 @@ void __init am33xx_init_early(void)
586} 586}
587#endif 587#endif
588 588
589#ifdef CONFIG_SOC_AM43XX
590void __init am43xx_init_early(void)
591{
592 omap2_set_globals_tap(AM335X_CLASS,
593 AM33XX_L4_WK_IO_ADDRESS(AM33XX_TAP_BASE));
594 omap2_set_globals_control(AM33XX_L4_WK_IO_ADDRESS(AM33XX_CTRL_BASE),
595 NULL);
596 omap2_set_globals_prm(AM33XX_L4_WK_IO_ADDRESS(AM43XX_PRCM_BASE));
597 omap2_set_globals_cm(AM33XX_L4_WK_IO_ADDRESS(AM43XX_PRCM_BASE), NULL);
598 omap3xxx_check_revision();
599}
600#endif
601
589#ifdef CONFIG_ARCH_OMAP4 602#ifdef CONFIG_ARCH_OMAP4
590void __init omap4430_init_early(void) 603void __init omap4430_init_early(void)
591{ 604{
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 13b27ffaf45e..38cd3a69cff3 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -339,19 +339,3 @@ int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
339 return 0; 339 return 0;
340} 340}
341#endif 341#endif
342
343/**
344 * omap44xx_restart - trigger a software restart of the SoC
345 * @mode: the "reboot mode", see arch/arm/kernel/{setup,process}.c
346 * @cmd: passed from the userspace program rebooting the system (if provided)
347 *
348 * Resets the SoC. For @cmd, see the 'reboot' syscall in
349 * kernel/sys.c. No return value.
350 */
351void omap44xx_restart(char mode, const char *cmd)
352{
353 /* XXX Should save 'cmd' into scratchpad for use after reboot */
354 omap4_prminst_global_warm_sw_reset(); /* never returns */
355 while (1);
356}
357
diff --git a/arch/arm/mach-omap2/omap4-restart.c b/arch/arm/mach-omap2/omap4-restart.c
new file mode 100644
index 000000000000..f90e02e11898
--- /dev/null
+++ b/arch/arm/mach-omap2/omap4-restart.c
@@ -0,0 +1,27 @@
1/*
2 * omap4-restart.c - Common to OMAP4 and OMAP5
3 *
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9
10#include <linux/types.h>
11#include "prminst44xx.h"
12
13/**
14 * omap44xx_restart - trigger a software restart of the SoC
15 * @mode: the "reboot mode", see arch/arm/kernel/{setup,process}.c
16 * @cmd: passed from the userspace program rebooting the system (if provided)
17 *
18 * Resets the SoC. For @cmd, see the 'reboot' syscall in
19 * kernel/sys.c. No return value.
20 */
21void omap44xx_restart(char mode, const char *cmd)
22{
23 /* XXX Should save 'cmd' into scratchpad for use after reboot */
24 omap4_prminst_global_warm_sw_reset(); /* never returns */
25 while (1)
26 ;
27}
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
index 075f7cc51026..1e2a6fb835c2 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
@@ -329,7 +329,7 @@ static struct omap_hwmod_class am33xx_gfx_hwmod_class = {
329}; 329};
330 330
331static struct omap_hwmod_rst_info am33xx_gfx_resets[] = { 331static struct omap_hwmod_rst_info am33xx_gfx_resets[] = {
332 { .name = "gfx", .rst_shift = 0 }, 332 { .name = "gfx", .rst_shift = 0, .st_shift = 0},
333}; 333};
334 334
335static struct omap_hwmod_irq_info am33xx_gfx_irqs[] = { 335static struct omap_hwmod_irq_info am33xx_gfx_irqs[] = {
@@ -347,6 +347,7 @@ static struct omap_hwmod am33xx_gfx_hwmod = {
347 .omap4 = { 347 .omap4 = {
348 .clkctrl_offs = AM33XX_CM_GFX_GFX_CLKCTRL_OFFSET, 348 .clkctrl_offs = AM33XX_CM_GFX_GFX_CLKCTRL_OFFSET,
349 .rstctrl_offs = AM33XX_RM_GFX_RSTCTRL_OFFSET, 349 .rstctrl_offs = AM33XX_RM_GFX_RSTCTRL_OFFSET,
350 .rstst_offs = AM33XX_RM_GFX_RSTST_OFFSET,
350 .modulemode = MODULEMODE_SWCTRL, 351 .modulemode = MODULEMODE_SWCTRL,
351 }, 352 },
352 }, 353 },
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
index 197cc16870d9..3cefc492b758 100644
--- a/arch/arm/mach-omap2/soc.h
+++ b/arch/arm/mach-omap2/soc.h
@@ -96,6 +96,15 @@
96# endif 96# endif
97#endif 97#endif
98 98
99#ifdef CONFIG_SOC_AM43XX
100# ifdef OMAP_NAME
101# undef MULTI_OMAP2
102# define MULTI_OMAP2
103# else
104# define OMAP_NAME am43xx
105# endif
106#endif
107
99/* 108/*
100 * Omap device type i.e. EMU/HS/TST/GP/BAD 109 * Omap device type i.e. EMU/HS/TST/GP/BAD
101 */ 110 */
@@ -187,6 +196,7 @@ IS_OMAP_CLASS(44xx, 0x44)
187IS_AM_CLASS(35xx, 0x35) 196IS_AM_CLASS(35xx, 0x35)
188IS_OMAP_CLASS(54xx, 0x54) 197IS_OMAP_CLASS(54xx, 0x54)
189IS_AM_CLASS(33xx, 0x33) 198IS_AM_CLASS(33xx, 0x33)
199IS_AM_CLASS(43xx, 0x43)
190 200
191IS_TI_CLASS(81xx, 0x81) 201IS_TI_CLASS(81xx, 0x81)
192 202
@@ -202,6 +212,7 @@ IS_OMAP_SUBCLASS(543x, 0x543)
202IS_TI_SUBCLASS(816x, 0x816) 212IS_TI_SUBCLASS(816x, 0x816)
203IS_TI_SUBCLASS(814x, 0x814) 213IS_TI_SUBCLASS(814x, 0x814)
204IS_AM_SUBCLASS(335x, 0x335) 214IS_AM_SUBCLASS(335x, 0x335)
215IS_AM_SUBCLASS(437x, 0x437)
205 216
206#define cpu_is_omap24xx() 0 217#define cpu_is_omap24xx() 0
207#define cpu_is_omap242x() 0 218#define cpu_is_omap242x() 0
@@ -214,6 +225,8 @@ IS_AM_SUBCLASS(335x, 0x335)
214#define soc_is_am35xx() 0 225#define soc_is_am35xx() 0
215#define soc_is_am33xx() 0 226#define soc_is_am33xx() 0
216#define soc_is_am335x() 0 227#define soc_is_am335x() 0
228#define soc_is_am43xx() 0
229#define soc_is_am437x() 0
217#define cpu_is_omap44xx() 0 230#define cpu_is_omap44xx() 0
218#define cpu_is_omap443x() 0 231#define cpu_is_omap443x() 0
219#define cpu_is_omap446x() 0 232#define cpu_is_omap446x() 0
@@ -341,6 +354,13 @@ IS_OMAP_TYPE(3430, 0x3430)
341# define soc_is_am335x() is_am335x() 354# define soc_is_am335x() is_am335x()
342#endif 355#endif
343 356
357#ifdef CONFIG_SOC_AM43XX
358# undef soc_is_am43xx
359# undef soc_is_am437x
360# define soc_is_am43xx() is_am43xx()
361# define soc_is_am437x() is_am437x()
362#endif
363
344# if defined(CONFIG_ARCH_OMAP4) 364# if defined(CONFIG_ARCH_OMAP4)
345# undef cpu_is_omap44xx 365# undef cpu_is_omap44xx
346# undef cpu_is_omap443x 366# undef cpu_is_omap443x
@@ -398,6 +418,9 @@ IS_OMAP_TYPE(3430, 0x3430)
398#define AM335X_REV_ES2_0 (AM335X_CLASS | (0x1 << 8)) 418#define AM335X_REV_ES2_0 (AM335X_CLASS | (0x1 << 8))
399#define AM335X_REV_ES2_1 (AM335X_CLASS | (0x2 << 8)) 419#define AM335X_REV_ES2_1 (AM335X_CLASS | (0x2 << 8))
400 420
421#define AM437X_CLASS 0x43700000
422#define AM437X_REV_ES1_0 AM437X_CLASS
423
401#define OMAP443X_CLASS 0x44300044 424#define OMAP443X_CLASS 0x44300044
402#define OMAP4430_REV_ES1_0 (OMAP443X_CLASS | (0x10 << 8)) 425#define OMAP4430_REV_ES1_0 (OMAP443X_CLASS | (0x10 << 8))
403#define OMAP4430_REV_ES2_0 (OMAP443X_CLASS | (0x20 << 8)) 426#define OMAP4430_REV_ES2_0 (OMAP443X_CLASS | (0x20 << 8))
diff --git a/arch/arm/mach-omap2/sram.c b/arch/arm/mach-omap2/sram.c
index 0ff0f068bea8..4bd096836235 100644
--- a/arch/arm/mach-omap2/sram.c
+++ b/arch/arm/mach-omap2/sram.c
@@ -119,6 +119,9 @@ static void __init omap_detect_sram(void)
119 if (soc_is_am33xx()) { 119 if (soc_is_am33xx()) {
120 omap_sram_start = AM33XX_SRAM_PA; 120 omap_sram_start = AM33XX_SRAM_PA;
121 omap_sram_size = 0x10000; /* 64K */ 121 omap_sram_size = 0x10000; /* 64K */
122 } else if (soc_is_am43xx()) {
123 omap_sram_start = AM33XX_SRAM_PA;
124 omap_sram_size = SZ_256K;
122 } else if (cpu_is_omap34xx()) { 125 } else if (cpu_is_omap34xx()) {
123 omap_sram_start = OMAP3_SRAM_PA; 126 omap_sram_start = OMAP3_SRAM_PA;
124 omap_sram_size = 0x10000; /* 64K */ 127 omap_sram_size = 0x10000; /* 64K */