Commit 68a88b98 authored by Kevin Hilman's avatar Kevin Hilman Committed by Tony Lindgren

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: default avatarVaibhav Hiremath <hvaibhav@ti.com>
Tested-by: default avatarVaibhav Hiremath <hvaibhav@ti.com>
Tested-by: default avatarMark A. Greer <mgreer@animalcreek.com>
Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
[tony@atomide.com: change to use soc_is_omap instead]
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 34107730
...@@ -355,7 +355,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *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 * 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->slots[0].ocr_mask = MMC_VDD_165_195 |
MMC_VDD_26_27 | MMC_VDD_26_27 |
MMC_VDD_27_28 | MMC_VDD_27_28 |
...@@ -365,7 +365,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, ...@@ -365,7 +365,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
else else
mmc->slots[0].ocr_mask = c->ocr_mask; mmc->slots[0].ocr_mask = c->ocr_mask;
if (!cpu_is_omap3517()) if (!soc_is_am35xx())
mmc->slots[0].features |= HSMMC_HAS_PBIAS; mmc->slots[0].features |= HSMMC_HAS_PBIAS;
if (cpu_is_omap44xx() && (omap_rev() > OMAP4430_REV_ES1_0)) 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, ...@@ -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; mmc->slots[0].set_power = nop_mmc_set_power;
/* OMAP3630 HSMMC1 supports only 4-bit */ /* OMAP3630 HSMMC1 supports only 4-bit */
...@@ -400,7 +400,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, ...@@ -400,7 +400,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
} }
break; break;
case 2: case 2:
if (cpu_is_omap3517()) if (soc_is_am35xx())
mmc->slots[0].set_power = am35x_hsmmc2_set_power; mmc->slots[0].set_power = am35x_hsmmc2_set_power;
if (c->ext_clock) if (c->ext_clock)
......
...@@ -185,8 +185,7 @@ static void __init omap3_cpuinfo(void) ...@@ -185,8 +185,7 @@ static void __init omap3_cpuinfo(void)
*/ */
if (cpu_is_omap3630()) { if (cpu_is_omap3630()) {
cpu_name = "OMAP3630"; cpu_name = "OMAP3630";
} else if (cpu_is_omap3517()) { } else if (soc_is_am35xx()) {
/* AM35xx devices */
cpu_name = (omap3_has_sgx()) ? "AM3517" : "AM3505"; cpu_name = (omap3_has_sgx()) ? "AM3517" : "AM3505";
} else if (cpu_is_ti816x()) { } else if (cpu_is_ti816x()) {
cpu_name = "TI816X"; cpu_name = "TI816X";
...@@ -352,13 +351,13 @@ void __init omap3xxx_check_revision(void) ...@@ -352,13 +351,13 @@ void __init omap3xxx_check_revision(void)
*/ */
switch (rev) { switch (rev) {
case 0: case 0:
omap_revision = OMAP3517_REV_ES1_0; omap_revision = AM35XX_REV_ES1_0;
cpu_rev = "1.0"; cpu_rev = "1.0";
break; break;
case 1: case 1:
/* FALLTHROUGH */ /* FALLTHROUGH */
default: default:
omap_revision = OMAP3517_REV_ES1_1; omap_revision = AM35XX_REV_ES1_1;
cpu_rev = "1.1"; cpu_rev = "1.1";
} }
break; break;
......
...@@ -3224,7 +3224,7 @@ int __init omap3xxx_hwmod_init(void) ...@@ -3224,7 +3224,7 @@ int __init omap3xxx_hwmod_init(void)
rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 ||
rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) { rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) {
h = omap34xx_hwmod_ocp_ifs; 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; h = am35xx_hwmod_ocp_ifs;
} else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 || } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 ||
rev == OMAP3630_REV_ES1_2) { rev == OMAP3630_REV_ES1_2) {
......
...@@ -311,7 +311,7 @@ void __init omap3xxx_powerdomains_init(void) ...@@ -311,7 +311,7 @@ void __init omap3xxx_powerdomains_init(void)
rev == OMAP3430_REV_ES3_0 || rev == OMAP3630_REV_ES1_0) rev == OMAP3430_REV_ES3_0 || rev == OMAP3630_REV_ES1_0)
pwrdm_register_pwrdms(powerdomains_omap3430es2_es3_0); pwrdm_register_pwrdms(powerdomains_omap3430es2_es3_0);
else if (rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2 || 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) rev == OMAP3630_REV_ES1_1 || rev == OMAP3630_REV_ES1_2)
pwrdm_register_pwrdms(powerdomains_omap3430es3_1plus); pwrdm_register_pwrdms(powerdomains_omap3430es3_1plus);
else else
......
...@@ -90,7 +90,7 @@ void __init usb_musb_init(struct omap_musb_board_data *musb_board_data) ...@@ -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.mode = board_data->mode;
musb_plat.extvbus = board_data->extvbus; musb_plat.extvbus = board_data->extvbus;
if (cpu_is_omap3517()) { if (soc_is_am35xx()) {
oh_name = "am35x_otg_hs"; oh_name = "am35x_otg_hs";
name = "musb-am35x"; name = "musb-am35x";
} else if (cpu_is_ti81xx()) { } else if (cpu_is_ti81xx()) {
......
...@@ -118,7 +118,7 @@ void __init omap3xxx_voltagedomains_init(void) ...@@ -118,7 +118,7 @@ void __init omap3xxx_voltagedomains_init(void)
} }
#endif #endif
if (cpu_is_omap3517()) if (soc_is_am35xx())
voltdms = voltagedomains_am35xx; voltdms = voltagedomains_am35xx;
else else
voltdms = voltagedomains_omap3; voltdms = voltagedomains_omap3;
......
...@@ -121,6 +121,7 @@ IS_OMAP_CLASS(16xx, 0x16) ...@@ -121,6 +121,7 @@ IS_OMAP_CLASS(16xx, 0x16)
IS_OMAP_CLASS(24xx, 0x24) IS_OMAP_CLASS(24xx, 0x24)
IS_OMAP_CLASS(34xx, 0x34) IS_OMAP_CLASS(34xx, 0x34)
IS_OMAP_CLASS(44xx, 0x44) IS_OMAP_CLASS(44xx, 0x44)
IS_AM_CLASS(35xx, 0x35)
IS_AM_CLASS(33xx, 0x33) IS_AM_CLASS(33xx, 0x33)
IS_TI_CLASS(81xx, 0x81) IS_TI_CLASS(81xx, 0x81)
...@@ -148,6 +149,7 @@ IS_AM_SUBCLASS(335x, 0x335) ...@@ -148,6 +149,7 @@ IS_AM_SUBCLASS(335x, 0x335)
#define cpu_is_ti81xx() 0 #define cpu_is_ti81xx() 0
#define cpu_is_ti816x() 0 #define cpu_is_ti816x() 0
#define cpu_is_ti814x() 0 #define cpu_is_ti814x() 0
#define soc_is_am35xx() 0
#define cpu_is_am33xx() 0 #define cpu_is_am33xx() 0
#define cpu_is_am335x() 0 #define cpu_is_am335x() 0
#define cpu_is_omap44xx() 0 #define cpu_is_omap44xx() 0
...@@ -357,6 +359,7 @@ IS_OMAP_TYPE(3517, 0x3517) ...@@ -357,6 +359,7 @@ IS_OMAP_TYPE(3517, 0x3517)
# undef cpu_is_ti81xx # undef cpu_is_ti81xx
# undef cpu_is_ti816x # undef cpu_is_ti816x
# undef cpu_is_ti814x # undef cpu_is_ti814x
# undef soc_is_am35xx
# undef cpu_is_am33xx # undef cpu_is_am33xx
# undef cpu_is_am335x # undef cpu_is_am335x
# define cpu_is_omap3430() is_omap3430() # define cpu_is_omap3430() is_omap3430()
...@@ -378,6 +381,7 @@ IS_OMAP_TYPE(3517, 0x3517) ...@@ -378,6 +381,7 @@ IS_OMAP_TYPE(3517, 0x3517)
# define cpu_is_ti81xx() is_ti81xx() # define cpu_is_ti81xx() is_ti81xx()
# define cpu_is_ti816x() is_ti816x() # define cpu_is_ti816x() is_ti816x()
# define cpu_is_ti814x() is_ti814x() # define cpu_is_ti814x() is_ti814x()
# define soc_is_am35xx() is_am35xx()
# define cpu_is_am33xx() is_am33xx() # define cpu_is_am33xx() is_am33xx()
# define cpu_is_am335x() is_am335x() # define cpu_is_am335x() is_am335x()
#endif #endif
...@@ -433,6 +437,10 @@ IS_OMAP_TYPE(3517, 0x3517) ...@@ -433,6 +437,10 @@ IS_OMAP_TYPE(3517, 0x3517)
#define TI8148_REV_ES2_0 (TI814X_CLASS | (0x1 << 8)) #define TI8148_REV_ES2_0 (TI814X_CLASS | (0x1 << 8))
#define TI8148_REV_ES2_1 (TI814X_CLASS | (0x2 << 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_CLASS 0x33500034
#define AM335X_REV_ES1_0 AM335X_CLASS #define AM335X_REV_ES1_0 AM335X_CLASS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment