Browse Source

MLK-13645 mx7ulp: Modify FDT file to disable SD3.0 for mfgtool

Since the SD3.0 kernel driver needs M4 image support, this causes problem to mfgtool.
To decouple the relationship, we modify the FDT file in u-boot to disable
SD3.0 when booting for mfgtool. So the kernel won't depend on M4 image.

Signed-off-by: Ye Li <ye.li@nxp.com>
Tested-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit 1826d6e4dc)
imx_v2016.03_4.1.30_7ulp_alpha
Ye Li 4 years ago
parent
commit
fdabb31ca9
2 changed files with 40 additions and 0 deletions
  1. +38
    -0
      arch/arm/cpu/armv7/mx7ulp/soc.c
  2. +2
    -0
      include/configs/mx7ulp_evk.h

+ 38
- 0
arch/arm/cpu/armv7/mx7ulp/soc.c View File

@ -10,6 +10,7 @@
#include <asm/arch/sys_proto.h>
#include <dm.h>
#include <asm/imx-common/hab.h>
#include <fdt_support.h>
struct lpuart_serial_platdata {
void *reg;
@ -341,3 +342,40 @@ int mmc_get_env_dev(void)
return board_mmc_get_env_dev(devno);
}
#endif
#ifdef CONFIG_OF_SYSTEM_SETUP
int ft_system_setup(void *blob, bd_t *bd)
{
#if !defined(CONFIG_FSL_FASTBOOT) && defined(is_boot_from_usb)
if (is_boot_from_usb()) {
int rc;
int nodeoff = fdt_path_offset(blob, "/ahb-bridge0@40000000/usdhc@40370000");
if (nodeoff < 0)
return 0; /* Not found, skip it */
printf("Found usdhc0 node\n");
if (fdt_get_property(blob, nodeoff, "vqmmc-supply", NULL) != NULL) {
rc = fdt_delprop(blob, nodeoff, "vqmmc-supply");
if (!rc) {
printf("Removed vqmmc-supply property\n");
add:
rc = fdt_setprop(blob, nodeoff, "no-1-8-v", NULL, 0);
if (rc == -FDT_ERR_NOSPACE) {
rc = fdt_increase_size(blob, 32);
if (!rc)
goto add;
} else if (rc) {
printf("Failed to add no-1-8-v property, %d\n", rc);
} else {
printf("Added no-1-8-v property\n");
}
} else {
printf("Failed to remove vqmmc-supply property, %d\n", rc);
}
}
}
#endif
return 0;
}
#endif

+ 2
- 0
include/configs/mx7ulp_evk.h View File

@ -292,4 +292,6 @@
#define CONFIG_QSPI_MEMMAP_BASE QSPI0_AMBA_BASE
#endif
#define CONFIG_OF_SYSTEM_SETUP
#endif /* __CONFIG_H */

Loading…
Cancel
Save