From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Wed, 12 Nov 2014 09:19:18 +0100 Subject: [U-Boot] [PATCH] mx53loco: Change 'fdt_file' dynamically In-Reply-To: <1415648299-11263-1-git-send-email-festevam@gmail.com> References: <1415648299-11263-1-git-send-email-festevam@gmail.com> Message-ID: <54631806.4060206@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Fabio, On 10/11/2014 20:38, Fabio Estevam wrote: > From: Fabio Estevam > > Since kernel 3.15 there are two dtb's for the imx53-qsb board: > > imx53-qsb.dtb - For the boards with DA9053 PMIC > imx53-qsrb.dtb - For the boards with MC34708 PMIC > > Change the 'fdt_file' dynamically, so that the correct dtb can be used depending > on the board variant. > > Signed-off-by: Fabio Estevam > --- > board/freescale/mx53loco/mx53loco.c | 4 ++++ > include/configs/mx53loco.h | 1 - > 2 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c > index b32a97f..7569ded 100644 > --- a/board/freescale/mx53loco/mx53loco.c > +++ b/board/freescale/mx53loco/mx53loco.c > @@ -242,6 +242,8 @@ static int power_init(void) > if (!p) > return -ENODEV; > > + setenv("fdt_file", "imx53-qsb.dtb"); > + Generally, I do not find a good idea to overwrite the environment in code. A user (I mean, a developer) becomes crazy if the environment he has previously set with "setenv" and "saveenv" has no worth, because some part of code has overwritten. Let's think to a developer working with kernel and not with U-Boot, and he has several DTB, depending on what he want to do. Anyway, I understand that this helps for a ready-to-use board. I won't NACK the patch, and you as maintainer of the board are in the best position to decide, but I want only to ask you what do you think in such as a case before applying. Thanks, Stefano -- ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================