summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7/mx7ulp
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/cpu/armv7/mx7ulp')
-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