Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/etherswitch/ip17x/ip175c.c
Show First 20 Lines • Show All 228 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
return (sc->vlan_mode); | return (sc->vlan_mode); | ||||
} | } | ||||
void | void | ||||
ip175c_attach(struct ip17x_softc *sc) | ip175c_attach(struct ip17x_softc *sc) | ||||
{ | { | ||||
uint32_t data; | |||||
data = ip17x_readphy(sc->sc_dev, IP175C_MII_PHY, IP175C_MII_CTL_REG); | |||||
device_printf(sc->sc_dev, "MII: %x\n", data); | |||||
/* check mii1 interface if disabled then phy4 and mac4 hold on switch */ | |||||
if((data & (1 << IP175C_MII_MII1_RMII_EN)) == 0) | |||||
sc->phymask |= 0x10; | |||||
sc->hal.ip17x_reset = ip175c_reset; | sc->hal.ip17x_reset = ip175c_reset; | ||||
sc->hal.ip17x_hw_setup = ip175c_hw_setup; | sc->hal.ip17x_hw_setup = ip175c_hw_setup; | ||||
sc->hal.ip17x_get_vlan_mode = ip175c_get_vlan_mode; | sc->hal.ip17x_get_vlan_mode = ip175c_get_vlan_mode; | ||||
sc->hal.ip17x_set_vlan_mode = ip175c_set_vlan_mode; | sc->hal.ip17x_set_vlan_mode = ip175c_set_vlan_mode; | ||||
/* Defaults for IP175C. */ | /* Defaults for IP175C. */ | ||||
sc->cpuport = IP175X_CPU_PORT; | sc->cpuport = IP175X_CPU_PORT; | ||||
sc->numports = IP175X_NUM_PORTS; | sc->numports = IP175X_NUM_PORTS; | ||||
sc->info.es_vlan_caps = ETHERSWITCH_VLAN_PORT | ETHERSWITCH_VLAN_DOT1Q; | sc->info.es_vlan_caps = ETHERSWITCH_VLAN_PORT | ETHERSWITCH_VLAN_DOT1Q; | ||||
device_printf(sc->sc_dev, "type: IP175C\n"); | device_printf(sc->sc_dev, "type: IP175C\n"); | ||||
} | } |