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

 board/omap3530beagle/omap3530beagle.c :97:u32 get_sysboot_value(void)
 board/omap3evm/omap3evm.c             :84:u32 get_sysboot_value(void)
 board/overo/overo.c                   :95:u32 get_sysboot_value(void)

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

index a564e4a..b8656f5 100644 (file)
@@ -91,16 +91,6 @@ int board_init(void)
        return 0;
 }
 
-/************************************************
- * get_sysboot_value(void) - return SYS_BOOT[4:0]
- ************************************************/
-u32 get_sysboot_value(void)
-{
-       int mode;
-       mode = __raw_readl(CONTROL_STATUS) & (SYSBOOT_MASK);
-       return mode;
-}
-
 /*************************************************************
  * Routine: get_mem_type(void) - returns the kind of memory connected
  * to GPMC that we are trying to boot form. Uses SYS BOOT settings.
index c225ac1..27aed09 100644 (file)
@@ -78,15 +78,6 @@ int board_init (void)
        return 0;
 }
 
-/************************************************
- * get_sysboot_value(void) - return SYS_BOOT[4:0]
- ************************************************/
-u32 get_sysboot_value(void)
-{
-        int mode;
-        mode = __raw_readl(CONTROL_STATUS) & (SYSBOOT_MASK);
-        return mode;
-}
 /*************************************************************
  * Routine: get_mem_type(void) - returns the kind of memory connected
  * to GPMC that we are trying to boot form. Uses SYS BOOT settings.
index d09b594..0beda9b 100644 (file)
@@ -89,16 +89,6 @@ int board_init(void)
        return 0;
 }
 
-/************************************************
- * get_sysboot_value(void) - return SYS_BOOT[4:0]
- ************************************************/
-u32 get_sysboot_value(void)
-{
-       int mode;
-       mode = __raw_readl(CONTROL_STATUS) & (SYSBOOT_MASK);
-       return mode;
-}
-
 /*************************************************************
  * Routine: get_mem_type(void) - returns the kind of memory connected
  * to GPMC that we are trying to boot form. Uses SYS BOOT settings.
index 56b6c4d..87d4c15 100644 (file)
@@ -198,3 +198,13 @@ int print_cpuinfo(void)
 
        return 0;
 }
+
+/*
+ * get_sysboot_value(void): return SYS_BOOT[4:0]
+ */
+u32 get_sysboot_value(void)
+{
+       int mode;
+       mode = __raw_readl(CONTROL_STATUS) & (SYSBOOT_MASK);
+       return mode;
+}