From: Peng Fan <[email protected]>

Use dev_read_addr_index() which supports 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/ata/dwc_ahci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/dwc_ahci.c b/drivers/ata/dwc_ahci.c
index b480cde4465..0431d370716 100644
--- a/drivers/ata/dwc_ahci.c
+++ b/drivers/ata/dwc_ahci.c
@@ -39,7 +39,7 @@ static int dwc_ahci_of_to_plat(struct udevice *dev)
        priv->base = map_physmem(dev_read_addr(dev), sizeof(void *),
                                 MAP_NOCACHE);
 
-       addr = devfdt_get_addr_index(dev, 1);
+       addr = dev_read_addr_index(dev, 1);
        if (addr != FDT_ADDR_T_NONE) {
                priv->wrapper_base = map_physmem(addr, sizeof(void *),
                                                 MAP_NOCACHE);
-- 
2.51.0

Reply via email to