From 63728cc5f4f6b9a590ff90d64f0fe0d53345c018 Mon Sep 17 00:00:00 2001 From: Enric Balletbo i Serra Date: Wed, 25 May 2011 09:45:25 +0200 Subject: [PATCH] OMAP3: Move get_cpu_type() function to not duplicate code 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 Signed-off-by: Anand Gadiyar --- board/igep00x0/igep00x0.c | 8 -------- board/overo/overo.c | 8 -------- cpu/omap3/sys_info.c | 8 ++++++++ 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/board/igep00x0/igep00x0.c b/board/igep00x0/igep00x0.c index 1666337..b9a1dcd 100644 --- a/board/igep00x0/igep00x0.c +++ b/board/igep00x0/igep00x0.c @@ -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 diff --git a/board/overo/overo.c b/board/overo/overo.c index b942c5b..b157b0e 100644 --- a/board/overo/overo.c +++ b/board/overo/overo.c @@ -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 diff --git a/cpu/omap3/sys_info.c b/cpu/omap3/sys_info.c index f6cb65f..49ee4d5 100644 --- a/cpu/omap3/sys_info.c +++ b/cpu/omap3/sys_info.c @@ -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); +} -- 2.39.2