summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2016-12-23 12:01:06 +0800
committerYe Li <ye.li@nxp.com>2017-04-05 17:24:32 +0800
commit589812f232a7a07873a74e5506153977ce11dce2 (patch)
tree2075e6854713e802577b617f87eb0ef71d02e5f9 /arch
parent8dc963c970f81f9cdefff0955eba6b27ca7dc17e (diff)
downloadu-boot-imx-589812f232a7a07873a74e5506153977ce11dce2.zip
u-boot-imx-589812f232a7a07873a74e5506153977ce11dce2.tar.gz
u-boot-imx-589812f232a7a07873a74e5506153977ce11dce2.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> (cherry picked from commit 1826d6e4dc732521190c742f812193be95eea211)
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/cpu/armv7/mx7ulp/soc.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/mx7ulp/soc.c b/arch/arm/cpu/armv7/mx7ulp/soc.c
index d0f4897..a6118af 100644
--- a/arch/arm/cpu/armv7/mx7ulp/soc.c
+++ b/arch/arm/cpu/armv7/mx7ulp/soc.c
@@ -9,6 +9,7 @@
#include <asm/sections.h>
#include <asm/arch/sys_proto.h>
#include <asm/imx-common/hab.h>
+#include <fdt_support.h>
static char *get_reset_cause(char *);
@@ -288,3 +289,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