summaryrefslogtreecommitdiffstats
path: root/board
diff options
context:
space:
mode:
authorEnric Balletbo i Serra <eballetbo@gmail.com>2011-05-25 09:50:10 +0200
committerAnand Gadiyar <gadiyar@ti.com>2011-07-14 17:40:48 +0530
commitcdfc6fa722735fb6083dee0f139dcef00eb88809 (patch)
tree792935742b9356e3973ecfa5a6bf8988bdb63940 /board
parent63728cc5f4f6b9a590ff90d64f0fe0d53345c018 (diff)
downloadx-loader-sniper-cdfc6fa722735fb6083dee0f139dcef00eb88809.tar.gz
x-loader-sniper-cdfc6fa722735fb6083dee0f139dcef00eb88809.tar.bz2
x-loader-sniper-cdfc6fa722735fb6083dee0f139dcef00eb88809.zip
OMAP3: Move get_cpu_id() function to not duplicate code
The get_cpu_id() function is implemented by various boards, this patch moves this function to a common place to not duplicate code. board/igep00x0/igep00x0.c :100:u32 get_cpu_id(void) board/overo/overo.c :165:u32 get_cpu_id(void) Signed-off-by: Enric Balletbo i Serra <eballetbo@gmail.com> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Diffstat (limited to 'board')
-rw-r--r--board/igep00x0/igep00x0.c23
-rw-r--r--board/overo/overo.c23
2 files changed, 0 insertions, 46 deletions
diff --git a/board/igep00x0/igep00x0.c b/board/igep00x0/igep00x0.c
index b9a1dcd..bb45637 100644
--- a/board/igep00x0/igep00x0.c
+++ b/board/igep00x0/igep00x0.c
@@ -93,29 +93,6 @@ u32 get_mem_type(void)
return GPMC_ONENAND;
}
-/******************************************
- * get_cpu_id(void) - extract cpu id
- * returns 0 for ES1.0, cpuid otherwise
- ******************************************/
-u32 get_cpu_id(void)
-{
- u32 cpuid = 0;
-
- /*
- * On ES1.0 the IDCODE register is not exposed on L4
- * so using CPU ID to differentiate between ES1.0 and > ES1.0.
- */
- __asm__ __volatile__("mrc p15, 0, %0, c0, c0, 0":"=r"(cpuid));
- if ((cpuid & 0xf) == 0x0) {
- return 0;
- } else {
- /* Decode the IDs on > ES1.0 */
- cpuid = __raw_readl(CONTROL_IDCODE);
- }
-
- return cpuid;
-}
-
/*****************************************************************
* sr32 - clear & set a value in a bit range for a 32 bit address
*****************************************************************/
diff --git a/board/overo/overo.c b/board/overo/overo.c
index b157b0e..165c503 100644
--- a/board/overo/overo.c
+++ b/board/overo/overo.c
@@ -159,29 +159,6 @@ u32 get_mem_type(void)
}
/******************************************
- * get_cpu_id(void) - extract cpu id
- * returns 0 for ES1.0, cpuid otherwise
- ******************************************/
-u32 get_cpu_id(void)
-{
- u32 cpuid = 0;
-
- /*
- * On ES1.0 the IDCODE register is not exposed on L4
- * so using CPU ID to differentiate between ES1.0 and > ES1.0.
- */
- __asm__ __volatile__("mrc p15, 0, %0, c0, c0, 0":"=r"(cpuid));
- if ((cpuid & 0xf) == 0x0) {
- return 0;
- } else {
- /* Decode the IDs on > ES1.0 */
- cpuid = __raw_readl(CONTROL_IDCODE);
- }
-
- return cpuid;
-}
-
-/******************************************
* get_cpu_family(void) - extract cpu info
******************************************/
u32 get_cpu_family(void)