summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2016-12-23 12:01:06 +0800
committerYe Li <ye.li@nxp.com>2016-12-23 15:10:41 +0800
commit1826d6e4dc732521190c742f812193be95eea211 (patch)
tree648e9608b19969bd57a95dd986f8351db31eb89b
parent9396585ad4b1323b25d14999d8fffae3c4c78d5a (diff)
downloadu-boot-imx-1826d6e4dc732521190c742f812193be95eea211.zip
u-boot-imx-1826d6e4dc732521190c742f812193be95eea211.tar.gz
u-boot-imx-1826d6e4dc732521190c742f812193be95eea211.tar.bz2
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>
-rw-r--r--arch/arm/cpu/armv7/mx7ulp/soc.c38
-rw-r--r--include/configs/mx7ulp_evk.h2
2 files changed, 40 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/mx7ulp/soc.c b/arch/arm/cpu/armv7/mx7ulp/soc.c
index 4c77e84..09e6851 100644
--- a/arch/arm/cpu/armv7/mx7ulp/soc.c
+++ b/arch/arm/cpu/armv7/mx7ulp/soc.c
@@ -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
diff --git a/include/configs/mx7ulp_evk.h b/include/configs/mx7ulp_evk.h
index 8371204..c8a1eff 100644
--- a/include/configs/mx7ulp_evk.h
+++ b/include/configs/mx7ulp_evk.h
@@ -292,4 +292,6 @@
#define CONFIG_QSPI_MEMMAP_BASE QSPI0_AMBA_BASE
#endif
+#define CONFIG_OF_SYSTEM_SETUP
+
#endif /* __CONFIG_H */