aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2018-03-22 19:39:38 +0100
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2018-06-01 15:56:02 +0200
commit13a7bfe4904c15f5a33cadcbd3823887d445ad75 (patch)
treeb0faf630172b8d95d8ccf7ba7244e7641a47fb5a /drivers
parent46689a94b270d5cf7fff46568e23352e9c8cf880 (diff)
downloadu-boot-13a7bfe4904c15f5a33cadcbd3823887d445ad75.zip
u-boot-13a7bfe4904c15f5a33cadcbd3823887d445ad75.tar.gz
u-boot-13a7bfe4904c15f5a33cadcbd3823887d445ad75.tar.bz2
ram: bmips: convert to use live dt
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ram/bmips_ram.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/ram/bmips_ram.c b/drivers/ram/bmips_ram.c
index ad2f0ac..cc37dfa 100644
--- a/drivers/ram/bmips_ram.c
+++ b/drivers/ram/bmips_ram.c
@@ -150,14 +150,11 @@ static int bmips_ram_probe(struct udevice *dev)
struct bmips_ram_priv *priv = dev_get_priv(dev);
const struct bmips_ram_hw *hw =
(const struct bmips_ram_hw *)dev_get_driver_data(dev);
- fdt_addr_t addr;
- fdt_size_t size;
- addr = devfdt_get_addr_size_index(dev, 0, &size);
- if (addr == FDT_ADDR_T_NONE)
+ priv->regs = dev_remap_addr(dev);
+ if (!priv->regs)
return -EINVAL;
- priv->regs = ioremap(addr, size);
priv->hw = hw;
return 0;