]> git.sur5r.net Git - u-boot/blobdiff - drivers/ram/bmips_ram.c
Merge branch 'master' of git://git.denx.de/u-boot-sunxi
[u-boot] / drivers / ram / bmips_ram.c
index 7a5dfac4ab50054e0b991fb8cb7d4f7ea0e7548e..cc37dfa08c14d3806f769629efbcb0b4c1d8f772 100644 (file)
@@ -1,11 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
  *
  * Derived from linux/arch/mips/bcm63xx/cpu.c:
  *     Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
  *     Copyright (C) 2009 Florian Fainelli <florian@openwrt.org>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -151,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;