linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH-V2] ARM: OMAP2+: am33xx: Make am33xx as a separate class
@ 2012-05-09 11:24 Vaibhav Hiremath
  2012-05-09 18:54 ` Tony Lindgren
  0 siblings, 1 reply; 7+ messages in thread
From: Vaibhav Hiremath @ 2012-05-09 11:24 UTC (permalink / raw)
  To: linux-arm-kernel

Initially, we decided to make am33xx family of device to fall
under omap3 class (cpu_is_omap34xx() = true), since it carries
Cortex-A8 core. But while adding complete baseport support
(like, clock, power and hwmod) support, it is observed that,
we are creating more and more problems by treating am33xx device
as omap3 family, as nothing matches between them
(except cortex-A8 mpu).

So,  after long discussion we have came to the conclusion that,
we should not consider am33xx device as omap3 family, instead
create separate class (SOC_OMAPAM33XX) under OMAP2PLUS.
This means, for am33xx device, cpu_is_omap34xx() will return false,
and only cpu_is_am33xx() will be true.

Please refer to the link below, for mailing-list discussion on this -

http://www.spinics.net/lists/linux-omap/msg69439.html

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Paul Walmsley <paul@pwsan.com>

---
NOTE: Boot tested it on OMAP3EVM platform.

Changes from V1:
    - This patch has been rebased against linux-omap/cleanup
      branch.
    - Rebased on top of KevinH's patch series -
      [PATCH 0/3] ARM: OMAP2+: Kconfig: minor cleanup for SOC names
      [PATCH 1/3] ARM: OMAP2+: INTC: fix Kconfig option for TI81XX
      [PATCH 2/3] ARM: OMAP2+: Kconfig: convert SOC_OMAPTI81XX to SOC_TI81XX
      [PATCH 3/3] ARM: OMAP2+: Kconfig: convert SOC_OMAPAM33XX to SOC_AM33XX
    - Removed stale condition (dependes on ARCH_OMAP2PLUS) in
      Kconfig for SOC_AM33XX.

 arch/arm/mach-omap2/Kconfig           |    4 +++-
 arch/arm/mach-omap2/Makefile          |    6 ++++++
 arch/arm/mach-omap2/common.c          |    2 ++
 arch/arm/plat-omap/include/plat/cpu.h |    9 ++++++---
 arch/arm/plat-omap/sram.c             |    2 +-
 5 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 61bf3c3..7a77bb6 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -84,8 +84,10 @@ config SOC_TI81XX

 config SOC_AM33XX
 	bool "AM33XX support"
-	depends on ARCH_OMAP3
 	default y
+	select CPU_V7
+	select ARM_CPU_SUSPEND if PM
+	select MULTI_IRQ_HANDLER

 config OMAP_PACKAGE_ZAF
        bool
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index a5b8db3..25370fd 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -16,6 +16,7 @@ secure-common				= omap-smc.o omap-secure.o
 obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(hwmod-common)
 obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(hwmod-common) $(secure-common)
 obj-$(CONFIG_ARCH_OMAP4) += prm44xx.o $(hwmod-common) $(secure-common)
+obj-$(CONFIG_SOC_AM33XX) += irq.o $(hwmod-common)

 ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),)
 obj-y += mcbsp.o
@@ -90,6 +91,7 @@ obj-$(CONFIG_ARCH_OMAP3)		+= vc3xxx_data.o vp3xxx_data.o
 obj-$(CONFIG_ARCH_OMAP4)		+= prcm.o cminst44xx.o cm44xx.o
 obj-$(CONFIG_ARCH_OMAP4)		+= prcm_mpu44xx.o prminst44xx.o
 obj-$(CONFIG_ARCH_OMAP4)		+= vc44xx_data.o vp44xx_data.o prm44xx.o
+obj-$(CONFIG_SOC_AM33XX)		+= prcm.o

 # OMAP voltage domains
 voltagedomain-common			:= voltage.o vc.o vp.o
@@ -99,6 +101,7 @@ obj-$(CONFIG_ARCH_OMAP3)		+= $(voltagedomain-common)
 obj-$(CONFIG_ARCH_OMAP3)		+= voltagedomains3xxx_data.o
 obj-$(CONFIG_ARCH_OMAP4)		+= $(voltagedomain-common)
 obj-$(CONFIG_ARCH_OMAP4)		+= voltagedomains44xx_data.o
+obj-$(CONFIG_SOC_AM33XX)		+= $(voltagedomain-common)

 # OMAP powerdomain framework
 powerdomain-common			+= powerdomain.o powerdomain-common.o
@@ -113,6 +116,7 @@ obj-$(CONFIG_ARCH_OMAP3)		+= powerdomains2xxx_3xxx_data.o
 obj-$(CONFIG_ARCH_OMAP4)		+= $(powerdomain-common)
 obj-$(CONFIG_ARCH_OMAP4)		+= powerdomain44xx.o
 obj-$(CONFIG_ARCH_OMAP4)		+= powerdomains44xx_data.o
+obj-$(CONFIG_SOC_AM33XX)		+= $(powerdomain-common)

 # PRCM clockdomain control
 clockdomain-common			+= clockdomain.o
@@ -127,6 +131,7 @@ obj-$(CONFIG_ARCH_OMAP3)		+= clockdomains3xxx_data.o
 obj-$(CONFIG_ARCH_OMAP4)		+= $(clockdomain-common)
 obj-$(CONFIG_ARCH_OMAP4)		+= clockdomain44xx.o
 obj-$(CONFIG_ARCH_OMAP4)		+= clockdomains44xx_data.o
+obj-$(CONFIG_SOC_AM33XX)		+= $(clockdomain-common)

 # Clock framework
 obj-$(CONFIG_ARCH_OMAP2)		+= $(clock-common) clock2xxx.o
@@ -144,6 +149,7 @@ obj-$(CONFIG_ARCH_OMAP3)		+= dpll3xxx.o clock3xxx_data.o
 obj-$(CONFIG_ARCH_OMAP3)		+= clkt_iclk.o
 obj-$(CONFIG_ARCH_OMAP4)		+= $(clock-common) clock44xx_data.o
 obj-$(CONFIG_ARCH_OMAP4)		+= dpll3xxx.o dpll44xx.o
+obj-$(CONFIG_SOC_AM33XX)		+= $(clock-common) dpll3xxx.o

 # OMAP2 clock rate set data (old "OPP" data)
 obj-$(CONFIG_SOC_OMAP2420)		+= opp2420_data.o
diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c
index 1549c11..bf2a4d7 100644
--- a/arch/arm/mach-omap2/common.c
+++ b/arch/arm/mach-omap2/common.c
@@ -134,7 +134,9 @@ void __init ti81xx_map_io(void)
 {
 	omapti81xx_map_common_io();
 }
+#endif

+#if defined(CONFIG_SOC_AM33XX)
 #define AM33XX_TAP_BASE		(AM33XX_CTRL_BASE + \
 				TI81XX_CONTROL_DEVICE_ID - 0x204)

diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index 7b0d8ef..8ca86ec 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -360,8 +360,6 @@ IS_OMAP_TYPE(3517, 0x3517)
 # undef cpu_is_ti816x
 # undef cpu_is_ti814x
 # undef cpu_is_am35xx
-# undef cpu_is_am33xx
-# undef cpu_is_am335x
 # define cpu_is_omap3430()		is_omap3430()
 # define cpu_is_omap3503()		(cpu_is_omap3430() &&		\
 						(!omap3_has_iva()) &&	\
@@ -382,6 +380,11 @@ IS_OMAP_TYPE(3517, 0x3517)
 # define cpu_is_ti816x()		is_ti816x()
 # define cpu_is_ti814x()		is_ti814x()
 # define cpu_is_am35xx()		is_am35xx()
+#endif
+
+# if defined(CONFIG_SOC_AM33XX)
+# undef cpu_is_am33xx
+# undef cpu_is_am335x
 # define cpu_is_am33xx()		is_am33xx()
 # define cpu_is_am335x()		is_am335x()
 #endif
@@ -441,7 +444,7 @@ IS_OMAP_TYPE(3517, 0x3517)
 #define AM35XX_REV_ES1_0	AM35XX_CLASS
 #define AM35XX_REV_ES1_1	(AM35XX_CLASS | (0x1 << 8))

-#define AM335X_CLASS		0x33500034
+#define AM335X_CLASS		0x33500033
 #define AM335X_REV_ES1_0	AM335X_CLASS

 #define OMAP443X_CLASS		0x44300044
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index f9a8c53..982e8bc 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -85,7 +85,7 @@ static int is_sram_locked(void)
 			__raw_writel(0xCFDE, OMAP24XX_VA_READPERM0);  /* all i-read */
 			__raw_writel(0xCFDE, OMAP24XX_VA_WRITEPERM0); /* all i-write */
 		}
-		if (cpu_is_omap34xx() && !cpu_is_am33xx()) {
+		if (cpu_is_omap34xx()) {
 			__raw_writel(0xFFFF, OMAP34XX_VA_REQINFOPERM0); /* all q-vects */
 			__raw_writel(0xFFFF, OMAP34XX_VA_READPERM0);  /* all i-read */
 			__raw_writel(0xFFFF, OMAP34XX_VA_WRITEPERM0); /* all i-write */
--
1.7.0.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH-V2] ARM: OMAP2+: am33xx: Make am33xx as a separate class
  2012-05-09 11:24 [PATCH-V2] ARM: OMAP2+: am33xx: Make am33xx as a separate class Vaibhav Hiremath
@ 2012-05-09 18:54 ` Tony Lindgren
  2012-05-10 18:01   ` Tony Lindgren
  0 siblings, 1 reply; 7+ messages in thread
From: Tony Lindgren @ 2012-05-09 18:54 UTC (permalink / raw)
  To: linux-arm-kernel

* Vaibhav Hiremath <hvaibhav@ti.com> [120509 04:28]:
> Initially, we decided to make am33xx family of device to fall
> under omap3 class (cpu_is_omap34xx() = true), since it carries
> Cortex-A8 core. But while adding complete baseport support
> (like, clock, power and hwmod) support, it is observed that,
> we are creating more and more problems by treating am33xx device
> as omap3 family, as nothing matches between them
> (except cortex-A8 mpu).

Thanks applying into devel-soc after updating for soc_is change
and fixing typo in the description that stil said OMAPAM. Updated
patch below.

Tony


From: Vaibhav Hiremath <hvaibhav@ti.com>
Date: Wed, 9 May 2012 16:54:27 +0530
Subject: [PATCH] ARM: OMAP2+: am33xx: Make am33xx as a separate class

Initially, we decided to make am33xx family of device to fall
under omap3 class (cpu_is_omap34xx() = true), since it carries
Cortex-A8 core. But while adding complete baseport support
(like, clock, power and hwmod) support, it is observed that,
we are creating more and more problems by treating am33xx device
as omap3 family, as nothing matches between them
(except cortex-A8 mpu).

So,  after long discussion we have came to the conclusion that,
we should not consider am33xx device as omap3 family, instead
create separate class (SOC_AM33XX) under OMAP2PLUS.
This means, for am33xx device, cpu_is_omap34xx() will return false,
and only cpu_is_am33xx() will be true.

Please refer to the link below, for mailing-list discussion on this -

http://www.spinics.net/lists/linux-omap/msg69439.html

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
[tony at atomide.com: fixed typo, updated for soc_is changes]
Signed-off-by: Tony Lindgren <tony@atomide.com>

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 61bf3c3..7a77bb6 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -84,8 +84,10 @@ config SOC_TI81XX
 
 config SOC_AM33XX
 	bool "AM33XX support"
-	depends on ARCH_OMAP3
 	default y
+	select CPU_V7
+	select ARM_CPU_SUSPEND if PM
+	select MULTI_IRQ_HANDLER
 
 config OMAP_PACKAGE_ZAF
        bool
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index a5b8db3..25370fd 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -16,6 +16,7 @@ secure-common				= omap-smc.o omap-secure.o
 obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(hwmod-common)
 obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(hwmod-common) $(secure-common)
 obj-$(CONFIG_ARCH_OMAP4) += prm44xx.o $(hwmod-common) $(secure-common)
+obj-$(CONFIG_SOC_AM33XX) += irq.o $(hwmod-common)
 
 ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),)
 obj-y += mcbsp.o
@@ -90,6 +91,7 @@ obj-$(CONFIG_ARCH_OMAP3)		+= vc3xxx_data.o vp3xxx_data.o
 obj-$(CONFIG_ARCH_OMAP4)		+= prcm.o cminst44xx.o cm44xx.o
 obj-$(CONFIG_ARCH_OMAP4)		+= prcm_mpu44xx.o prminst44xx.o
 obj-$(CONFIG_ARCH_OMAP4)		+= vc44xx_data.o vp44xx_data.o prm44xx.o
+obj-$(CONFIG_SOC_AM33XX)		+= prcm.o
 
 # OMAP voltage domains
 voltagedomain-common			:= voltage.o vc.o vp.o
@@ -99,6 +101,7 @@ obj-$(CONFIG_ARCH_OMAP3)		+= $(voltagedomain-common)
 obj-$(CONFIG_ARCH_OMAP3)		+= voltagedomains3xxx_data.o
 obj-$(CONFIG_ARCH_OMAP4)		+= $(voltagedomain-common)
 obj-$(CONFIG_ARCH_OMAP4)		+= voltagedomains44xx_data.o
+obj-$(CONFIG_SOC_AM33XX)		+= $(voltagedomain-common)
 
 # OMAP powerdomain framework
 powerdomain-common			+= powerdomain.o powerdomain-common.o
@@ -113,6 +116,7 @@ obj-$(CONFIG_ARCH_OMAP3)		+= powerdomains2xxx_3xxx_data.o
 obj-$(CONFIG_ARCH_OMAP4)		+= $(powerdomain-common)
 obj-$(CONFIG_ARCH_OMAP4)		+= powerdomain44xx.o
 obj-$(CONFIG_ARCH_OMAP4)		+= powerdomains44xx_data.o
+obj-$(CONFIG_SOC_AM33XX)		+= $(powerdomain-common)
 
 # PRCM clockdomain control
 clockdomain-common			+= clockdomain.o
@@ -127,6 +131,7 @@ obj-$(CONFIG_ARCH_OMAP3)		+= clockdomains3xxx_data.o
 obj-$(CONFIG_ARCH_OMAP4)		+= $(clockdomain-common)
 obj-$(CONFIG_ARCH_OMAP4)		+= clockdomain44xx.o
 obj-$(CONFIG_ARCH_OMAP4)		+= clockdomains44xx_data.o
+obj-$(CONFIG_SOC_AM33XX)		+= $(clockdomain-common)
 
 # Clock framework
 obj-$(CONFIG_ARCH_OMAP2)		+= $(clock-common) clock2xxx.o
@@ -144,6 +149,7 @@ obj-$(CONFIG_ARCH_OMAP3)		+= dpll3xxx.o clock3xxx_data.o
 obj-$(CONFIG_ARCH_OMAP3)		+= clkt_iclk.o
 obj-$(CONFIG_ARCH_OMAP4)		+= $(clock-common) clock44xx_data.o
 obj-$(CONFIG_ARCH_OMAP4)		+= dpll3xxx.o dpll44xx.o
+obj-$(CONFIG_SOC_AM33XX)		+= $(clock-common) dpll3xxx.o
 
 # OMAP2 clock rate set data (old "OPP" data)
 obj-$(CONFIG_SOC_OMAP2420)		+= opp2420_data.o
diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c
index 1549c11..bf2a4d7 100644
--- a/arch/arm/mach-omap2/common.c
+++ b/arch/arm/mach-omap2/common.c
@@ -134,7 +134,9 @@ void __init ti81xx_map_io(void)
 {
 	omapti81xx_map_common_io();
 }
+#endif
 
+#if defined(CONFIG_SOC_AM33XX)
 #define AM33XX_TAP_BASE		(AM33XX_CTRL_BASE + \
 				TI81XX_CONTROL_DEVICE_ID - 0x204)
 
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index 297245d..75e1319 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -360,8 +360,6 @@ IS_OMAP_TYPE(3517, 0x3517)
 # undef cpu_is_ti816x
 # undef cpu_is_ti814x
 # undef soc_is_am35xx
-# undef cpu_is_am33xx
-# undef cpu_is_am335x
 # define cpu_is_omap3430()		is_omap3430()
 # define cpu_is_omap3503()		(cpu_is_omap3430() &&		\
 						(!omap3_has_iva()) &&	\
@@ -382,6 +380,11 @@ IS_OMAP_TYPE(3517, 0x3517)
 # define cpu_is_ti816x()		is_ti816x()
 # define cpu_is_ti814x()		is_ti814x()
 # define soc_is_am35xx()		is_am35xx()
+#endif
+
+# if defined(CONFIG_SOC_AM33XX)
+# undef cpu_is_am33xx
+# undef cpu_is_am335x
 # define cpu_is_am33xx()		is_am33xx()
 # define cpu_is_am335x()		is_am335x()
 #endif
@@ -441,7 +444,7 @@ IS_OMAP_TYPE(3517, 0x3517)
 #define AM35XX_REV_ES1_0	AM35XX_CLASS
 #define AM35XX_REV_ES1_1	(AM35XX_CLASS | (0x1 << 8))
 
-#define AM335X_CLASS		0x33500034
+#define AM335X_CLASS		0x33500033
 #define AM335X_REV_ES1_0	AM335X_CLASS
 
 #define OMAP443X_CLASS		0x44300044
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index f9a8c53..982e8bc 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -85,7 +85,7 @@ static int is_sram_locked(void)
 			__raw_writel(0xCFDE, OMAP24XX_VA_READPERM0);  /* all i-read */
 			__raw_writel(0xCFDE, OMAP24XX_VA_WRITEPERM0); /* all i-write */
 		}
-		if (cpu_is_omap34xx() && !cpu_is_am33xx()) {
+		if (cpu_is_omap34xx()) {
 			__raw_writel(0xFFFF, OMAP34XX_VA_REQINFOPERM0); /* all q-vects */
 			__raw_writel(0xFFFF, OMAP34XX_VA_READPERM0);  /* all i-read */
 			__raw_writel(0xFFFF, OMAP34XX_VA_WRITEPERM0); /* all i-write */

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH-V2] ARM: OMAP2+: am33xx: Make am33xx as a separate class
  2012-05-09 18:54 ` Tony Lindgren
@ 2012-05-10 18:01   ` Tony Lindgren
  2012-05-10 18:05     ` Tony Lindgren
  0 siblings, 1 reply; 7+ messages in thread
From: Tony Lindgren @ 2012-05-10 18:01 UTC (permalink / raw)
  To: linux-arm-kernel

* Tony Lindgren <tony@atomide.com> [120509 11:58]:
> * Vaibhav Hiremath <hvaibhav@ti.com> [120509 04:28]:
> > Initially, we decided to make am33xx family of device to fall
> > under omap3 class (cpu_is_omap34xx() = true), since it carries
> > Cortex-A8 core. But while adding complete baseport support
> > (like, clock, power and hwmod) support, it is observed that,
> > we are creating more and more problems by treating am33xx device
> > as omap3 family, as nothing matches between them
> > (except cortex-A8 mpu).
> 
> Thanks applying into devel-soc after updating for soc_is change
> and fixing typo in the description that stil said OMAPAM. Updated
> patch below.

Turns out we still need to add defined(CONFIG_SOC_AM33XX) around
__omap2_set_globals() to keep compile working when omap4 + am33xx
are selected without omap2 or 3. Also removed the "default y"
for am33xx as that's where we're heading to anyways.

Updated patch below.

Tony


>From 54891e60bc79c43c2dbc8351f62ac5c3e8eb3592 Mon Sep 17 00:00:00 2001
From: Vaibhav Hiremath <hvaibhav@ti.com>
Date: Wed, 9 May 2012 16:54:27 +0530
Subject: [PATCH] ARM: OMAP2+: am33xx: Make am33xx as a separate class

Initially, we decided to make am33xx family of device to fall
under omap3 class (cpu_is_omap34xx() = true), since it carries
Cortex-A8 core. But while adding complete baseport support
(like, clock, power and hwmod) support, it is observed that,
we are creating more and more problems by treating am33xx device
as omap3 family, as nothing matches between them
(except cortex-A8 mpu).

So,  after long discussion we have came to the conclusion that,
we should not consider am33xx device as omap3 family, instead
create separate class (SOC_AM33XX) under OMAP2PLUS.
This means, for am33xx device, cpu_is_omap34xx() will return false,
and only cpu_is_am33xx() will be true.

Please refer to the link below, for mailing-list discussion on this -

http://www.spinics.net/lists/linux-omap/msg69439.html

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
[tony at atomide.com: fixed typo, updated for soc_is]
Signed-off-by: Tony Lindgren <tony@atomide.com>

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 61bf3c3..5bc2604 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -84,8 +84,9 @@ config SOC_TI81XX
 
 config SOC_AM33XX
 	bool "AM33XX support"
-	depends on ARCH_OMAP3
-	default y
+	select CPU_V7
+	select ARM_CPU_SUSPEND if PM
+	select MULTI_IRQ_HANDLER
 
 config OMAP_PACKAGE_ZAF
        bool
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 7cdb940..288e1a3 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -16,6 +16,7 @@ secure-common				= omap-smc.o omap-secure.o
 obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(hwmod-common)
 obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(hwmod-common) $(secure-common)
 obj-$(CONFIG_ARCH_OMAP4) += prm44xx.o $(hwmod-common) $(secure-common)
+obj-$(CONFIG_SOC_AM33XX) += irq.o $(hwmod-common)
 
 ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),)
 obj-y += mcbsp.o
@@ -90,6 +91,7 @@ obj-$(CONFIG_ARCH_OMAP3)		+= vc3xxx_data.o vp3xxx_data.o
 obj-$(CONFIG_ARCH_OMAP4)		+= prcm.o cminst44xx.o cm44xx.o
 obj-$(CONFIG_ARCH_OMAP4)		+= prcm_mpu44xx.o prminst44xx.o
 obj-$(CONFIG_ARCH_OMAP4)		+= vc44xx_data.o vp44xx_data.o prm44xx.o
+obj-$(CONFIG_SOC_AM33XX)		+= prcm.o
 
 # OMAP voltage domains
 voltagedomain-common			:= voltage.o vc.o vp.o
@@ -99,6 +101,7 @@ obj-$(CONFIG_ARCH_OMAP3)		+= $(voltagedomain-common)
 obj-$(CONFIG_ARCH_OMAP3)		+= voltagedomains3xxx_data.o
 obj-$(CONFIG_ARCH_OMAP4)		+= $(voltagedomain-common)
 obj-$(CONFIG_ARCH_OMAP4)		+= voltagedomains44xx_data.o
+obj-$(CONFIG_SOC_AM33XX)		+= $(voltagedomain-common)
 
 # OMAP powerdomain framework
 powerdomain-common			+= powerdomain.o powerdomain-common.o
@@ -113,6 +116,7 @@ obj-$(CONFIG_ARCH_OMAP3)		+= powerdomains2xxx_3xxx_data.o
 obj-$(CONFIG_ARCH_OMAP4)		+= $(powerdomain-common)
 obj-$(CONFIG_ARCH_OMAP4)		+= powerdomain44xx.o
 obj-$(CONFIG_ARCH_OMAP4)		+= powerdomains44xx_data.o
+obj-$(CONFIG_SOC_AM33XX)		+= $(powerdomain-common)
 
 # PRCM clockdomain control
 clockdomain-common			+= clockdomain.o
@@ -129,6 +133,7 @@ obj-$(CONFIG_ARCH_OMAP3)		+= clockdomains3xxx_data.o
 obj-$(CONFIG_ARCH_OMAP4)		+= $(clockdomain-common)
 obj-$(CONFIG_ARCH_OMAP4)		+= clockdomain44xx.o
 obj-$(CONFIG_ARCH_OMAP4)		+= clockdomains44xx_data.o
+obj-$(CONFIG_SOC_AM33XX)		+= $(clockdomain-common)
 
 # Clock framework
 obj-$(CONFIG_ARCH_OMAP2)		+= $(clock-common) clock2xxx.o
@@ -146,6 +151,7 @@ obj-$(CONFIG_ARCH_OMAP3)		+= dpll3xxx.o clock3xxx_data.o
 obj-$(CONFIG_ARCH_OMAP3)		+= clkt_iclk.o
 obj-$(CONFIG_ARCH_OMAP4)		+= $(clock-common) clock44xx_data.o
 obj-$(CONFIG_ARCH_OMAP4)		+= dpll3xxx.o dpll44xx.o
+obj-$(CONFIG_SOC_AM33XX)		+= $(clock-common) dpll3xxx.o
 
 # OMAP2 clock rate set data (old "OPP" data)
 obj-$(CONFIG_SOC_OMAP2420)		+= opp2420_data.o
diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c
index 1549c11..355635e 100644
--- a/arch/arm/mach-omap2/common.c
+++ b/arch/arm/mach-omap2/common.c
@@ -29,7 +29,8 @@
 
 /* Global address base setup code */
 
-#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
+#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \
+	defined(CONFIG_SOC_AM33XX)
 
 static void __init __omap2_set_globals(struct omap_globals *omap2_globals)
 {
@@ -134,7 +135,9 @@ void __init ti81xx_map_io(void)
 {
 	omapti81xx_map_common_io();
 }
+#endif
 
+#if defined(CONFIG_SOC_AM33XX)
 #define AM33XX_TAP_BASE		(AM33XX_CTRL_BASE + \
 				TI81XX_CONTROL_DEVICE_ID - 0x204)
 
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index 297245d..75e1319 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -360,8 +360,6 @@ IS_OMAP_TYPE(3517, 0x3517)
 # undef cpu_is_ti816x
 # undef cpu_is_ti814x
 # undef soc_is_am35xx
-# undef cpu_is_am33xx
-# undef cpu_is_am335x
 # define cpu_is_omap3430()		is_omap3430()
 # define cpu_is_omap3503()		(cpu_is_omap3430() &&		\
 						(!omap3_has_iva()) &&	\
@@ -382,6 +380,11 @@ IS_OMAP_TYPE(3517, 0x3517)
 # define cpu_is_ti816x()		is_ti816x()
 # define cpu_is_ti814x()		is_ti814x()
 # define soc_is_am35xx()		is_am35xx()
+#endif
+
+# if defined(CONFIG_SOC_AM33XX)
+# undef cpu_is_am33xx
+# undef cpu_is_am335x
 # define cpu_is_am33xx()		is_am33xx()
 # define cpu_is_am335x()		is_am335x()
 #endif
@@ -441,7 +444,7 @@ IS_OMAP_TYPE(3517, 0x3517)
 #define AM35XX_REV_ES1_0	AM35XX_CLASS
 #define AM35XX_REV_ES1_1	(AM35XX_CLASS | (0x1 << 8))
 
-#define AM335X_CLASS		0x33500034
+#define AM335X_CLASS		0x33500033
 #define AM335X_REV_ES1_0	AM335X_CLASS
 
 #define OMAP443X_CLASS		0x44300044
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index f9a8c53..982e8bc 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -85,7 +85,7 @@ static int is_sram_locked(void)
 			__raw_writel(0xCFDE, OMAP24XX_VA_READPERM0);  /* all i-read */
 			__raw_writel(0xCFDE, OMAP24XX_VA_WRITEPERM0); /* all i-write */
 		}
-		if (cpu_is_omap34xx() && !cpu_is_am33xx()) {
+		if (cpu_is_omap34xx()) {
 			__raw_writel(0xFFFF, OMAP34XX_VA_REQINFOPERM0); /* all q-vects */
 			__raw_writel(0xFFFF, OMAP34XX_VA_READPERM0);  /* all i-read */
 			__raw_writel(0xFFFF, OMAP34XX_VA_WRITEPERM0); /* all i-write */

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH-V2] ARM: OMAP2+: am33xx: Make am33xx as a separate class
  2012-05-10 18:01   ` Tony Lindgren
@ 2012-05-10 18:05     ` Tony Lindgren
  2012-05-10 18:18       ` Hiremath, Vaibhav
  0 siblings, 1 reply; 7+ messages in thread
From: Tony Lindgren @ 2012-05-10 18:05 UTC (permalink / raw)
  To: linux-arm-kernel

* Tony Lindgren <tony@atomide.com> [120510 11:06]:
> * Tony Lindgren <tony@atomide.com> [120509 11:58]:
> > * Vaibhav Hiremath <hvaibhav@ti.com> [120509 04:28]:
> > > Initially, we decided to make am33xx family of device to fall
> > > under omap3 class (cpu_is_omap34xx() = true), since it carries
> > > Cortex-A8 core. But while adding complete baseport support
> > > (like, clock, power and hwmod) support, it is observed that,
> > > we are creating more and more problems by treating am33xx device
> > > as omap3 family, as nothing matches between them
> > > (except cortex-A8 mpu).
> > 
> > Thanks applying into devel-soc after updating for soc_is change
> > and fixing typo in the description that stil said OMAPAM. Updated
> > patch below.
> 
> Turns out we still need to add defined(CONFIG_SOC_AM33XX) around
> __omap2_set_globals() to keep compile working when omap4 + am33xx
> are selected without omap2 or 3. Also removed the "default y"
> for am33xx as that's where we're heading to anyways.
> 
> Updated patch below.

Argh, now it breaks with:

arch/arm/mach-omap2/built-in.o: In function `omap2_set_globals_am33xx':
twl-common.c:(.init.text+0x1dd8): undefined reference to `omap2_set_globals_sdrc'

There are clearly some dependencies to the clean up patches being
discussed.. So I'll drop this for now until the clean up is sorted
out.

Regards,

Tony

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH-V2] ARM: OMAP2+: am33xx: Make am33xx as a separate class
  2012-05-10 18:05     ` Tony Lindgren
@ 2012-05-10 18:18       ` Hiremath, Vaibhav
  2012-05-10 18:30         ` Tony Lindgren
  0 siblings, 1 reply; 7+ messages in thread
From: Hiremath, Vaibhav @ 2012-05-10 18:18 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 10, 2012 at 23:35:36, Tony Lindgren wrote:
> * Tony Lindgren <tony@atomide.com> [120510 11:06]:
> > * Tony Lindgren <tony@atomide.com> [120509 11:58]:
> > > * Vaibhav Hiremath <hvaibhav@ti.com> [120509 04:28]:
> > > > Initially, we decided to make am33xx family of device to fall
> > > > under omap3 class (cpu_is_omap34xx() = true), since it carries
> > > > Cortex-A8 core. But while adding complete baseport support
> > > > (like, clock, power and hwmod) support, it is observed that,
> > > > we are creating more and more problems by treating am33xx device
> > > > as omap3 family, as nothing matches between them
> > > > (except cortex-A8 mpu).
> > > 
> > > Thanks applying into devel-soc after updating for soc_is change
> > > and fixing typo in the description that stil said OMAPAM. Updated
> > > patch below.
> > 
> > Turns out we still need to add defined(CONFIG_SOC_AM33XX) around
> > __omap2_set_globals() to keep compile working when omap4 + am33xx
> > are selected without omap2 or 3. Also removed the "default y"
> > for am33xx as that's where we're heading to anyways.
> > 
> > Updated patch below.
> 
> Argh, now it breaks with:
> 
> arch/arm/mach-omap2/built-in.o: In function `omap2_set_globals_am33xx':
> twl-common.c:(.init.text+0x1dd8): undefined reference to `omap2_set_globals_sdrc'
> 
> There are clearly some dependencies to the clean up patches being
> discussed.. So I'll drop this for now until the clean up is sorted
> out.
> 

All cleanup patches which I have posted should resolve these issues.
Do you see any issues with them? 

ARM: OMAP2+: CLEANUP: All OMAP2PLUS uses omap-device.o target so add
one entry
ARM: OMAP2+: CLEANUP: Move omap3 dpll ops to dpll3xxx.c
ARM: OMAP2+: CLEANUP: Remove unnecessary ifdef around
    __omap2_set_globals


You can only drop last patch, on which Kevin had commented, rest all should 
be merged.

ARM: OMAP2+: CLEANUP: Add new config option for different DPLL
    Features


Please let me know if I am missing something.

Thanks,
Vaibhav

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH-V2] ARM: OMAP2+: am33xx: Make am33xx as a separate class
  2012-05-10 18:18       ` Hiremath, Vaibhav
@ 2012-05-10 18:30         ` Tony Lindgren
  2012-05-10 18:37           ` Hiremath, Vaibhav
  0 siblings, 1 reply; 7+ messages in thread
From: Tony Lindgren @ 2012-05-10 18:30 UTC (permalink / raw)
  To: linux-arm-kernel

* Hiremath, Vaibhav <hvaibhav@ti.com> [120510 11:22]:
> On Thu, May 10, 2012 at 23:35:36, Tony Lindgren wrote:
> > * Tony Lindgren <tony@atomide.com> [120510 11:06]:
> > > * Tony Lindgren <tony@atomide.com> [120509 11:58]:
> > > > * Vaibhav Hiremath <hvaibhav@ti.com> [120509 04:28]:
> > > > > Initially, we decided to make am33xx family of device to fall
> > > > > under omap3 class (cpu_is_omap34xx() = true), since it carries
> > > > > Cortex-A8 core. But while adding complete baseport support
> > > > > (like, clock, power and hwmod) support, it is observed that,
> > > > > we are creating more and more problems by treating am33xx device
> > > > > as omap3 family, as nothing matches between them
> > > > > (except cortex-A8 mpu).
> > > > 
> > > > Thanks applying into devel-soc after updating for soc_is change
> > > > and fixing typo in the description that stil said OMAPAM. Updated
> > > > patch below.
> > > 
> > > Turns out we still need to add defined(CONFIG_SOC_AM33XX) around
> > > __omap2_set_globals() to keep compile working when omap4 + am33xx
> > > are selected without omap2 or 3. Also removed the "default y"
> > > for am33xx as that's where we're heading to anyways.
> > > 
> > > Updated patch below.
> > 
> > Argh, now it breaks with:
> > 
> > arch/arm/mach-omap2/built-in.o: In function `omap2_set_globals_am33xx':
> > twl-common.c:(.init.text+0x1dd8): undefined reference to `omap2_set_globals_sdrc'
> > 
> > There are clearly some dependencies to the clean up patches being
> > discussed.. So I'll drop this for now until the clean up is sorted
> > out.
> > 
> 
> All cleanup patches which I have posted should resolve these issues.
> Do you see any issues with them? 
> 
> ARM: OMAP2+: CLEANUP: All OMAP2PLUS uses omap-device.o target so add
> one entry

That looks OK to me.

> ARM: OMAP2+: CLEANUP: Move omap3 dpll ops to dpll3xxx.c

This one should be at least acked by Paul.

> ARM: OMAP2+: CLEANUP: Remove unnecessary ifdef around
>     __omap2_set_globals

This one should be acked by both Paul and Kevin. 
 
> You can only drop last patch, on which Kevin had commented, rest all should 
> be merged.
> 
> ARM: OMAP2+: CLEANUP: Add new config option for different DPLL
>     Features
> 
> 
> Please let me know if I am missing something.

Looks OK otherwise, just can't quite apply them yet without the acks.

Tony

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH-V2] ARM: OMAP2+: am33xx: Make am33xx as a separate class
  2012-05-10 18:30         ` Tony Lindgren
@ 2012-05-10 18:37           ` Hiremath, Vaibhav
  0 siblings, 0 replies; 7+ messages in thread
From: Hiremath, Vaibhav @ 2012-05-10 18:37 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, May 11, 2012 at 00:00:25, Tony Lindgren wrote:
> * Hiremath, Vaibhav <hvaibhav@ti.com> [120510 11:22]:
> > On Thu, May 10, 2012 at 23:35:36, Tony Lindgren wrote:
> > > * Tony Lindgren <tony@atomide.com> [120510 11:06]:
> > > > * Tony Lindgren <tony@atomide.com> [120509 11:58]:
> > > > > * Vaibhav Hiremath <hvaibhav@ti.com> [120509 04:28]:
> > > > > > Initially, we decided to make am33xx family of device to fall
> > > > > > under omap3 class (cpu_is_omap34xx() = true), since it carries
> > > > > > Cortex-A8 core. But while adding complete baseport support
> > > > > > (like, clock, power and hwmod) support, it is observed that,
> > > > > > we are creating more and more problems by treating am33xx device
> > > > > > as omap3 family, as nothing matches between them
> > > > > > (except cortex-A8 mpu).
> > > > > 
> > > > > Thanks applying into devel-soc after updating for soc_is change
> > > > > and fixing typo in the description that stil said OMAPAM. Updated
> > > > > patch below.
> > > > 
> > > > Turns out we still need to add defined(CONFIG_SOC_AM33XX) around
> > > > __omap2_set_globals() to keep compile working when omap4 + am33xx
> > > > are selected without omap2 or 3. Also removed the "default y"
> > > > for am33xx as that's where we're heading to anyways.
> > > > 
> > > > Updated patch below.
> > > 
> > > Argh, now it breaks with:
> > > 
> > > arch/arm/mach-omap2/built-in.o: In function `omap2_set_globals_am33xx':
> > > twl-common.c:(.init.text+0x1dd8): undefined reference to `omap2_set_globals_sdrc'
> > > 
> > > There are clearly some dependencies to the clean up patches being
> > > discussed.. So I'll drop this for now until the clean up is sorted
> > > out.
> > > 
> > 
> > All cleanup patches which I have posted should resolve these issues.
> > Do you see any issues with them? 
> > 
> > ARM: OMAP2+: CLEANUP: All OMAP2PLUS uses omap-device.o target so add
> > one entry
> 
> That looks OK to me.
> 
> > ARM: OMAP2+: CLEANUP: Move omap3 dpll ops to dpll3xxx.c
> 
> This one should be at least acked by Paul.
> 
> > ARM: OMAP2+: CLEANUP: Remove unnecessary ifdef around
> >     __omap2_set_globals
> 
> This one should be acked by both Paul and Kevin. 
>  
> > You can only drop last patch, on which Kevin had commented, rest all should 
> > be merged.
> > 
> > ARM: OMAP2+: CLEANUP: Add new config option for different DPLL
> >     Features
> > 
> > 
> > Please let me know if I am missing something.
> 
> Looks OK otherwise, just can't quite apply them yet without the acks.
> 

Understood. Let's wait for Kevin and Paul's ack on this.
I will ping them tomorrow again...

Thanks,
Vaibhav

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-05-10 18:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-09 11:24 [PATCH-V2] ARM: OMAP2+: am33xx: Make am33xx as a separate class Vaibhav Hiremath
2012-05-09 18:54 ` Tony Lindgren
2012-05-10 18:01   ` Tony Lindgren
2012-05-10 18:05     ` Tony Lindgren
2012-05-10 18:18       ` Hiremath, Vaibhav
2012-05-10 18:30         ` Tony Lindgren
2012-05-10 18:37           ` Hiremath, Vaibhav

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).