Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/dwc/if_dwc.c
Context not available. | |||||
uint32_t reg; | uint32_t reg; | ||||
char *phy_mode; | char *phy_mode; | ||||
phandle_t node; | phandle_t node; | ||||
uint32_t txpbl, rxpbl; | |||||
bool nopblx8 = false; | |||||
bool fixed_burst = false; | |||||
sc = device_get_softc(dev); | sc = device_get_softc(dev); | ||||
sc->dev = dev; | sc->dev = dev; | ||||
Context not available. | |||||
OF_prop_free(phy_mode); | OF_prop_free(phy_mode); | ||||
} | } | ||||
if (OF_getencprop(node, "snps,txpbl", &txpbl, sizeof(uint32_t)) <= 0) | |||||
txpbl = 8; | |||||
if (OF_getencprop(node, "snps,rxpbl", &rxpbl, sizeof(uint32_t)) <= 0) | |||||
rxpbl = 8; | |||||
if (OF_hasprop(node, "snps,no-pbl-x8") == 1) | |||||
nopblx8 = true; | |||||
if (OF_hasprop(node, "snps,fixed-burst") == 1) | |||||
fixed_burst = true; | |||||
if (IF_DWC_INIT(dev) != 0) | if (IF_DWC_INIT(dev) != 0) | ||||
return (ENXIO); | return (ENXIO); | ||||
Context not available. | |||||
return (ENXIO); | return (ENXIO); | ||||
} | } | ||||
reg = BUS_MODE_USP; | if (sc->mactype != DWC_GMAC_EXT_DESC) { | ||||
if (!nopblx8) | reg = BUS_MODE_FIXEDBURST; | ||||
reg |= BUS_MODE_EIGHTXPBL; | reg |= (BUS_MODE_PRIORXTX_41 << BUS_MODE_PRIORXTX_SHIFT); | ||||
reg |= (txpbl << BUS_MODE_PBL_SHIFT); | } else | ||||
reg |= (rxpbl << BUS_MODE_RPBL_SHIFT); | reg = (BUS_MODE_EIGHTXPBL); | ||||
if (fixed_burst) | reg |= (BUS_MODE_PBL_BEATS_8 << BUS_MODE_PBL_SHIFT); | ||||
reg |= BUS_MODE_FIXEDBURST; | |||||
WRITE4(sc, BUS_MODE, reg); | WRITE4(sc, BUS_MODE, reg); | ||||
/* | /* | ||||
Context not available. |