ARM: OMAP2+: id: Add am33xx SoC type detection
authorAfzal Mohammed <afzal@ti.com>
Tue, 6 Mar 2012 00:11:01 +0000 (16:11 -0800)
committerTony Lindgren <tony@atomide.com>
Tue, 6 Mar 2012 00:11:01 +0000 (16:11 -0800)
Determine SoC type, i.e. whether GP or HS

Note: cpu_is_34xx() is true for am33xx also. Doing
cpu_is_am33xx() check after cpu_is_34xx() will not
achieve what we want due to the above reason.
Hence cpu_is_am33xx() is done before cpu_is_34xx()

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/control.h
arch/arm/mach-omap2/id.c

index 0ba68d3764bc932b3ff85091203559b5f0d323be..96c4bcc0a75c908ea5f3f6227e020bfb0819e10a 100644 (file)
 #define AM35XX_HECC_SW_RST             BIT(3)
 #define AM35XX_VPFE_PCLK_SW_RST                BIT(4)
 
+/*
+ * CONTROL AM33XX STATUS register
+ */
+#define AM33XX_CONTROL_STATUS          0x040
+
 /*
  * CONTROL OMAP STATUS register to identify OMAP3 features
  */
index 6c5826605eaec5792b5f93c137fc9e32c2bc9f9f..13473975110785446b0b6ef4624bf7f913261924 100644 (file)
@@ -44,6 +44,8 @@ int omap_type(void)
 
        if (cpu_is_omap24xx()) {
                val = omap_ctrl_readl(OMAP24XX_CONTROL_STATUS);
+       } else if (cpu_is_am33xx()) {
+               val = omap_ctrl_readl(AM33XX_CONTROL_STATUS);
        } else if (cpu_is_omap34xx()) {
                val = omap_ctrl_readl(OMAP343X_CONTROL_STATUS);
        } else if (cpu_is_omap44xx()) {