aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorKeerthy <j-keerthy@ti.com>2015-10-14 01:43:08 -0400
committerTony Lindgren <tony@atomide.com>2015-10-16 13:27:03 -0400
commit3ea4a18288813fe6a283f708c13b60853ddf8bf1 (patch)
tree07b814739500acd908fe39ddd1b44f662237f6b3 /arch/arm/mach-omap2
parentd0b5090575350dd4c9dfde3f81980051031fc9f0 (diff)
ARM: OMAP: Change all cpu_is_* occurences to soc_is_* for id.c
Currently apart from dra7, omap5 and amx3 all the other SoCs are identified using cpu_is_* functions which is not right since they are all SoCs(System on Chips). Hence changing the SoC identification code to use soc_is instead of cpu_is and keeping defines for cpu_is where needed. This allows us to replace the rest of cpu_is usage along with other fixes as needed. Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Keerthy <j-keerthy@ti.com> [tony@atomide.com: reworked the soc.h changes to minimum] Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/id.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 54a5ba54d2ff..8a2ae82cb227 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -57,15 +57,15 @@ int omap_type(void)
57 if (val < OMAP2_DEVICETYPE_MASK) 57 if (val < OMAP2_DEVICETYPE_MASK)
58 return val; 58 return val;
59 59
60 if (cpu_is_omap24xx()) { 60 if (soc_is_omap24xx()) {
61 val = omap_ctrl_readl(OMAP24XX_CONTROL_STATUS); 61 val = omap_ctrl_readl(OMAP24XX_CONTROL_STATUS);
62 } else if (cpu_is_ti81xx()) { 62 } else if (soc_is_ti81xx()) {
63 val = omap_ctrl_readl(TI81XX_CONTROL_STATUS); 63 val = omap_ctrl_readl(TI81XX_CONTROL_STATUS);
64 } else if (soc_is_am33xx() || soc_is_am43xx()) { 64 } else if (soc_is_am33xx() || soc_is_am43xx()) {
65 val = omap_ctrl_readl(AM33XX_CONTROL_STATUS); 65 val = omap_ctrl_readl(AM33XX_CONTROL_STATUS);
66 } else if (cpu_is_omap34xx()) { 66 } else if (soc_is_omap34xx()) {
67 val = omap_ctrl_readl(OMAP343X_CONTROL_STATUS); 67 val = omap_ctrl_readl(OMAP343X_CONTROL_STATUS);
68 } else if (cpu_is_omap44xx()) { 68 } else if (soc_is_omap44xx()) {
69 val = omap_ctrl_readl(OMAP4_CTRL_MODULE_CORE_STATUS); 69 val = omap_ctrl_readl(OMAP4_CTRL_MODULE_CORE_STATUS);
70 } else if (soc_is_omap54xx() || soc_is_dra7xx()) { 70 } else if (soc_is_omap54xx() || soc_is_dra7xx()) {
71 val = omap_ctrl_readl(OMAP5XXX_CONTROL_STATUS); 71 val = omap_ctrl_readl(OMAP5XXX_CONTROL_STATUS);
@@ -122,7 +122,7 @@ static u16 tap_prod_id;
122 122
123void omap_get_die_id(struct omap_die_id *odi) 123void omap_get_die_id(struct omap_die_id *odi)
124{ 124{
125 if (cpu_is_omap44xx() || soc_is_omap54xx() || soc_is_dra7xx()) { 125 if (soc_is_omap44xx() || soc_is_omap54xx() || soc_is_dra7xx()) {
126 odi->id_0 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_0); 126 odi->id_0 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_0);
127 odi->id_1 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_1); 127 odi->id_1 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_1);
128 odi->id_2 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_2); 128 odi->id_2 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_2);
@@ -218,17 +218,17 @@ static void __init omap3_cpuinfo(void)
218 * on available features. Upon detection, update the CPU id 218 * on available features. Upon detection, update the CPU id
219 * and CPU class bits. 219 * and CPU class bits.
220 */ 220 */
221 if (cpu_is_omap3630()) { 221 if (soc_is_omap3630()) {
222 cpu_name = "OMAP3630"; 222 cpu_name = "OMAP3630";
223 } else if (soc_is_am35xx()) { 223 } else if (soc_is_am35xx()) {
224 cpu_name = (omap3_has_sgx()) ? "AM3517" : "AM3505"; 224 cpu_name = (omap3_has_sgx()) ? "AM3517" : "AM3505";
225 } else if (cpu_is_ti816x()) { 225 } else if (soc_is_ti816x()) {
226 cpu_name = "TI816X"; 226 cpu_name = "TI816X";
227 } else if (soc_is_am335x()) { 227 } else if (soc_is_am335x()) {
228 cpu_name = "AM335X"; 228 cpu_name = "AM335X";
229 } else if (soc_is_am437x()) { 229 } else if (soc_is_am437x()) {
230 cpu_name = "AM437x"; 230 cpu_name = "AM437x";
231 } else if (cpu_is_ti814x()) { 231 } else if (soc_is_ti814x()) {
232 cpu_name = "TI814X"; 232 cpu_name = "TI814X";
233 } else if (omap3_has_iva() && omap3_has_sgx()) { 233 } else if (omap3_has_iva() && omap3_has_sgx()) {
234 /* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */ 234 /* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */
@@ -275,11 +275,11 @@ void __init omap3xxx_check_features(void)
275 OMAP3_CHECK_FEATURE(status, SGX); 275 OMAP3_CHECK_FEATURE(status, SGX);
276 OMAP3_CHECK_FEATURE(status, NEON); 276 OMAP3_CHECK_FEATURE(status, NEON);
277 OMAP3_CHECK_FEATURE(status, ISP); 277 OMAP3_CHECK_FEATURE(status, ISP);
278 if (cpu_is_omap3630()) 278 if (soc_is_omap3630())
279 omap_features |= OMAP3_HAS_192MHZ_CLK; 279 omap_features |= OMAP3_HAS_192MHZ_CLK;
280 if (cpu_is_omap3430() || cpu_is_omap3630()) 280 if (soc_is_omap3430() || soc_is_omap3630())
281 omap_features |= OMAP3_HAS_IO_WAKEUP; 281 omap_features |= OMAP3_HAS_IO_WAKEUP;
282 if (cpu_is_omap3630() || omap_rev() == OMAP3430_REV_ES3_1 || 282 if (soc_is_omap3630() || omap_rev() == OMAP3430_REV_ES3_1 ||
283 omap_rev() == OMAP3430_REV_ES3_1_2) 283 omap_rev() == OMAP3430_REV_ES3_1_2)
284 omap_features |= OMAP3_HAS_IO_CHAIN_CTRL; 284 omap_features |= OMAP3_HAS_IO_CHAIN_CTRL;
285 285
@@ -701,7 +701,7 @@ void __init omap2_set_globals_tap(u32 class, void __iomem *tap)
701 tap_base = tap; 701 tap_base = tap;
702 702
703 /* XXX What is this intended to do? */ 703 /* XXX What is this intended to do? */
704 if (cpu_is_omap34xx()) 704 if (soc_is_omap34xx())
705 tap_prod_id = 0x0210; 705 tap_prod_id = 0x0210;
706 else 706 else
707 tap_prod_id = 0x0208; 707 tap_prod_id = 0x0208;
@@ -719,11 +719,11 @@ static const char * const omap_types[] = {
719 719
720static const char * __init omap_get_family(void) 720static const char * __init omap_get_family(void)
721{ 721{
722 if (cpu_is_omap24xx()) 722 if (soc_is_omap24xx())
723 return kasprintf(GFP_KERNEL, "OMAP2"); 723 return kasprintf(GFP_KERNEL, "OMAP2");
724 else if (cpu_is_omap34xx()) 724 else if (soc_is_omap34xx())
725 return kasprintf(GFP_KERNEL, "OMAP3"); 725 return kasprintf(GFP_KERNEL, "OMAP3");
726 else if (cpu_is_omap44xx()) 726 else if (soc_is_omap44xx())
727 return kasprintf(GFP_KERNEL, "OMAP4"); 727 return kasprintf(GFP_KERNEL, "OMAP4");
728 else if (soc_is_omap54xx()) 728 else if (soc_is_omap54xx())
729 return kasprintf(GFP_KERNEL, "OMAP5"); 729 return kasprintf(GFP_KERNEL, "OMAP5");