]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mx53loco: Change 'fdt_file' dynamically
authorFabio Estevam <fabio.estevam@freescale.com>
Mon, 10 Nov 2014 19:38:19 +0000 (17:38 -0200)
committerStefano Babic <sbabic@denx.de>
Thu, 13 Nov 2014 15:22:26 +0000 (16:22 +0100)
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 <fabio.estevam@freescale.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
board/freescale/mx53loco/mx53loco.c
include/configs/mx53loco.h

index b32a97ff1a58f17fac30dfd51f3a616b083bad93..7569ded8d8215b3ef60dd2e97fe8dd0f4e342edb 100644 (file)
@@ -242,6 +242,8 @@ static int power_init(void)
                if (!p)
                        return -ENODEV;
 
+               setenv("fdt_file", "imx53-qsb.dtb");
+
                /* Set VDDA to 1.25V */
                val = DA9052_BUCKCORE_BCOREEN | DA_BUCKCORE_VBCORE_1_250V;
                ret = pmic_reg_write(p, DA9053_BUCKCORE_REG, val);
@@ -283,6 +285,8 @@ static int power_init(void)
                if (!p)
                        return -ENODEV;
 
+               setenv("fdt_file", "imx53-qsrb.dtb");
+
                /* Set VDDGP to 1.25V for 1GHz on SW1 */
                pmic_reg_read(p, REG_SW_0, &val);
                val = (val & ~SWx_VOLT_MASK_MC34708) | SWx_1_250V_MC34708;
index a74508c5e81849055d20399f1887b7ddd4f73a42..10fb1f49010450e3c6bf8789f4029e0a324a8e67 100644 (file)
 #define CONFIG_EXTRA_ENV_SETTINGS \
        "script=boot.scr\0" \
        "image=zImage\0" \
-       "fdt_file=imx53-qsb.dtb\0" \
        "fdt_addr=0x71000000\0" \
        "boot_fdt=try\0" \
        "ip_dyn=yes\0" \