static void dtsec_init_phy(struct fm_eth *fm_eth)
{
#ifndef CONFIG_SYS_FMAN_V3
- struct dtsec *regs = (struct dtsec *)CONFIG_SYS_FSL_FM1_DTSEC1_ADDR;
+ struct dtsec *regs = (struct dtsec *)CFG_SYS_FSL_FM1_DTSEC1_ADDR;
/* Assign a Physical address to the TBI */
out_be32(®s->tbipa, CONFIG_SYS_TBIPA_VALUE);
return 0;
}
#else /* CONFIG_DM_ETH */
-#ifdef CONFIG_PHYLIB
-phy_interface_t fman_read_sys_if(struct udevice *dev)
-{
- const char *if_str;
-
- if_str = ofnode_read_string(dev_ofnode(dev), "phy-connection-type");
- debug("MAC system interface mode %s\n", if_str);
-
- return phy_get_interface_by_name(if_str);
-}
-#endif
static int fm_eth_bind(struct udevice *dev)
{
reg = (void *)(uintptr_t)dev_read_addr(dev);
fm_eth->mac_type = dev_get_driver_data(dev);
#ifdef CONFIG_PHYLIB
- fm_eth->enet_if = fman_read_sys_if(dev);
+ fm_eth->enet_if = dev_read_phy_mode(dev);
#else
fm_eth->enet_if = PHY_INTERFACE_MODE_SGMII;
printf("%s: warning - unable to determine interface type\n", __func__);