ARM: OMAP2+: am33xx: Make am33xx as a separate class
Subsystems (3)
PATCH 1/1 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_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
--- arch/arm/mach-omap2/Kconfig | 5 ++++- 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, 19 insertions(+), 5 deletions(-)
arch/arm/mach-omap2/Kconfig +4 -1
@@ -123,8 +123,11 @@ config SOC_OMAPTI81XX config SOC_OMAPAM33XX bool "AM33XX support" - depends on ARCH_OMAP3 + depends on ARCH_OMAP2PLUS default y + select CPU_V7 + select ARM_CPU_SUSPEND if PM + select MULTI_IRQ_HANDLER select SOC_HAS_DPLL_IDLE select SOC_HAS_DPLL_RECAL select SOC_HAS_DPLL_SDDIV
arch/arm/mach-omap2/Makefile +6 -0
@@ -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_OMAPAM33XX) += irq.o $(hwmod-common) ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),) obj-y += mcbsp.o
@@ -93,6 +94,7 @@ obj-$(CONFIG_ARCH_OMAP4) += prcm.o cm2xxx_3xxx.o cminst44xx.o \ cm44xx.o prcm_mpu44xx.o \ prminst44xx.o vc44xx_data.o \ vp44xx_data.o prm44xx.o +obj-$(CONFIG_SOC_OMAPAM33XX) += prcm.o # OMAP voltage domains voltagedomain-common := voltage.o vc.o vp.o
@@ -102,6 +104,7 @@ obj-$(CONFIG_ARCH_OMAP3) += $(voltagedomain-common) \ voltagedomains3xxx_data.o obj-$(CONFIG_ARCH_OMAP4) += $(voltagedomain-common) \ voltagedomains44xx_data.o +obj-$(CONFIG_SOC_OMAPAM33XX) += $(voltagedomain-common) # OMAP powerdomain framework powerdomain-common += powerdomain.o powerdomain-common.o
@@ -116,6 +119,7 @@ obj-$(CONFIG_ARCH_OMAP3) += $(powerdomain-common) \ obj-$(CONFIG_ARCH_OMAP4) += $(powerdomain-common) \ powerdomain44xx.o \ powerdomains44xx_data.o +obj-$(CONFIG_SOC_OMAPAM33XX) += $(powerdomain-common) # PRCM clockdomain control clockdomain-common += clockdomain.o \
@@ -132,6 +136,7 @@ obj-$(CONFIG_ARCH_OMAP3) += $(clockdomain-common) \ obj-$(CONFIG_ARCH_OMAP4) += $(clockdomain-common) \ clockdomain44xx.o \ clockdomains44xx_data.o +obj-$(CONFIG_SOC_OMAPAM33XX) += $(clockdomain-common) # Clock framework obj-$(CONFIG_ARCH_OMAP2) += $(clock-common) clock2xxx.o \
@@ -149,6 +154,7 @@ obj-$(CONFIG_ARCH_OMAP3) += $(clock-common) clock3xxx.o \ clkt_iclk.o obj-$(CONFIG_ARCH_OMAP4) += $(clock-common) clock44xx_data.o \ dpll3xxx.o dpll44xx.o +obj-$(CONFIG_SOC_OMAPAM33XX) += $(clock-common) dpll3xxx.o # OMAP2 clock rate set data (old "OPP" data) obj-$(CONFIG_SOC_OMAP2420) += opp2420_data.o
arch/arm/mach-omap2/common.c +2 -0
@@ -130,7 +130,9 @@ void __init ti81xx_map_io(void) {omapti81xx_map_common_io (); } +#endif +#if defined(CONFIG_SOC_OMAPAM33XX )#define AM33XX_TAP_BASE (AM33XX_CTRL_BASE + \ TI81XX_CONTROL_DEVICE_ID - 0x204)
arch/arm/plat-omap/include/plat/cpu.h +6 -3
@@ -357,8 +357,6 @@ IS_OMAP_TYPE(3517, 0x3517)# undef cpu_is_ti81xx# undef cpu_is_ti816x# undef cpu_is_ti814x -# undef cpu_is_am33xx -# undef cpu_is_am335x# define cpu_is_omap3430 () is_omap3430()# define cpu_is_omap3503 () (cpu_is_omap3430() && \ (!omap3_has_iva()) && \
@@ -378,6 +376,11 @@ IS_OMAP_TYPE(3517, 0x3517)# define cpu_is_ti81xx () is_ti81xx()# define cpu_is_ti816x () is_ti816x()# define cpu_is_ti814x () is_ti814x() +#endif + +# if defined(CONFIG_SOC_OMAPAM33XX ) +# undef cpu_is_am33xx +# undef cpu_is_am335x# define cpu_is_am33xx () is_am33xx()# define cpu_is_am335x () is_am335x()#endif
@@ -433,7 +436,7 @@ IS_OMAP_TYPE(3517, 0x3517)#define TI8148_REV_ES2_0 (TI814X_CLASS | (0x1 << 8))#define TI8148_REV_ES2_1 (TI814X_CLASS | (0x2 << 8)) -#define AM335X_CLASS 0x33500034 +#define AM335X_CLASS 0x33500033#define AM335X_REV_ES1_0 AM335X_CLASS#define OMAP443X_CLASS 0x44300044
arch/arm/plat-omap/sram.c +1 -1
@@ -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 */
Signature · 1 line
1.7.0.4
Tony Lindgren
maintainerPATCH 1/1 ARM: OMAP2+: am33xx: Make am33xx as a separate class
arch/arm/mach-omap2/Kconfig config SOC_OMAPTI81XX · line 126
Quoted 8 lines · Vaibhav Hiremath
arch/arm/mach-omap2/Kconfig +1
-1@@ -123,8 +123,11 @@ config SOC_OMAPTI81XX config SOC_OMAPAM33XX bool "AM33XX support" - depends on ARCH_OMAP3 + depends on ARCH_OMAP2PLUS
This is not needed, it's inside if ARCH_OMAP2PLUS block.
Quoted 43 lines
arch/arm/mach-omap2/Makefile +5
-0@@ -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_OMAPAM33XX) += irq.o $(hwmod-common) ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),) obj-y += mcbsp.o@@ -93,6 +94,7 @@ obj-$(CONFIG_ARCH_OMAP4) += prcm.o cm2xxx_3xxx.o cminst44xx.o \ cm44xx.o prcm_mpu44xx.o \ prminst44xx.o vc44xx_data.o \ vp44xx_data.o prm44xx.o +obj-$(CONFIG_SOC_OMAPAM33XX) += prcm.o # OMAP voltage domains voltagedomain-common := voltage.o vc.o vp.o@@ -102,6 +104,7 @@ obj-$(CONFIG_ARCH_OMAP3) += $(voltagedomain-common) \ voltagedomains3xxx_data.o obj-$(CONFIG_ARCH_OMAP4) += $(voltagedomain-common) \ voltagedomains44xx_data.o +obj-$(CONFIG_SOC_OMAPAM33XX) += $(voltagedomain-common) # OMAP powerdomain framework powerdomain-common += powerdomain.o powerdomain-common.o@@ -116,6 +119,7 @@ obj-$(CONFIG_ARCH_OMAP3) += $(powerdomain-common) \ obj-$(CONFIG_ARCH_OMAP4) += $(powerdomain-common) \ powerdomain44xx.o \ powerdomains44xx_data.o +obj-$(CONFIG_SOC_OMAPAM33XX) += $(powerdomain-common) # PRCM clockdomain control clockdomain-common += clockdomain.o \@@ -132,6 +136,7 @@ obj-$(CONFIG_ARCH_OMAP3) += $(clockdomain-common) \ obj-$(CONFIG_ARCH_OMAP4) += $(clockdomain-common) \ clockdomain44xx.o \ clockdomains44xx_data.o +obj-$(CONFIG_SOC_OMAPAM33XX) += $(clockdomain-common) # Clock framework obj-$(CONFIG_ARCH_OMAP2) += $(clock-common) clock2xxx.o \
arch/arm/mach-omap2/Makefile obj-$(CONFIG_ARCH_OMAP3) += $(clock-common) clock3xxx.o \ · line 160
Quoted 7 lines
arch/arm/mach-omap2/Makefile +1
-0@@ -149,6 +154,7 @@ obj-$(CONFIG_ARCH_OMAP3) += $(clock-common) clock3xxx.o \ clkt_iclk.o obj-$(CONFIG_ARCH_OMAP4) += $(clock-common) clock44xx_data.o \ dpll3xxx.o dpll44xx.o +obj-$(CONFIG_SOC_OMAPAM33XX) += $(clock-common) dpll3xxx.o # OMAP2 clock rate set data (old "OPP" data) obj-$(CONFIG_SOC_OMAP2420) += opp2420_data.o
Can you please rebase this on what's now in the cleanup branch at commit 382ae00105d9989a821f458084e0428bce10b969? That should simplify the Makefile changes a bit.
Other than that looks good to me.
Tony
PATCH 1/1 ARM: OMAP2+: am33xx: Make am33xx as a separate class
Quoted 5 lines · Tony Lindgren
Quoted 4 lines · Vaibhav Hiremath
arch/arm/mach-omap2/Kconfig +0
-0@@ -123,8 +123,11 @@ config SOC_OMAPTI81XX
Quoted 7 lines
arch/arm/mach-omap2/Kconfig config SOC_OMAPTI81XX · line 126
Quoted 4 lines
arch/arm/mach-omap2/Kconfig +1
-1config SOC_OMAPAM33XX bool "AM33XX support" - depends on ARCH_OMAP3 + depends on ARCH_OMAP2PLUSThis is not needed, it's inside if
ARCH_OMAP2PLUSblock.
Good point, I will remove it.
Quoted 48 lines
Quoted 48 lines
arch/arm/mach-omap2/Makefile +6
-0@@ -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_OMAPAM33XX) += irq.o $(hwmod-common) ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),) obj-y += mcbsp.o@@ -93,6 +94,7 @@ obj-$(CONFIG_ARCH_OMAP4) += prcm.o cm2xxx_3xxx.o cminst44xx.o \ cm44xx.o prcm_mpu44xx.o \ prminst44xx.o vc44xx_data.o \ vp44xx_data.o prm44xx.o +obj-$(CONFIG_SOC_OMAPAM33XX) += prcm.o # OMAP voltage domains voltagedomain-common := voltage.o vc.o vp.o@@ -102,6 +104,7 @@ obj-$(CONFIG_ARCH_OMAP3) += $(voltagedomain-common) \ voltagedomains3xxx_data.o obj-$(CONFIG_ARCH_OMAP4) += $(voltagedomain-common) \ voltagedomains44xx_data.o +obj-$(CONFIG_SOC_OMAPAM33XX) += $(voltagedomain-common) # OMAP powerdomain framework powerdomain-common += powerdomain.o powerdomain-common.o@@ -116,6 +119,7 @@ obj-$(CONFIG_ARCH_OMAP3) += $(powerdomain-common) \ obj-$(CONFIG_ARCH_OMAP4) += $(powerdomain-common) \ powerdomain44xx.o \ powerdomains44xx_data.o +obj-$(CONFIG_SOC_OMAPAM33XX) += $(powerdomain-common) # PRCM clockdomain control clockdomain-common += clockdomain.o \@@ -132,6 +136,7 @@ obj-$(CONFIG_ARCH_OMAP3) += $(clockdomain-common) \ obj-$(CONFIG_ARCH_OMAP4) += $(clockdomain-common) \ clockdomain44xx.o \ clockdomains44xx_data.o +obj-$(CONFIG_SOC_OMAPAM33XX) += $(clockdomain-common) # Clock framework obj-$(CONFIG_ARCH_OMAP2) += $(clock-common) clock2xxx.o \@@ -149,6 +154,7 @@ obj-$(CONFIG_ARCH_OMAP3) += $(clock-common) clock3xxx.o \ clkt_iclk.o obj-$(CONFIG_ARCH_OMAP4) += $(clock-common) clock44xx_data.o \ dpll3xxx.o dpll44xx.o +obj-$(CONFIG_SOC_OMAPAM33XX) += $(clock-common) dpll3xxx.o
Quoted 7 lines
arch/arm/mach-omap2/Makefile obj-$(CONFIG_ARCH_OMAP3) += $(clock-common) clock3xxx.o \ · line 160
Quoted 2 lines
arch/arm/mach-omap2/Makefile +0
-0# OMAP2 clock rate set data (old "OPP" data) obj-$(CONFIG_SOC_OMAP2420) += opp2420_data.oCan you please rebase this on what's now in the cleanup branch at commit
382ae00105d9989a821f458084e0428bce10b969? That should simplify theMakefilechanges a bit.
Yes, will do it and submit next version today.
Quoted 2 lines
Other than that looks good to me.
Thanks,
Vaibhav
PATCH 1/1 ARM: OMAP2+: am33xx: Make am33xx as a separate class
In reply to Vaibhav HiremathQuoted 8 lines · Vaibhav Hiremath
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).
Quoted 5 lines
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 onlycpu_is_am33xx()will be true.
Not directly related to this patch, but does anyone have any objection to dropping the OMAP from the SOC_ names for AM33xx and TI81XX?
I'll post a series shortly to do so.
Kevin
Tony Lindgren
maintainerPATCH 1/1 ARM: OMAP2+: am33xx: Make am33xx as a separate class
Quoted 16 lines · Kevin Hilman
Quoted 8 lines · Vaibhav Hiremath
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).Quoted 5 lines
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 onlycpu_is_am33xx()will be true.
Quoted 4 lines
Not directly related to this patch, but does anyone have any objection to dropping the OMAP from the
SOC_names for AM33xx and TI81XX?I'll post a series shortly to do so.
No objection.
Tony