* [PATCH 0/2] ARM: OMAP3: cleanup AM35xx SoC detection
@ 2012-04-30 23:37 Kevin Hilman
2012-04-30 23:37 ` [PATCH 1/2] ARM: OMAP: AM35xx: remove redunant cpu_is checks for AM3505 Kevin Hilman
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Kevin Hilman @ 2012-04-30 23:37 UTC (permalink / raw)
To: linux-arm-kernel
The detection of AM35xx SoCs is confusing and has redundancies. Clean
this up so that SoC detection is only based on SoC family: AM35xx.
Kevin Hilman (2):
ARM: OMAP: AM35xx: remove redunant cpu_is checks for AM3505
ARM: OMAP: AM35xx: convert 3517 detection/flags to AM35xx
arch/arm/mach-omap2/hsmmc.c | 8 ++++----
arch/arm/mach-omap2/id.c | 7 +++----
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 2 +-
arch/arm/mach-omap2/powerdomains3xxx_data.c | 2 +-
arch/arm/mach-omap2/usb-musb.c | 2 +-
arch/arm/mach-omap2/voltagedomains3xxx_data.c | 2 +-
arch/arm/plat-omap/include/plat/cpu.h | 8 ++++++++
7 files changed, 19 insertions(+), 12 deletions(-)
--
1.7.9.2
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 1/2] ARM: OMAP: AM35xx: remove redunant cpu_is checks for AM3505 2012-04-30 23:37 [PATCH 0/2] ARM: OMAP3: cleanup AM35xx SoC detection Kevin Hilman @ 2012-04-30 23:37 ` Kevin Hilman 2012-04-30 23:37 ` [PATCH 2/2] ARM: OMAP: AM35xx: convert 3517 detection/flags to AM35xx Kevin Hilman 2012-05-07 17:33 ` [PATCH 0/2] ARM: OMAP3: cleanup AM35xx SoC detection Kevin Hilman 2 siblings, 0 replies; 8+ messages in thread From: Kevin Hilman @ 2012-04-30 23:37 UTC (permalink / raw) To: linux-arm-kernel There are several checks for AM35x devices done using if (cpu_is_omap3517() || cpu_is_omap3505()) However, since the 3505 is just a 3517 without an SGX, the 3505 check is redundant because cpu_is_omap3517() will always be true whenever cpu_is_omap3505() is true. From <plat/cpu.h>: #define cpu_is_omap3505() (cpu_is_omap3517() && !omap3_has_sgx()) Therefore, remove the redunant 3505 checks. This helps move towards removal of SoC detection that depends on specific IP detection. Acked-by: Vaibhav Hiremath <hvaibhav@ti.com> Tested-by: Vaibhav Hiremath <hvaibhav@ti.com> Tested-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Kevin Hilman <khilman@ti.com> --- arch/arm/mach-omap2/hsmmc.c | 8 ++++---- arch/arm/mach-omap2/usb-musb.c | 2 +- arch/arm/mach-omap2/voltagedomains3xxx_data.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index b0268ea..a8ca655 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c @@ -355,7 +355,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, * * temporary HACK: ocr_mask instead of fixed supply */ - if (cpu_is_omap3505() || cpu_is_omap3517()) + if (cpu_is_omap3517()) mmc->slots[0].ocr_mask = MMC_VDD_165_195 | MMC_VDD_26_27 | MMC_VDD_27_28 | @@ -365,7 +365,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, else mmc->slots[0].ocr_mask = c->ocr_mask; - if (!cpu_is_omap3517() && !cpu_is_omap3505()) + if (!cpu_is_omap3517()) mmc->slots[0].features |= HSMMC_HAS_PBIAS; if (cpu_is_omap44xx() && (omap_rev() > OMAP4430_REV_ES1_0)) @@ -388,7 +388,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, } } - if (cpu_is_omap3517() || cpu_is_omap3505()) + if (cpu_is_omap3517()) mmc->slots[0].set_power = nop_mmc_set_power; /* OMAP3630 HSMMC1 supports only 4-bit */ @@ -400,7 +400,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, } break; case 2: - if (cpu_is_omap3517() || cpu_is_omap3505()) + if (cpu_is_omap3517()) mmc->slots[0].set_power = am35x_hsmmc2_set_power; if (c->ext_clock) diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c index 8d5ed77..bf33b4d 100644 --- a/arch/arm/mach-omap2/usb-musb.c +++ b/arch/arm/mach-omap2/usb-musb.c @@ -90,7 +90,7 @@ void __init usb_musb_init(struct omap_musb_board_data *musb_board_data) musb_plat.mode = board_data->mode; musb_plat.extvbus = board_data->extvbus; - if (cpu_is_omap3517() || cpu_is_omap3505()) { + if (cpu_is_omap3517()) { oh_name = "am35x_otg_hs"; name = "musb-am35x"; } else if (cpu_is_ti81xx()) { diff --git a/arch/arm/mach-omap2/voltagedomains3xxx_data.c b/arch/arm/mach-omap2/voltagedomains3xxx_data.c index 57db203..98ed4d7 100644 --- a/arch/arm/mach-omap2/voltagedomains3xxx_data.c +++ b/arch/arm/mach-omap2/voltagedomains3xxx_data.c @@ -118,7 +118,7 @@ void __init omap3xxx_voltagedomains_init(void) } #endif - if (cpu_is_omap3517() || cpu_is_omap3505()) + if (cpu_is_omap3517()) voltdms = voltagedomains_am35xx; else voltdms = voltagedomains_omap3; -- 1.7.9.2 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] ARM: OMAP: AM35xx: convert 3517 detection/flags to AM35xx 2012-04-30 23:37 [PATCH 0/2] ARM: OMAP3: cleanup AM35xx SoC detection Kevin Hilman 2012-04-30 23:37 ` [PATCH 1/2] ARM: OMAP: AM35xx: remove redunant cpu_is checks for AM3505 Kevin Hilman @ 2012-04-30 23:37 ` Kevin Hilman 2012-05-08 22:15 ` Tony Lindgren 2012-05-07 17:33 ` [PATCH 0/2] ARM: OMAP3: cleanup AM35xx SoC detection Kevin Hilman 2 siblings, 1 reply; 8+ messages in thread From: Kevin Hilman @ 2012-04-30 23:37 UTC (permalink / raw) To: linux-arm-kernel Currently cpu_is_omap3517() actually detects any device in the AM35x family (3517 and no-SGX version 3505.) To make it more clear what is being detected, convert the names from 3517 to AM35xx. This adds a new cpu_is_am35xx() which duplicates the cpu_is_omap3517(). In order to avoid cross-tree dependencies with clock-tree changes, cpu_is_omap3517() is left until the clock changes are merged, at which point cpu_is_omap3517() will be completely removed. Acked-by: Vaibhav Hiremath <hvaibhav@ti.com> Tested-by: Vaibhav Hiremath <hvaibhav@ti.com> Tested-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Kevin Hilman <khilman@ti.com> --- arch/arm/mach-omap2/hsmmc.c | 8 ++++---- arch/arm/mach-omap2/id.c | 7 +++---- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 2 +- arch/arm/mach-omap2/powerdomains3xxx_data.c | 2 +- arch/arm/mach-omap2/usb-musb.c | 2 +- arch/arm/mach-omap2/voltagedomains3xxx_data.c | 2 +- arch/arm/plat-omap/include/plat/cpu.h | 8 ++++++++ 7 files changed, 19 insertions(+), 12 deletions(-) diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index a8ca655..9454347 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c @@ -355,7 +355,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, * * temporary HACK: ocr_mask instead of fixed supply */ - if (cpu_is_omap3517()) + if (cpu_is_am35xx()) mmc->slots[0].ocr_mask = MMC_VDD_165_195 | MMC_VDD_26_27 | MMC_VDD_27_28 | @@ -365,7 +365,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, else mmc->slots[0].ocr_mask = c->ocr_mask; - if (!cpu_is_omap3517()) + if (!cpu_is_am35xx()) mmc->slots[0].features |= HSMMC_HAS_PBIAS; if (cpu_is_omap44xx() && (omap_rev() > OMAP4430_REV_ES1_0)) @@ -388,7 +388,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, } } - if (cpu_is_omap3517()) + if (cpu_is_am35xx()) mmc->slots[0].set_power = nop_mmc_set_power; /* OMAP3630 HSMMC1 supports only 4-bit */ @@ -400,7 +400,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, } break; case 2: - if (cpu_is_omap3517()) + if (cpu_is_am35xx()) mmc->slots[0].set_power = am35x_hsmmc2_set_power; if (c->ext_clock) diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 0e79b7b..d2913e2 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -185,8 +185,7 @@ static void __init omap3_cpuinfo(void) */ if (cpu_is_omap3630()) { cpu_name = "OMAP3630"; - } else if (cpu_is_omap3517()) { - /* AM35xx devices */ + } else if (cpu_is_am35xx()) { cpu_name = (omap3_has_sgx()) ? "AM3517" : "AM3505"; } else if (cpu_is_ti816x()) { cpu_name = "TI816X"; @@ -352,13 +351,13 @@ void __init omap3xxx_check_revision(void) */ switch (rev) { case 0: - omap_revision = OMAP3517_REV_ES1_0; + omap_revision = AM35XX_REV_ES1_0; cpu_rev = "1.0"; break; case 1: /* FALLTHROUGH */ default: - omap_revision = OMAP3517_REV_ES1_1; + omap_revision = AM35XX_REV_ES1_1; cpu_rev = "1.1"; } break; diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index db86ce9..c92df30 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c @@ -3711,7 +3711,7 @@ int __init omap3xxx_hwmod_init(void) rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) { h = omap34xx_hwmods; - } else if (rev == OMAP3517_REV_ES1_0 || rev == OMAP3517_REV_ES1_1) { + } else if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1) { h = am35xx_hwmods; } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 || rev == OMAP3630_REV_ES1_2) { diff --git a/arch/arm/mach-omap2/powerdomains3xxx_data.c b/arch/arm/mach-omap2/powerdomains3xxx_data.c index b7ea468..fb0a0a6 100644 --- a/arch/arm/mach-omap2/powerdomains3xxx_data.c +++ b/arch/arm/mach-omap2/powerdomains3xxx_data.c @@ -311,7 +311,7 @@ void __init omap3xxx_powerdomains_init(void) rev == OMAP3430_REV_ES3_0 || rev == OMAP3630_REV_ES1_0) pwrdm_register_pwrdms(powerdomains_omap3430es2_es3_0); else if (rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2 || - rev == OMAP3517_REV_ES1_0 || rev == OMAP3517_REV_ES1_1 || + rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1 || rev == OMAP3630_REV_ES1_1 || rev == OMAP3630_REV_ES1_2) pwrdm_register_pwrdms(powerdomains_omap3430es3_1plus); else diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c index bf33b4d..ae07060 100644 --- a/arch/arm/mach-omap2/usb-musb.c +++ b/arch/arm/mach-omap2/usb-musb.c @@ -90,7 +90,7 @@ void __init usb_musb_init(struct omap_musb_board_data *musb_board_data) musb_plat.mode = board_data->mode; musb_plat.extvbus = board_data->extvbus; - if (cpu_is_omap3517()) { + if (cpu_is_am35xx()) { oh_name = "am35x_otg_hs"; name = "musb-am35x"; } else if (cpu_is_ti81xx()) { diff --git a/arch/arm/mach-omap2/voltagedomains3xxx_data.c b/arch/arm/mach-omap2/voltagedomains3xxx_data.c index 98ed4d7..f796624 100644 --- a/arch/arm/mach-omap2/voltagedomains3xxx_data.c +++ b/arch/arm/mach-omap2/voltagedomains3xxx_data.c @@ -118,7 +118,7 @@ void __init omap3xxx_voltagedomains_init(void) } #endif - if (cpu_is_omap3517()) + if (cpu_is_am35xx()) voltdms = voltagedomains_am35xx; else voltdms = voltagedomains_omap3; diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index dc6a86b..7b0d8ef 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h @@ -121,6 +121,7 @@ IS_OMAP_CLASS(16xx, 0x16) IS_OMAP_CLASS(24xx, 0x24) IS_OMAP_CLASS(34xx, 0x34) IS_OMAP_CLASS(44xx, 0x44) +IS_AM_CLASS(35xx, 0x35) IS_AM_CLASS(33xx, 0x33) IS_TI_CLASS(81xx, 0x81) @@ -148,6 +149,7 @@ IS_AM_SUBCLASS(335x, 0x335) #define cpu_is_ti81xx() 0 #define cpu_is_ti816x() 0 #define cpu_is_ti814x() 0 +#define cpu_is_am35xx() 0 #define cpu_is_am33xx() 0 #define cpu_is_am335x() 0 #define cpu_is_omap44xx() 0 @@ -357,6 +359,7 @@ IS_OMAP_TYPE(3517, 0x3517) # undef cpu_is_ti81xx # 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() @@ -378,6 +381,7 @@ IS_OMAP_TYPE(3517, 0x3517) # define cpu_is_ti81xx() is_ti81xx() # define cpu_is_ti816x() is_ti816x() # define cpu_is_ti814x() is_ti814x() +# define cpu_is_am35xx() is_am35xx() # define cpu_is_am33xx() is_am33xx() # define cpu_is_am335x() is_am335x() #endif @@ -433,6 +437,10 @@ IS_OMAP_TYPE(3517, 0x3517) #define TI8148_REV_ES2_0 (TI814X_CLASS | (0x1 << 8)) #define TI8148_REV_ES2_1 (TI814X_CLASS | (0x2 << 8)) +#define AM35XX_CLASS 0x35170034 +#define AM35XX_REV_ES1_0 AM35XX_CLASS +#define AM35XX_REV_ES1_1 (AM35XX_CLASS | (0x1 << 8)) + #define AM335X_CLASS 0x33500034 #define AM335X_REV_ES1_0 AM335X_CLASS -- 1.7.9.2 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] ARM: OMAP: AM35xx: convert 3517 detection/flags to AM35xx 2012-04-30 23:37 ` [PATCH 2/2] ARM: OMAP: AM35xx: convert 3517 detection/flags to AM35xx Kevin Hilman @ 2012-05-08 22:15 ` Tony Lindgren 0 siblings, 0 replies; 8+ messages in thread From: Tony Lindgren @ 2012-05-08 22:15 UTC (permalink / raw) To: linux-arm-kernel * Kevin Hilman <khilman@ti.com> [120430 16:40]: > Currently cpu_is_omap3517() actually detects any device in the AM35x > family (3517 and no-SGX version 3505.) To make it more clear what is > being detected, convert the names from 3517 to AM35xx. > > This adds a new cpu_is_am35xx() which duplicates the cpu_is_omap3517(). > In order to avoid cross-tree dependencies with clock-tree changes, > cpu_is_omap3517() is left until the clock changes are merged, > at which point cpu_is_omap3517() will be completely removed. We should start using soc_is_omap instead of cpu_is_omap for the new ones. The old ones we can rename as part of other clean-up. I've updated your patch below accordingly. Regards, Tony From: Kevin Hilman <khilman@ti.com> Date: Mon, 30 Apr 2012 16:37:10 -0700 Subject: [PATCH] ARM: OMAP: AM35xx: convert 3517 detection/flags to AM35xx Currently cpu_is_omap3517() actually detects any device in the AM35x family (3517 and no-SGX version 3505.) To make it more clear what is being detected, convert the names from 3517 to AM35xx. This adds a new soc_is_am35xx() which duplicates the cpu_is_omap3517(). In order to avoid cross-tree dependencies with clock-tree changes, cpu_is_omap3517() is left until the clock changes are merged, at which point cpu_is_omap3517() will be completely removed. Acked-by: Vaibhav Hiremath <hvaibhav@ti.com> Tested-by: Vaibhav Hiremath <hvaibhav@ti.com> Tested-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Kevin Hilman <khilman@ti.com> [tony at atomide.com: change to use soc_is_omap instead] Signed-off-by: Tony Lindgren <tony@atomide.com> diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index a8ca655..be697d4 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c @@ -355,7 +355,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, * * temporary HACK: ocr_mask instead of fixed supply */ - if (cpu_is_omap3517()) + if (soc_is_am35xx()) mmc->slots[0].ocr_mask = MMC_VDD_165_195 | MMC_VDD_26_27 | MMC_VDD_27_28 | @@ -365,7 +365,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, else mmc->slots[0].ocr_mask = c->ocr_mask; - if (!cpu_is_omap3517()) + if (!soc_is_am35xx()) mmc->slots[0].features |= HSMMC_HAS_PBIAS; if (cpu_is_omap44xx() && (omap_rev() > OMAP4430_REV_ES1_0)) @@ -388,7 +388,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, } } - if (cpu_is_omap3517()) + if (soc_is_am35xx()) mmc->slots[0].set_power = nop_mmc_set_power; /* OMAP3630 HSMMC1 supports only 4-bit */ @@ -400,7 +400,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, } break; case 2: - if (cpu_is_omap3517()) + if (soc_is_am35xx()) mmc->slots[0].set_power = am35x_hsmmc2_set_power; if (c->ext_clock) diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 0e79b7b..f611e30 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -185,8 +185,7 @@ static void __init omap3_cpuinfo(void) */ if (cpu_is_omap3630()) { cpu_name = "OMAP3630"; - } else if (cpu_is_omap3517()) { - /* AM35xx devices */ + } else if (soc_is_am35xx()) { cpu_name = (omap3_has_sgx()) ? "AM3517" : "AM3505"; } else if (cpu_is_ti816x()) { cpu_name = "TI816X"; @@ -352,13 +351,13 @@ void __init omap3xxx_check_revision(void) */ switch (rev) { case 0: - omap_revision = OMAP3517_REV_ES1_0; + omap_revision = AM35XX_REV_ES1_0; cpu_rev = "1.0"; break; case 1: /* FALLTHROUGH */ default: - omap_revision = OMAP3517_REV_ES1_1; + omap_revision = AM35XX_REV_ES1_1; cpu_rev = "1.1"; } break; diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 0c65079..43d2880 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c @@ -3224,7 +3224,7 @@ int __init omap3xxx_hwmod_init(void) rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) { h = omap34xx_hwmod_ocp_ifs; - } else if (rev == OMAP3517_REV_ES1_0 || rev == OMAP3517_REV_ES1_1) { + } else if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1) { h = am35xx_hwmod_ocp_ifs; } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 || rev == OMAP3630_REV_ES1_2) { diff --git a/arch/arm/mach-omap2/powerdomains3xxx_data.c b/arch/arm/mach-omap2/powerdomains3xxx_data.c index b7ea468..fb0a0a6 100644 --- a/arch/arm/mach-omap2/powerdomains3xxx_data.c +++ b/arch/arm/mach-omap2/powerdomains3xxx_data.c @@ -311,7 +311,7 @@ void __init omap3xxx_powerdomains_init(void) rev == OMAP3430_REV_ES3_0 || rev == OMAP3630_REV_ES1_0) pwrdm_register_pwrdms(powerdomains_omap3430es2_es3_0); else if (rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2 || - rev == OMAP3517_REV_ES1_0 || rev == OMAP3517_REV_ES1_1 || + rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1 || rev == OMAP3630_REV_ES1_1 || rev == OMAP3630_REV_ES1_2) pwrdm_register_pwrdms(powerdomains_omap3430es3_1plus); else diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c index bf33b4d..b19d1b4 100644 --- a/arch/arm/mach-omap2/usb-musb.c +++ b/arch/arm/mach-omap2/usb-musb.c @@ -90,7 +90,7 @@ void __init usb_musb_init(struct omap_musb_board_data *musb_board_data) musb_plat.mode = board_data->mode; musb_plat.extvbus = board_data->extvbus; - if (cpu_is_omap3517()) { + if (soc_is_am35xx()) { oh_name = "am35x_otg_hs"; name = "musb-am35x"; } else if (cpu_is_ti81xx()) { diff --git a/arch/arm/mach-omap2/voltagedomains3xxx_data.c b/arch/arm/mach-omap2/voltagedomains3xxx_data.c index 98ed4d7..d0103c8 100644 --- a/arch/arm/mach-omap2/voltagedomains3xxx_data.c +++ b/arch/arm/mach-omap2/voltagedomains3xxx_data.c @@ -118,7 +118,7 @@ void __init omap3xxx_voltagedomains_init(void) } #endif - if (cpu_is_omap3517()) + if (soc_is_am35xx()) voltdms = voltagedomains_am35xx; else voltdms = voltagedomains_omap3; diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index dc6a86b..bf90212 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h @@ -121,6 +121,7 @@ IS_OMAP_CLASS(16xx, 0x16) IS_OMAP_CLASS(24xx, 0x24) IS_OMAP_CLASS(34xx, 0x34) IS_OMAP_CLASS(44xx, 0x44) +IS_AM_CLASS(35xx, 0x35) IS_AM_CLASS(33xx, 0x33) IS_TI_CLASS(81xx, 0x81) @@ -148,6 +149,7 @@ IS_AM_SUBCLASS(335x, 0x335) #define cpu_is_ti81xx() 0 #define cpu_is_ti816x() 0 #define cpu_is_ti814x() 0 +#define soc_is_am35xx() 0 #define cpu_is_am33xx() 0 #define cpu_is_am335x() 0 #define cpu_is_omap44xx() 0 @@ -357,6 +359,7 @@ IS_OMAP_TYPE(3517, 0x3517) # undef cpu_is_ti81xx # 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() @@ -378,6 +381,7 @@ IS_OMAP_TYPE(3517, 0x3517) # define cpu_is_ti81xx() is_ti81xx() # define cpu_is_ti816x() is_ti816x() # define cpu_is_ti814x() is_ti814x() +# define soc_is_am35xx() is_am35xx() # define cpu_is_am33xx() is_am33xx() # define cpu_is_am335x() is_am335x() #endif @@ -433,6 +437,10 @@ IS_OMAP_TYPE(3517, 0x3517) #define TI8148_REV_ES2_0 (TI814X_CLASS | (0x1 << 8)) #define TI8148_REV_ES2_1 (TI814X_CLASS | (0x2 << 8)) +#define AM35XX_CLASS 0x35170034 +#define AM35XX_REV_ES1_0 AM35XX_CLASS +#define AM35XX_REV_ES1_1 (AM35XX_CLASS | (0x1 << 8)) + #define AM335X_CLASS 0x33500034 #define AM335X_REV_ES1_0 AM335X_CLASS ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 0/2] ARM: OMAP3: cleanup AM35xx SoC detection 2012-04-30 23:37 [PATCH 0/2] ARM: OMAP3: cleanup AM35xx SoC detection Kevin Hilman 2012-04-30 23:37 ` [PATCH 1/2] ARM: OMAP: AM35xx: remove redunant cpu_is checks for AM3505 Kevin Hilman 2012-04-30 23:37 ` [PATCH 2/2] ARM: OMAP: AM35xx: convert 3517 detection/flags to AM35xx Kevin Hilman @ 2012-05-07 17:33 ` Kevin Hilman 2012-05-08 20:58 ` Tony Lindgren 2 siblings, 1 reply; 8+ messages in thread From: Kevin Hilman @ 2012-05-07 17:33 UTC (permalink / raw) To: linux-arm-kernel Tony, Kevin Hilman <khilman@ti.com> writes: > The detection of AM35xx SoCs is confusing and has redundancies. Clean > this up so that SoC detection is only based on SoC family: AM35xx. Since these aren't PM related, can you queue these with other cleanups for v3.5. This is now independent from the similar changes made to the clock fwk which Paul is queuing. Once both series are merged, I'll have one final patch that removes all users of cpu_is_omap35*. Kevin > Kevin Hilman (2): > ARM: OMAP: AM35xx: remove redunant cpu_is checks for AM3505 > ARM: OMAP: AM35xx: convert 3517 detection/flags to AM35xx > > arch/arm/mach-omap2/hsmmc.c | 8 ++++---- > arch/arm/mach-omap2/id.c | 7 +++---- > arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 2 +- > arch/arm/mach-omap2/powerdomains3xxx_data.c | 2 +- > arch/arm/mach-omap2/usb-musb.c | 2 +- > arch/arm/mach-omap2/voltagedomains3xxx_data.c | 2 +- > arch/arm/plat-omap/include/plat/cpu.h | 8 ++++++++ > 7 files changed, 19 insertions(+), 12 deletions(-) ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 0/2] ARM: OMAP3: cleanup AM35xx SoC detection 2012-05-07 17:33 ` [PATCH 0/2] ARM: OMAP3: cleanup AM35xx SoC detection Kevin Hilman @ 2012-05-08 20:58 ` Tony Lindgren 2012-05-08 21:17 ` Kevin Hilman 0 siblings, 1 reply; 8+ messages in thread From: Tony Lindgren @ 2012-05-08 20:58 UTC (permalink / raw) To: linux-arm-kernel * Kevin Hilman <khilman@ti.com> [120507 10:37]: > Tony, > > Kevin Hilman <khilman@ti.com> writes: > > > The detection of AM35xx SoCs is confusing and has redundancies. Clean > > this up so that SoC detection is only based on SoC family: AM35xx. > > Since these aren't PM related, can you queue these with other cleanups > for v3.5. This is now independent from the similar changes made to the > clock fwk which Paul is queuing. OK applied now to cleanup branch and just pushed out. Had to update them a bit for the hwmod changes done by Paul. > Once both series are merged, I'll have one final patch that removes all > users of cpu_is_omap35*. OK can you please do that one against the current cleanup branch at commit a75bf667d6535af66d34f8d7be0a36aa2a96c56e? Regards, Tony ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 0/2] ARM: OMAP3: cleanup AM35xx SoC detection 2012-05-08 20:58 ` Tony Lindgren @ 2012-05-08 21:17 ` Kevin Hilman 2012-05-08 22:17 ` Tony Lindgren 0 siblings, 1 reply; 8+ messages in thread From: Kevin Hilman @ 2012-05-08 21:17 UTC (permalink / raw) To: linux-arm-kernel Tony Lindgren <tony@atomide.com> writes: > * Kevin Hilman <khilman@ti.com> [120507 10:37]: >> Tony, >> >> Kevin Hilman <khilman@ti.com> writes: >> >> > The detection of AM35xx SoCs is confusing and has redundancies. Clean >> > this up so that SoC detection is only based on SoC family: AM35xx. >> >> Since these aren't PM related, can you queue these with other cleanups >> for v3.5. This is now independent from the similar changes made to the >> clock fwk which Paul is queuing. > > OK applied now to cleanup branch and just pushed out. Had to update them > a bit for the hwmod changes done by Paul. OK, thanks. >> Once both series are merged, I'll have one final patch that removes all >> users of cpu_is_omap35*. > > OK can you please do that one against the current cleanup branch at > commit a75bf667d6535af66d34f8d7be0a36aa2a96c56e? This last "removal" patch depends on the am35x clock changes that are in devel-prcm too. So in order to apply it, I'd need a stable base with your cleanup and devel-prcm branches. It's not a big deal though, it can wait until v3.5 as well. Kevin ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 0/2] ARM: OMAP3: cleanup AM35xx SoC detection 2012-05-08 21:17 ` Kevin Hilman @ 2012-05-08 22:17 ` Tony Lindgren 0 siblings, 0 replies; 8+ messages in thread From: Tony Lindgren @ 2012-05-08 22:17 UTC (permalink / raw) To: linux-arm-kernel * Kevin Hilman <khilman@ti.com> [120508 14:20]: > > This last "removal" patch depends on the am35x clock changes that are in > devel-prcm too. So in order to apply it, I'd need a stable base with > your cleanup and devel-prcm branches. > > It's not a big deal though, it can wait until v3.5 as well. OK let's avoid adding more dependencies if possible.. If it just removes stuff, let's do it at the end of the merge window, or at v3.5-rc1. Regards, Tony ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-05-08 22:17 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-04-30 23:37 [PATCH 0/2] ARM: OMAP3: cleanup AM35xx SoC detection Kevin Hilman 2012-04-30 23:37 ` [PATCH 1/2] ARM: OMAP: AM35xx: remove redunant cpu_is checks for AM3505 Kevin Hilman 2012-04-30 23:37 ` [PATCH 2/2] ARM: OMAP: AM35xx: convert 3517 detection/flags to AM35xx Kevin Hilman 2012-05-08 22:15 ` Tony Lindgren 2012-05-07 17:33 ` [PATCH 0/2] ARM: OMAP3: cleanup AM35xx SoC detection Kevin Hilman 2012-05-08 20:58 ` Tony Lindgren 2012-05-08 21:17 ` Kevin Hilman 2012-05-08 22:17 ` Tony Lindgren
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).