From: Lokesh Vutla Date: Tue, 27 Mar 2018 20:23:52 +0530 Subject: [U-Boot] [PATCH 1/3] board: ti: am43xx: Define embedded_dtb_select for runtime DTB selection in U-boot In-Reply-To: <20180326075703.5834-2-vigneshr@ti.com> References: <20180326075703.5834-1-vigneshr@ti.com> <20180326075703.5834-2-vigneshr@ti.com> Message-ID: <86cd7e1e-ad55-75ae-2654-90f2007e41f9@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Monday 26 March 2018 01:27 PM, Vignesh R wrote: > AM437x QSPI boot is a single stage boot and hence needs runtime DTB > selection to support AM437x-SK and AM437x-IDK with DM enabled. This is > required to move am43xx_evm_qspiboot_defconfig to use DM/DT. > > Signed-off-by: Vignesh R Reviewed-by: Lokesh Vutla Thanks and regards, Lokesh > --- > board/ti/am43xx/board.c | 18 ++++++++++++++++-- > 1 file changed, 16 insertions(+), 2 deletions(-) > > diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c > index 715960a596e9..38af1673273b 100644 > --- a/board/ti/am43xx/board.c > +++ b/board/ti/am43xx/board.c > @@ -852,10 +852,14 @@ int ft_board_setup(void *blob, bd_t *bd) > } > #endif > > -#ifdef CONFIG_SPL_LOAD_FIT > +#if defined(CONFIG_SPL_LOAD_FIT) || defined(CONFIG_DTB_RESELECT) > int board_fit_config_name_match(const char *name) > { > - if (board_is_evm() && !strcmp(name, "am437x-gp-evm")) > + bool eeprom_read = board_ti_was_eeprom_read(); > + > + if (!strcmp(name, "am4372-generic") && !eeprom_read) > + return 0; > + else if (board_is_evm() && !strcmp(name, "am437x-gp-evm")) > return 0; > else if (board_is_sk() && !strcmp(name, "am437x-sk-evm")) > return 0; > @@ -868,6 +872,16 @@ int board_fit_config_name_match(const char *name) > } > #endif > > +#ifdef CONFIG_DTB_RESELECT > +int embedded_dtb_select(void) > +{ > + do_board_detect(); > + fdtdec_setup(); > + > + return 0; > +} > +#endif > + > #ifdef CONFIG_TI_SECURE_DEVICE > void board_fit_image_post_process(void **p_image, size_t *p_size) > { >