diff options
author | Tom Rini <trini@konsulko.com> | 2015-10-03 14:48:06 (GMT) |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-10-03 14:48:06 (GMT) |
commit | 996ec1dcc58a34b53891acde0ec5df9141b5fcc2 (patch) | |
tree | 3f4c64df2a05124c7204d781caa1b2c963b12ec8 | |
parent | 97fec7105c6d31f52026921e669ec78e1b7ca623 (diff) | |
parent | cce573e8d806fd430e7584b36bce6d62ae0430e8 (diff) | |
download | u-boot-fsl-qoriq-996ec1dcc58a34b53891acde0ec5df9141b5fcc2.tar.xz |
Merge branch 'master' of git://git.denx.de/u-boot-fdt
-rw-r--r-- | arch/arm/dts/exynos4210-trats.dts | 4 | ||||
-rw-r--r-- | arch/arm/mach-exynos/clock.c | 10 | ||||
-rw-r--r-- | drivers/gpio/s5p_gpio.c | 18 | ||||
-rw-r--r-- | dts/Kconfig | 4 | ||||
-rw-r--r-- | lib/fdtdec.c | 7 |
5 files changed, 26 insertions, 17 deletions
diff --git a/arch/arm/dts/exynos4210-trats.dts b/arch/arm/dts/exynos4210-trats.dts index 36d02df..f3fac80 100644 --- a/arch/arm/dts/exynos4210-trats.dts +++ b/arch/arm/dts/exynos4210-trats.dts @@ -117,4 +117,8 @@ sdhci@12540000 { status = "disabled"; }; + + dwmmc@12550000 { + status = "disabled"; + }; }; diff --git a/arch/arm/mach-exynos/clock.c b/arch/arm/mach-exynos/clock.c index 1c6baa1..18eadf5 100644 --- a/arch/arm/mach-exynos/clock.c +++ b/arch/arm/mach-exynos/clock.c @@ -1661,6 +1661,9 @@ unsigned long get_mmc_clk(int dev_index) { enum periph_id id; + if (cpu_is_exynos4()) + return exynos4_get_mmc_clk(dev_index); + switch (dev_index) { case 0: id = PERIPH_ID_SDMMC0; @@ -1679,12 +1682,7 @@ unsigned long get_mmc_clk(int dev_index) return -1; } - if (cpu_is_exynos5()) - return clock_get_periph_rate(id); - else if (cpu_is_exynos4()) - return exynos4_get_mmc_clk(dev_index); - - return 0; + return clock_get_periph_rate(id); } void set_mmc_clk(int dev_index, unsigned int div) diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c index 17fcfbf..0f22b23 100644 --- a/drivers/gpio/s5p_gpio.c +++ b/drivers/gpio/s5p_gpio.c @@ -341,18 +341,22 @@ static int gpio_exynos_bind(struct udevice *parent) plat = calloc(1, sizeof(*plat)); if (!plat) return -ENOMEM; - reg = fdtdec_get_addr(blob, node, "reg"); - if (reg != FDT_ADDR_T_NONE) - bank = (struct s5p_gpio_bank *)((ulong)base + reg); - plat->bank = bank; - plat->bank_name = fdt_get_name(blob, node, NULL); - debug("dev at %p: %s\n", bank, plat->bank_name); + plat->bank_name = fdt_get_name(blob, node, NULL); ret = device_bind(parent, parent->driver, - plat->bank_name, plat, -1, &dev); + plat->bank_name, plat, -1, &dev); if (ret) return ret; + dev->of_offset = node; + + reg = dev_get_addr(dev); + if (reg != FDT_ADDR_T_NONE) + bank = (struct s5p_gpio_bank *)((ulong)base + reg); + + plat->bank = bank; + + debug("dev at %p: %s\n", bank, plat->bank_name); } return 0; diff --git a/dts/Kconfig b/dts/Kconfig index 0f4d755..fb2d79e 100644 --- a/dts/Kconfig +++ b/dts/Kconfig @@ -37,7 +37,9 @@ config OF_EMBED bool "Embedded DTB for DT control" help If this option is enabled, the device tree will be picked up and - built into the U-Boot image. + built into the U-Boot image. This is suitable for local debugging + and development only and is not recommended for production devices. + Boards in the mainline U-Boot tree should not use it. config OF_HOSTFILE bool "Host filed DTB for DT control" diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 9f0b65d..1a86369 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -149,7 +149,7 @@ fdt_addr_t fdtdec_get_addr_size_auto_parent(const void *blob, int parent, } ns = fdt_size_cells(blob, parent); - if (ns < 1) { + if (ns < 0) { debug("(bad #size-cells)\n"); return FDT_ADDR_T_NONE; } @@ -180,10 +180,11 @@ fdt_addr_t fdtdec_get_addr_size_auto_noparent(const void *blob, int node, fdt_addr_t fdtdec_get_addr_size(const void *blob, int node, const char *prop_name, fdt_size_t *sizep) { + int ns = sizep ? (sizeof(fdt_size_t) / sizeof(fdt32_t)) : 0; + return fdtdec_get_addr_size_fixed(blob, node, prop_name, 0, sizeof(fdt_addr_t) / sizeof(fdt32_t), - sizeof(fdt_size_t) / sizeof(fdt32_t), - sizep); + ns, sizep); } fdt_addr_t fdtdec_get_addr(const void *blob, int node, |