* [U-Boot] [PATCH] OMAP3SOM BOARD: Auto detect Logic PD Models
@ 2016-02-12 1:41 Adam Ford
2016-02-12 15:42 ` Tom Rini
2016-02-15 22:37 ` [U-Boot] " Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Adam Ford @ 2016-02-12 1:41 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] OMAP3SOM BOARD: Auto detect Logic PD Models
2016-02-12 1:41 [U-Boot] [PATCH] OMAP3SOM BOARD: Auto detect Logic PD Models Adam Ford
@ 2016-02-12 15:42 ` Tom Rini
2016-02-15 22:37 ` [U-Boot] " Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2016-02-12 15:42 UTC (permalink / raw)
To: u-boot
On Thu, Feb 11, 2016 at 07:41:26PM -0600, Adam Ford wrote:
> 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>
Reviewed-by: Tom Rini <trini@konsulko.com>
> #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
> #define CONFIG_SETUP_MEMORY_TAGS
> --
> 1.9.1
>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160212/4f275a44/attachment.sig>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] OMAP3SOM BOARD: Auto detect Logic PD Models
2016-02-12 1:41 [U-Boot] [PATCH] OMAP3SOM BOARD: Auto detect Logic PD Models Adam Ford
2016-02-12 15:42 ` Tom Rini
@ 2016-02-15 22:37 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2016-02-15 22:37 UTC (permalink / raw)
To: u-boot
On Thu, Feb 11, 2016 at 07:41:26PM -0600, Adam Ford wrote:
> 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>
> Reviewed-by: Tom Rini <trini@konsulko.com>
Now that I try and apply it, I see:
+(omap3_logic) }
+(omap3_logic) ^
w+(omap3_logic) board/logicpd/omap3som/omap3logic.c: In function 'board_late_init':
w+(omap3_logic) board/logicpd/omap3som/omap3logic.c:248:1: warning: control reaches end of non-void function [-Wreturn-type]
With newer GCC as there's no default case here.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160215/30ae4ba7/attachment.sig>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-15 22:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-12 1:41 [U-Boot] [PATCH] OMAP3SOM BOARD: Auto detect Logic PD Models Adam Ford
2016-02-12 15:42 ` Tom Rini
2016-02-15 22:37 ` [U-Boot] " Tom Rini
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.