]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - sitara-epos/sitara-epos-kernel.git/commitdiff
arm:omap:am33xx: Check device features
authorAfzal Mohammed <afzal@ti.com>
Wed, 7 Dec 2011 11:35:43 +0000 (17:05 +0530)
committerAfzal Mohammed <afzal@ti.com>
Tue, 7 Feb 2012 08:10:44 +0000 (13:40 +0530)
Read device feature register and record features
on SOC. Currently only SGX is checked.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
arch/arm/mach-omap2/control.h
arch/arm/mach-omap2/id.c
arch/arm/mach-omap2/io.c
arch/arm/plat-omap/include/plat/cpu.h

index 50da5673e26eba0c48470318de9a74b89c6875ad..8489135df2269bfa5e5c9c0e90badd3262c52b38 100644 (file)
 #define AM33XX_CONTROL_STATUS_OFF      0x040
 #define AM33XX_CONTROL_STATUS          AM33XX_L4_WK_IO_ADDRESS(AM33XX_CTRL_BASE + \
                                                AM33XX_CONTROL_STATUS_OFF)
+#define AM33XX_DEV_FEATURE             0x604
+#define AM33XX_SGX_SHIFT               29
+#define AM33XX_SGX_MASK                        (1 << AM33XX_SGX_SHIFT)
 
 /*
  * CONTROL OMAP STATUS register to identify OMAP3 features
index c66f70056c4c2b84b867d13d5270bd39163dfd74..7b913d37b8d4d8175ed7c4302ddf4e91960eba21 100644 (file)
@@ -286,6 +286,19 @@ void __init ti81xx_check_features(void)
        omap3_cpuinfo();
 }
 
+void __init am33xx_check_features(void)
+{
+       u32 status;
+
+       omap_features = OMAP3_HAS_NEON;
+
+       status = omap_ctrl_readl(AM33XX_DEV_FEATURE);
+       if (status & AM33XX_SGX_MASK)
+               omap_features |= OMAP3_HAS_SGX;
+
+       omap3_cpuinfo();
+}
+
 void __init omap3xxx_check_revision(void)
 {
        u32 cpuid, idcode;
index d891084d6496ad7587a2778876a8cd30d50ff520..0c47b1531cbc3dc763977c75ff193dfa6b1a7488 100644 (file)
@@ -472,7 +472,7 @@ void __init am33xx_init_early(void)
 {
        omap2_set_globals_am33xx();
        omap3xxx_check_revision();
-       ti81xx_check_features();
+       am33xx_check_features();
        omap_common_init_early();
        am33xx_voltagedomains_init();
        am33xx_powerdomains_init();
index 428ccb12d16808fd80cb0e99359e0351fb842809..16aae2be60dcd68d4882a2e199ac4e218574d650 100644 (file)
@@ -456,6 +456,7 @@ void omap3xxx_check_revision(void);
 void omap4xxx_check_revision(void);
 void omap3xxx_check_features(void);
 void ti81xx_check_features(void);
+void am33xx_check_features(void);
 void omap4xxx_check_features(void);
 
 /*