diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/boards/at91sam9x5ek/hw_version.c | 2 | ||||
-rw-r--r-- | arch/arm/boards/highbank/init.c | 4 | ||||
-rw-r--r-- | arch/arm/configs/socfpga_defconfig | 1 | ||||
-rw-r--r-- | arch/arm/dts/socfpga.dtsi | 8 | ||||
-rw-r--r-- | arch/arm/mach-imx/ocotp.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-socfpga/generic.c | 38 |
6 files changed, 12 insertions, 42 deletions
diff --git a/arch/arm/boards/at91sam9x5ek/hw_version.c b/arch/arm/boards/at91sam9x5ek/hw_version.c index 37eb1f80c5..2f84d82d5d 100644 --- a/arch/arm/boards/at91sam9x5ek/hw_version.c +++ b/arch/arm/boards/at91sam9x5ek/hw_version.c @@ -235,7 +235,7 @@ static int cm_cogent_fixup(struct device_node *root, void *unused) int ret; struct device_node *node; - for_each_compatible_node(node, NULL, "atmel,hsmci") { + for_each_compatible_node_from(node, root, NULL, "atmel,hsmci") { struct device_node *slotnode = of_get_child_by_name(node, "slot"); if (!slotnode) diff --git a/arch/arm/boards/highbank/init.c b/arch/arm/boards/highbank/init.c index a0d4b30b48..1cb02e6e48 100644 --- a/arch/arm/boards/highbank/init.c +++ b/arch/arm/boards/highbank/init.c @@ -35,13 +35,13 @@ static int hb_fixup(struct device_node *root, void *unused) __be32 latency; if (!(reg & HB_PWRDOM_STAT_SATA)) { - for_each_compatible_node(node, NULL, "calxeda,hb-ahci") + for_each_compatible_node_from(node, root, NULL, "calxeda,hb-ahci") of_set_property(node, "status", "disabled", sizeof("disabled"), 1); } if (!(reg & HB_PWRDOM_STAT_EMMC)) { - for_each_compatible_node(node, NULL, "calxeda,hb-sdhci") + for_each_compatible_node_from(node, root, NULL, "calxeda,hb-sdhci") of_set_property(node, "status", "disabled", sizeof("disabled"), 1); } diff --git a/arch/arm/configs/socfpga_defconfig b/arch/arm/configs/socfpga_defconfig index 0a31de518d..7fbe045e27 100644 --- a/arch/arm/configs/socfpga_defconfig +++ b/arch/arm/configs/socfpga_defconfig @@ -67,6 +67,7 @@ CONFIG_NET=y CONFIG_NET_NETCONSOLE=y CONFIG_NET_RESOLV=y CONFIG_OF_BAREBOX_DRIVERS=y +CONFIG_OF_BAREBOX_ENV_IN_FS=y CONFIG_DRIVER_SERIAL_NS16550=y CONFIG_DRIVER_NET_DESIGNWARE=y CONFIG_MCI=y diff --git a/arch/arm/dts/socfpga.dtsi b/arch/arm/dts/socfpga.dtsi index d4d498be13..d16758fdab 100644 --- a/arch/arm/dts/socfpga.dtsi +++ b/arch/arm/dts/socfpga.dtsi @@ -1,4 +1,12 @@ / { + chosen { + environment@0 { + compatible = "barebox,environment"; + device-path = &mmc, "partname:1"; + file-path = "barebox.env"; + }; + }; + aliases { mmc0 = &mmc; }; diff --git a/arch/arm/mach-imx/ocotp.c b/arch/arm/mach-imx/ocotp.c index 6ff5ee4efc..c99a003bb0 100644 --- a/arch/arm/mach-imx/ocotp.c +++ b/arch/arm/mach-imx/ocotp.c @@ -426,7 +426,6 @@ static int imx_ocotp_probe(struct device_d *dev) cdev->priv = priv; cdev->size = 192; cdev->name = "imx-ocotp"; - cdev->device_node = dev->device_node; ret = devfs_create(cdev); diff --git a/arch/arm/mach-socfpga/generic.c b/arch/arm/mach-socfpga/generic.c index 2d4afd0a7a..906bc63330 100644 --- a/arch/arm/mach-socfpga/generic.c +++ b/arch/arm/mach-socfpga/generic.c @@ -103,41 +103,3 @@ static int socfpga_init(void) return 0; } core_initcall(socfpga_init); - -#if defined(CONFIG_ENV_HANDLING) -#define ENV_PATH "/boot/barebox.env" -static int socfpga_env_init(void) -{ - struct stat s; - char *diskdev, *partname; - int ret; - - diskdev = "mmc0"; - - device_detect_by_name(diskdev); - - partname = asprintf("/dev/%s.1", diskdev); - - ret = stat(partname, &s); - - if (ret) { - pr_err("Failed to load environment: no device '%s'\n", diskdev); - goto out_free; - } - - mkdir("/boot", 0666); - ret = mount(partname, "fat", "/boot", NULL); - if (ret) { - pr_err("Failed to load environment: mount %s failed (%d)\n", partname, ret); - goto out_free; - } - - pr_debug("Loading default env from %s on device %s\n", ENV_PATH, diskdev); - default_environment_path_set(ENV_PATH); - -out_free: - free(partname); - return 0; -} -late_initcall(socfpga_env_init); -#endif |