From: Peng Fan <[email protected]>

Use dev_read_addr_index_ptr() and dev_read_addr_size_index_ptr() which
support both live device tree and flat DT backends, avoiding direct
dependency on devfdt_* helpers.

No functional changes.

Signed-off-by: Peng Fan <[email protected]>
---
 drivers/spi/spi-aspeed-smc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-aspeed-smc.c b/drivers/spi/spi-aspeed-smc.c
index ca29cfd7c88..22668c1aff5 100644
--- a/drivers/spi/spi-aspeed-smc.c
+++ b/drivers/spi/spi-aspeed-smc.c
@@ -1123,13 +1123,13 @@ static int apseed_spi_of_to_plat(struct udevice *bus)
        int ret;
        struct clk hclk;
 
-       priv->regs = devfdt_get_addr_index_ptr(bus, 0);
+       priv->regs = dev_read_addr_index_ptr(bus, 0);
        if (!priv->regs) {
                dev_err(bus, "wrong ctrl base\n");
                return -EINVAL;
        }
 
-       plat->ahb_base = devfdt_get_addr_size_index_ptr(bus, 1, &plat->ahb_sz);
+       plat->ahb_base = dev_read_addr_size_index_ptr(bus, 1, &plat->ahb_sz);
        if (!plat->ahb_base) {
                dev_err(bus, "wrong AHB base\n");
                return -EINVAL;

-- 
2.51.0

Reply via email to