From: Enric Balletbo i Serra Date: Wed, 25 May 2011 08:19:59 +0000 (+0200) Subject: OMAP3: Move get_sysboot_value() function to not duplicate code X-Git-Tag: v1.5.1~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2893e5dfc1716f9a869d389991d424ba3f0efcf7;p=pandora-x-loader.git OMAP3: Move get_sysboot_value() function to not duplicate code 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 Signed-off-by: Anand Gadiyar --- diff --git a/board/omap3530beagle/omap3530beagle.c b/board/omap3530beagle/omap3530beagle.c index a564e4a..b8656f5 100644 --- a/board/omap3530beagle/omap3530beagle.c +++ b/board/omap3530beagle/omap3530beagle.c @@ -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. diff --git a/board/omap3evm/omap3evm.c b/board/omap3evm/omap3evm.c index c225ac1..27aed09 100644 --- a/board/omap3evm/omap3evm.c +++ b/board/omap3evm/omap3evm.c @@ -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. diff --git a/board/overo/overo.c b/board/overo/overo.c index d09b594..0beda9b 100644 --- a/board/overo/overo.c +++ b/board/overo/overo.c @@ -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. diff --git a/cpu/omap3/sys_info.c b/cpu/omap3/sys_info.c index 56b6c4d..87d4c15 100644 --- a/cpu/omap3/sys_info.c +++ b/cpu/omap3/sys_info.c @@ -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; +}