global: Migrate CONFIG_SYS_FSL* symbols to the CFG_SYS namespace
[platform/kernel/u-boot.git] / board / freescale / lx2160a / eth_lx2160ardb.c
index 365ff73..8a9c60f 100644 (file)
@@ -1,22 +1,26 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
- * Copyright 2018 NXP
+ * Copyright 2018, 2020 NXP
  *
  */
 
 #include <common.h>
 #include <command.h>
+#include <fdt_support.h>
+#include <net.h>
 #include <netdev.h>
 #include <malloc.h>
 #include <fsl_mdio.h>
 #include <miiphy.h>
 #include <phy.h>
 #include <fm_eth.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <exports.h>
 #include <asm/arch/fsl_serdes.h>
 #include <fsl-mc/fsl_mc.h>
 #include <fsl-mc/ldpaa_wriop.h>
+#include "lx2160a.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -37,28 +41,28 @@ static bool get_inphi_phy_id(struct mii_dev *bus, int addr, int devad)
                return false;
 }
 
-int board_eth_init(bd_t *bis)
+int board_eth_init(struct bd_info *bis)
 {
 #if defined(CONFIG_FSL_MC_ENET)
        struct memac_mdio_info mdio_info;
        struct memac_mdio_controller *reg;
        int i, interface;
        struct mii_dev *dev;
-       struct ccsr_gur *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
+       struct ccsr_gur *gur = (void *)(CFG_SYS_FSL_GUTS_ADDR);
        u32 srds_s1;
 
        srds_s1 = in_le32(&gur->rcwsr[28]) &
                                FSL_CHASSIS3_RCWSR28_SRDS1_PRTCL_MASK;
        srds_s1 >>= FSL_CHASSIS3_RCWSR28_SRDS1_PRTCL_SHIFT;
 
-       reg = (struct memac_mdio_controller *)CONFIG_SYS_FSL_WRIOP1_MDIO1;
+       reg = (struct memac_mdio_controller *)CFG_SYS_FSL_WRIOP1_MDIO1;
        mdio_info.regs = reg;
        mdio_info.name = DEFAULT_WRIOP_MDIO1_NAME;
 
        /* Register the EMI 1 */
        fm_memac_mdio_init(bis, &mdio_info);
 
-       reg = (struct memac_mdio_controller *)CONFIG_SYS_FSL_WRIOP1_MDIO2;
+       reg = (struct memac_mdio_controller *)CFG_SYS_FSL_WRIOP1_MDIO2;
        mdio_info.regs = reg;
        mdio_info.name = DEFAULT_WRIOP_MDIO2_NAME;