diff options
author | Tom Rini <trini@konsulko.com> | 2015-10-03 10:48:06 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-10-03 10:48:06 -0400 |
commit | 996ec1dcc58a34b53891acde0ec5df9141b5fcc2 (patch) | |
tree | 3f4c64df2a05124c7204d781caa1b2c963b12ec8 /drivers | |
parent | 97fec7105c6d31f52026921e669ec78e1b7ca623 (diff) | |
parent | cce573e8d806fd430e7584b36bce6d62ae0430e8 (diff) | |
download | u-boot-imx-996ec1dcc58a34b53891acde0ec5df9141b5fcc2.zip u-boot-imx-996ec1dcc58a34b53891acde0ec5df9141b5fcc2.tar.gz u-boot-imx-996ec1dcc58a34b53891acde0ec5df9141b5fcc2.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-fdt
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpio/s5p_gpio.c | 18 |
1 files changed, 11 insertions, 7 deletions
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; |