OMAP3: Move get_cpu_type() function to not duplicate code
authorEnric Balletbo i Serra <eballetbo@gmail.com>
Wed, 25 May 2011 07:45:25 +0000 (09:45 +0200)
committerAnand Gadiyar <gadiyar@ti.com>
Thu, 14 Jul 2011 12:10:48 +0000 (17:40 +0530)
The get_cpu_type() function is implemented by various boards, this
patch moves this function to a common place to not duplicate code.

 board/igep00x0/igep00x0.c :99:u32 get_cpu_type(void)
 board/overo/overo.c       :164:u32 get_cpu_type(void)

Signed-off-by: Enric Balletbo i Serra <eballetbo@gmail.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
board/igep00x0/igep00x0.c
board/overo/overo.c
cpu/omap3/sys_info.c

index 1666337..b9a1dcd 100644 (file)
@@ -93,14 +93,6 @@ u32 get_mem_type(void)
        return GPMC_ONENAND;
 }
 
-/******************************************
- * get_cpu_type(void) - extract cpu info
- ******************************************/
-u32 get_cpu_type(void)
-{
-       return __raw_readl(CONTROL_OMAP_STATUS);
-}
-
 /******************************************
  * get_cpu_id(void) - extract cpu id
  * returns 0 for ES1.0, cpuid otherwise
index b942c5b..b157b0e 100644 (file)
@@ -158,14 +158,6 @@ u32 get_mem_type(void)
        }
 }
 
-/******************************************
- * get_cpu_type(void) - extract cpu info
- ******************************************/
-u32 get_cpu_type(void)
-{
-       return __raw_readl(CONTROL_OMAP_STATUS);
-}
-
 /******************************************
  * get_cpu_id(void) - extract cpu id
  * returns 0 for ES1.0, cpuid otherwise
index f6cb65f..49ee4d5 100644 (file)
@@ -33,3 +33,11 @@ u32 get_device_type(void)
        mode = __raw_readl(CONTROL_STATUS) & (DEVICE_MASK);
        return mode >>= 8;
 }
+
+/*
+ *  get_cpu_type(): extract cpu info
+ */
+u32 get_cpu_type(void)
+{
+       return __raw_readl(CONTROL_OMAP_STATUS);
+}