Patchwork [U-Boot,3/6] da850: pass board revision info to kernel

login
register
mail settings
Submitter nagabhushana.netagunte@ti.com
Date Sept. 30, 2011, 11:24 a.m.
Message ID <1317381867-18981-4-git-send-email-nagabhushana.netagunte@ti.com>
Download mbox | patch
Permalink /patch/117103/
State Superseded
Headers show

Comments

nagabhushana.netagunte@ti.com - Sept. 30, 2011, 11:24 a.m.
From: Nagabhushana Netagunte <nagabhushana.netagunte@ti.com>

there are two boards based on da850 SOC - OMAP-L138 and AM18xx.
In order to differentiate between these two boards, revision id
is passed to kernel via second byte of ATAG_REVISION.

Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
Signed-off-by: Nagabhushana Netagunte <nagabhushana.netagunte@ti.com>
---
 board/davinci/da8xxevm/da850evm.c |    6 +++++-
 include/configs/da850_am18xxevm.h |    1 +
 2 files changed, 6 insertions(+), 1 deletions(-)

Patch

diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c
index 46924d3..29cee37 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -249,6 +249,8 @@  static const struct lpsc_resource lpsc[] = {
 #define CONFIG_DA850_EVM_MAX_CPU_CLK	300000000
 #endif
 
+#define REV_AM18XX_EVM		0x100
+
 /*
  * get_board_rev() - setup to pass kernel board revision information
  * Returns:
@@ -274,7 +276,9 @@  u32 get_board_rev(void)
 		rev = 2;
 	else if (maxcpuclk >= 372000000)
 		rev = 1;
-
+#ifdef CONFIG_DA850_AM18XX_EVM
+	rev |= REV_AM18XX_EVM;
+#endif
 	return rev;
 }
 
diff --git a/include/configs/da850_am18xxevm.h b/include/configs/da850_am18xxevm.h
index 92b83ff..29d580b 100644
--- a/include/configs/da850_am18xxevm.h
+++ b/include/configs/da850_am18xxevm.h
@@ -43,6 +43,7 @@ 
 #define CONFIG_SYS_HZ			1000
 #define CONFIG_SKIP_LOWLEVEL_INIT
 #define CONFIG_SYS_TEXT_BASE		0xc1080000
+#define CONFIG_DA850_AM18XX_EVM
 
 /*
  * Memory Info