diff options
author | Vaibhav Hiremath <hvaibhav@ti.com> | 2013-05-17 06:13:41 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2013-06-18 06:04:07 -0400 |
commit | 7bcad170154f1302aeeced4f236588091a261fbf (patch) | |
tree | 19f6074a8fffab88ee6c2fbbcc86ba2102f0430b | |
parent | c3ed359c66d49ed59139c61a6284452e94efb215 (diff) |
ARM: OMAP3+: am33xx id: Add new am33xx specific function to check dev_feature
Layout of DEV_FEATURE register (offset = 0x604) is different
between TI81xx and AM33xx device, so create separate function
which will check for features available on specific AM33xx SoC
and set the flags accordingly.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r-- | arch/arm/mach-omap2/control.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/id.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-omap2/io.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/soc.h | 1 |
4 files changed, 19 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h index 35d17a6ec06b..f7d7c2ef1b40 100644 --- a/arch/arm/mach-omap2/control.h +++ b/arch/arm/mach-omap2/control.h | |||
@@ -366,6 +366,10 @@ | |||
366 | #define AM33XX_PWMSS1_TBCLKEN_SHIFT 1 | 366 | #define AM33XX_PWMSS1_TBCLKEN_SHIFT 1 |
367 | #define AM33XX_PWMSS2_TBCLKEN_SHIFT 2 | 367 | #define AM33XX_PWMSS2_TBCLKEN_SHIFT 2 |
368 | 368 | ||
369 | /* DEV Feature register to identify AM33XX features */ | ||
370 | #define AM33XX_DEV_FEATURE 0x604 | ||
371 | #define AM33XX_SGX_MASK BIT(29) | ||
372 | |||
369 | /* CONTROL OMAP STATUS register to identify OMAP3 features */ | 373 | /* CONTROL OMAP STATUS register to identify OMAP3 features */ |
370 | #define OMAP3_CONTROL_OMAP_STATUS 0x044c | 374 | #define OMAP3_CONTROL_OMAP_STATUS 0x044c |
371 | 375 | ||
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 9e5c7cb4a81a..7335eb2bf3fa 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c | |||
@@ -304,6 +304,19 @@ void __init ti81xx_check_features(void) | |||
304 | omap3_cpuinfo(); | 304 | omap3_cpuinfo(); |
305 | } | 305 | } |
306 | 306 | ||
307 | void __init am33xx_check_features(void) | ||
308 | { | ||
309 | u32 status; | ||
310 | |||
311 | omap_features = OMAP3_HAS_NEON; | ||
312 | |||
313 | status = omap_ctrl_readl(AM33XX_DEV_FEATURE); | ||
314 | if (status & AM33XX_SGX_MASK) | ||
315 | omap_features |= OMAP3_HAS_SGX; | ||
316 | |||
317 | omap3_cpuinfo(); | ||
318 | } | ||
319 | |||
307 | void __init omap3xxx_check_revision(void) | 320 | void __init omap3xxx_check_revision(void) |
308 | { | 321 | { |
309 | const char *cpu_rev; | 322 | const char *cpu_rev; |
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index f96215075b92..4c7367404b89 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -576,7 +576,7 @@ void __init am33xx_init_early(void) | |||
576 | omap2_set_globals_prm(AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE)); | 576 | omap2_set_globals_prm(AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE)); |
577 | omap2_set_globals_cm(AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE), NULL); | 577 | omap2_set_globals_cm(AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE), NULL); |
578 | omap3xxx_check_revision(); | 578 | omap3xxx_check_revision(); |
579 | ti81xx_check_features(); | 579 | am33xx_check_features(); |
580 | am33xx_voltagedomains_init(); | 580 | am33xx_voltagedomains_init(); |
581 | am33xx_powerdomains_init(); | 581 | am33xx_powerdomains_init(); |
582 | am33xx_clockdomains_init(); | 582 | am33xx_clockdomains_init(); |
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h index 9cd9414a0afd..8c616e436bc7 100644 --- a/arch/arm/mach-omap2/soc.h +++ b/arch/arm/mach-omap2/soc.h | |||
@@ -449,6 +449,7 @@ void omap4xxx_check_revision(void); | |||
449 | void omap5xxx_check_revision(void); | 449 | void omap5xxx_check_revision(void); |
450 | void omap3xxx_check_features(void); | 450 | void omap3xxx_check_features(void); |
451 | void ti81xx_check_features(void); | 451 | void ti81xx_check_features(void); |
452 | void am33xx_check_features(void); | ||
452 | void omap4xxx_check_features(void); | 453 | void omap4xxx_check_features(void); |
453 | 454 | ||
454 | /* | 455 | /* |