diff options
author | Adam Ford <aford173@gmail.com> | 2016-02-17 21:49:49 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-02-24 18:44:00 -0500 |
commit | 26ef7a27dade2c4cdf16579c8dc1375e0635face (patch) | |
tree | 55c806af2be487cdea068f75c0c4a616869b6196 /board/logicpd | |
parent | b1309a23e0e5eca1d980e4d88080d02f2d36219f (diff) | |
download | u-boot-imx-26ef7a27dade2c4cdf16579c8dc1375e0635face.zip u-boot-imx-26ef7a27dade2c4cdf16579c8dc1375e0635face.tar.gz u-boot-imx-26ef7a27dade2c4cdf16579c8dc1375e0635face.tar.bz2 |
OMAP3SOM BOARD: Auto detect Logic PD Models
Logic PD makes four different system on modules. This patch will auto
detect the board type and identify the corresponding device tree image.
V2:
Added 'default:' case to switch statement
Since board_late_init() is defined as int, we now return 0
Signed-off-by: Derald Woods <woods.technical@gmail.com>
Signed-off-by: Adam Ford <aford173@gmail.com>
Diffstat (limited to 'board/logicpd')
-rw-r--r-- | board/logicpd/omap3som/omap3logic.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/board/logicpd/omap3som/omap3logic.c b/board/logicpd/omap3som/omap3logic.c index b5c44f9..668f684 100644 --- a/board/logicpd/omap3som/omap3logic.c +++ b/board/logicpd/omap3som/omap3logic.c @@ -228,6 +228,30 @@ 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; + default: + /* unknown machine type */ + break; + } + return 0; +} +#endif + #if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD) int board_mmc_init(bd_t *bis) { |