ARM: DRA7xx: Do not enable srcomp for DRA7xx Soc's
authorLokesh Vutla <lokeshvutla@ti.com>
Thu, 30 May 2013 03:19:32 +0000 (03:19 +0000)
committerTom Rini <trini@ti.com>
Mon, 10 Jun 2013 12:43:10 +0000 (08:43 -0400)
Slew rate compensation cells are not present for DRA7xx
Soc's. So return from function srcomp_enable() if soc is not
OMAP54xx.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
arch/arm/cpu/armv7/omap5/hwinit.c
arch/arm/include/asm/omap_common.h

index afb700022734b9efa4fa2327eeb3a4e819e55139..40dbf45705ef93cc9a4f4ce6b31037d47015185d 100644 (file)
@@ -201,6 +201,9 @@ void srcomp_enable(void)
        u32 sysclk_ind  = get_sys_clk_index();
        u32 omap_rev    = omap_revision();
 
+       if (!is_omap54xx())
+               return;
+
        mul_factor = srcomp_parameters[sysclk_ind].multiply_factor;
        div_factor = srcomp_parameters[sysclk_ind].divide_factor;
 
index f51fccce5911cff57aca6fa3e974309d8f8260d0..f33f28baf0941dfaa79ff323d5f0671bb8ab027e 100644 (file)
@@ -597,6 +597,14 @@ static inline u32 omap_revision(void)
        extern u32 *const omap_si_rev;
        return *omap_si_rev;
 }
+
+#define OMAP54xx       0x54000000
+
+static inline u8 is_omap54xx(void)
+{
+       extern u32 *const omap_si_rev;
+       return ((*omap_si_rev & 0xFF000000) == OMAP54xx);
+}
 #endif
 
 /*