} fm_dtsec_t;
typedef struct fm_mdio {
- u8 res[4*1024];
+ u8 res0[0x120];
+ u32 miimcfg; /* MII management configuration reg */
+ u32 miimcom; /* MII management command reg */
+ u32 miimadd; /* MII management address reg */
+ u32 miimcon; /* MII management control reg */
+ u32 miimstat; /* MII management status reg */
+ u32 miimind; /* MII management indication reg */
+ u8 res1[0x1000 - 0x138];
} fm_mdio_t;
typedef struct fm_10gec {
void *phyregs, int max_rx_len)
{
mac->base = base;
- mac->phyregs = NULL;
+ mac->phyregs = phyregs;
mac->max_rx_len = max_rx_len;
mac->init_mac = dtsec_init_mac;
mac->enable_mac = dtsec_enable_mac;
/* Get the mac registers base address */
if (fm_eth->type == FM_ETH_1G_E) {
base = ®->mac_1g[num].fm_dtesc;
+ phyregs = ®->mac_1g[num].fm_mdio.miimcfg;
} else {
base = ®->mac_10g[num].fm_10gec;
phyregs = ®->mac_10g[num].fm_10gec_mdio;
fm_eth->mac = mac;
if (fm_eth->type == FM_ETH_1G_E)
- init_dtsec(mac, base, NULL, MAX_RXBUF_LEN);
+ init_dtsec(mac, base, phyregs, MAX_RXBUF_LEN);
else
init_tgec(mac, base, phyregs, MAX_RXBUF_LEN);