From: Adam Ford <aford173@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] OMAP3SOM BOARD: Auto detect Logic PD Models
Date: Thu, 11 Feb 2016 19:41:26 -0600 [thread overview]
Message-ID: <1455241286-3028-1-git-send-email-aford173@gmail.com> (raw)
Logic PD makes four different system on modules. This patch will auto
detect the board type and identify the corresponding device tree image.
Signed-off-by: Adam Ford <aford173@gmail.com>
---
board/logicpd/omap3som/omap3logic.c | 20 ++++++++++++++++++++
include/configs/omap3_logic.h | 2 +-
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/board/logicpd/omap3som/omap3logic.c b/board/logicpd/omap3som/omap3logic.c
index b5c44f9..86f4196 100644
--- a/board/logicpd/omap3som/omap3logic.c
+++ b/board/logicpd/omap3som/omap3logic.c
@@ -228,6 +228,26 @@ int board_init(void)
return 0;
}
+#ifdef CONFIG_BOARD_LATE_INIT
+int board_late_init(void)
+{
+ switch (gd->bd->bi_arch_number) {
+ case MACH_TYPE_DM3730_TORPEDO:
+ setenv("fdtimage", "logicpd-torpedo-37xx-devkit.dtb");
+ break;
+ case MACH_TYPE_DM3730_SOM_LV:
+ setenv("fdtimage", "logicpd-som-lv-37xx-devkit.dtb");
+ break;
+ case MACH_TYPE_OMAP3_TORPEDO:
+ setenv("fdtimage", "logicpd-torpedo-35xx-devkit.dtb");
+ break;
+ case MACH_TYPE_OMAP3530_LV_SOM:
+ setenv("fdtimage", "logicpd-som-lv-35xx-devkit.dtb");
+ break;
+ }
+}
+#endif
+
#if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
int board_mmc_init(bd_t *bis)
{
diff --git a/include/configs/omap3_logic.h b/include/configs/omap3_logic.h
index fba2a12..0fc9d1c 100644
--- a/include/configs/omap3_logic.h
+++ b/include/configs/omap3_logic.h
@@ -40,7 +40,7 @@
#define CONFIG_DISPLAY_CPUINFO
#define CONFIG_DISPLAY_BOARDINFO
-
+#define CONFIG_BOARD_LATE_INIT
#define CONFIG_MISC_INIT_R /* misc_init_r dumps the die id */
#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
#define CONFIG_SETUP_MEMORY_TAGS
--
1.9.1
next reply other threads:[~2016-02-12 1:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-12 1:41 Adam Ford [this message]
2016-02-12 15:42 ` [U-Boot] [PATCH] OMAP3SOM BOARD: Auto detect Logic PD Models Tom Rini
2016-02-15 22:37 ` [U-Boot] " Tom Rini
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=1455241286-3028-1-git-send-email-aford173@gmail.com \
--to=aford173@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox