OMAP3SOM BOARD: Auto detect Logic PD Models
PATCH v2 1/1 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
--- board/logicpd/omap3som/omap3logic.c | 24 ++++++++++++++++++++++++ include/configs/omap3_logic.h | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-)
board/logicpd/omap3som/omap3logic.c +24 -0
@@ -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) {
include/configs/omap3_logic.h +1 -1
@@ -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
Signature · 1 line
1.9.1
PATCH v2 1/1 OMAP3SOM BOARD: Auto detect Logic PD Models
Tom,
Just a gentle nudge to see if I've addressed all your previous concerns. There is a default case and a return code since the function is defined as int.
adam
Quoted 65 lines · Adam Ford
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
Sinceboard_late_init()is defined as int, we now return 0Signed-off-by Derald Woods <[email protected]>Signed-off-by Adam Ford <[email protected]>--- board/logicpd/omap3som/omap3logic.c | 24 ++++++++++++++++++++++++ include/configs/omap3_logic.h | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-)board/logicpd/omap3som/omap3logic.c +24
-0@@ -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) {include/configs/omap3_logic.h +1
-2@@ -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
PATCH v2 1/1 OMAP3SOM BOARD: Auto detect Logic PD Models
In reply to Adam FordQuoted 9 lines · Adam Ford
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
Sinceboard_late_init()is defined as int, we now return 0Signed-off-by Derald Woods <[email protected]>Signed-off-by Adam Ford <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
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/20160225/00e82640/attachment.sig>