All of lore.kernel.org
 help / color / mirror / Atom feed
From: nagabhushana.netagunte at ti.com <nagabhushana.netagunte@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] dm646x: pass board revision info to kernel
Date: Wed, 21 Sep 2011 18:10:31 +0530	[thread overview]
Message-ID: <1316608831-31016-3-git-send-email-nagabhushana.netagunte@ti.com> (raw)
In-Reply-To: <1316608831-31016-1-git-send-email-nagabhushana.netagunte@ti.com>

From: Nagabhushana Netagunte <nagabhushana.netagunte@ti.com>

add a function in board file to pass board revision
info to kernel. Revision number 0 and 1 are passed in
case of DM6467 and DM6467T respectively.

Signed-off-by: Nagabhushana Netagunte <nagabhushana.netagunte@ti.com>
---
 board/davinci/dm6467evm/dm6467evm.c  |   19 +++++++++++++++++++
 include/configs/davinci_dm6467Tevm.h |    2 ++
 include/configs/davinci_dm6467evm.h  |    1 +
 3 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/board/davinci/dm6467evm/dm6467evm.c b/board/davinci/dm6467evm/dm6467evm.c
index 1a01c3c..b582e97 100644
--- a/board/davinci/dm6467evm/dm6467evm.c
+++ b/board/davinci/dm6467evm/dm6467evm.c
@@ -24,6 +24,25 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#define REV_DM6446EVM		0
+#define REV_DM6467TEVM		1
+/*
+ * get_board_rev() - setup to pass kernel board revision information
+ * Returns:
+ * bit[0-3]	System clock frequency
+ * 0000b	- 27 MHz
+ * 0001b	- 33 MHz
+ */
+u32 get_board_rev(void)
+{
+
+#ifdef DAVINCI_DM6467TEVM
+	return REV_DM6467TEVM;
+#endif
+
+	return REV_DM6446EVM;
+}
+
 int board_init(void)
 {
 	gd->bd->bi_arch_number = MACH_TYPE_DAVINCI_DM6467_EVM;
diff --git a/include/configs/davinci_dm6467Tevm.h b/include/configs/davinci_dm6467Tevm.h
index 17b9047..d4eaeab 100644
--- a/include/configs/davinci_dm6467Tevm.h
+++ b/include/configs/davinci_dm6467Tevm.h
@@ -22,6 +22,7 @@
 
 /* Spectrum Digital TMS320DM6467T EVM board */
 #define DAVINCI_DM6467EVM
+#define DAVINCI_DM6467TEVM
 #define CONFIG_SYS_USE_NAND
 #define CONFIG_SYS_NAND_SMALLPAGE
 
@@ -64,6 +65,7 @@ extern unsigned int davinci_arm_clk_get(void);
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_SYS_BARGSIZE		1024		/* Bootarg Size */
 #define CONFIG_SYS_LOAD_ADDR		0x80700000	/* kernel address */
+#define CONFIG_REVISION_TAG
 
 /* Serial Driver info */
 #define CONFIG_SYS_NS16550
diff --git a/include/configs/davinci_dm6467evm.h b/include/configs/davinci_dm6467evm.h
index 1fc3544..8b33288 100644
--- a/include/configs/davinci_dm6467evm.h
+++ b/include/configs/davinci_dm6467evm.h
@@ -64,6 +64,7 @@ extern unsigned int davinci_arm_clk_get(void);
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_SYS_BARGSIZE		1024		/* Bootarg Size */
 #define CONFIG_SYS_LOAD_ADDR		0x80700000	/* kernel address */
+#define CONFIG_REVISION_TAG
 
 /* Serial Driver info */
 #define CONFIG_SYS_NS16550
-- 
1.6.2.4

  parent reply	other threads:[~2011-09-21 12:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-21 12:40 [U-Boot] [PATCH 0/2] board revision related patches for dm646x nagabhushana.netagunte at ti.com
2011-09-21 12:40 ` [U-Boot] [PATCH 1/2] dm646x: add new configuration for dm6467T nagabhushana.netagunte at ti.com
2011-09-21 12:40 ` nagabhushana.netagunte at ti.com [this message]
2011-09-23 14:32   ` [U-Boot] [PATCH 2/2] dm646x: pass board revision info to kernel Sergei Shtylyov
2011-10-19 12:38     ` Hadli, Manjunath

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1316608831-31016-3-git-send-email-nagabhushana.netagunte@ti.com \
    --to=nagabhushana.netagunte@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.