Merge branch '2021-02-02-drop-asm_global_data-when-unused'
[platform/kernel/u-boot.git] / board / AndesTech / ax25-ae350 / ax25-ae350.c
index da5bc5b..81b0ee9 100644 (file)
@@ -12,6 +12,7 @@
 #if defined(CONFIG_FTMAC100) && !defined(CONFIG_DM_ETH)
 #include <netdev.h>
 #endif
+#include <asm/global_data.h>
 #include <linux/io.h>
 #include <faraday/ftsmc020.h>
 #include <fdtdec.h>
@@ -43,7 +44,7 @@ int dram_init_banksize(void)
 }
 
 #if defined(CONFIG_FTMAC100) && !defined(CONFIG_DM_ETH)
-int board_eth_init(bd_t *bd)
+int board_eth_init(struct bd_info *bd)
 {
        return ftmac100_initialize(bd);
 }
@@ -71,12 +72,13 @@ int smc_init(void)
        if (node < 0)
                return -FDT_ERR_NOTFOUND;
 
-       addr = fdtdec_get_addr(blob, node, "reg");
+       addr = fdtdec_get_addr_size_auto_noparent(blob, node,
+               "reg", 0, NULL, false);
 
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
-       regs = (struct ftsmc020_bank *)addr;
+       regs = (struct ftsmc020_bank *)(uintptr_t)addr;
        regs->cr &= ~FTSMC020_BANK_WPROT;
 
        return 0;