Revert a change that occured between the Marvell SDK-10.1.1.0
and SDK-10.3.1.1 which broke QSMII phy support.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
int dmac;
u8 mac[6];
bool link_up;
int dmac;
u8 mac[6];
bool link_up;
int lmacid; /* ID within BGX */
int phy_addr; /* ID on board */
struct udevice *dev;
int lmacid; /* ID within BGX */
int phy_addr; /* ID on board */
struct udevice *dev;
u64 cfg;
lmac = &bgx->lmac[lmacid];
u64 cfg;
lmac = &bgx->lmac[lmacid];
debug("%s: lmac: %p, lmacid = %d\n", __func__, lmac, lmacid);
debug("%s: lmac: %p, lmacid = %d\n", __func__, lmac, lmacid);
debug("%s: %d, lmac: %d/%d/%d %p\n",
__FILE__, __LINE__,
node, bgx_idx, lmacid, lmac);
debug("%s: %d, lmac: %d/%d/%d %p\n",
__FILE__, __LINE__,
node, bgx_idx, lmacid, lmac);
- if (lmac->init_pend) {
- ret = bgx_lmac_enable(lmac->bgx, lmacid);
- if (ret < 0) {
- printf("BGX%d LMAC%d lmac_enable failed\n", bgx_idx,
- lmacid);
- return ret;
- }
- lmac->init_pend = 0;
- mdelay(100);
- }
if (lmac->qlm_mode == QLM_MODE_SGMII ||
lmac->qlm_mode == QLM_MODE_RGMII ||
lmac->qlm_mode == QLM_MODE_QSGMII) {
if (lmac->qlm_mode == QLM_MODE_SGMII ||
lmac->qlm_mode == QLM_MODE_RGMII ||
lmac->qlm_mode == QLM_MODE_QSGMII) {
int octeontx_bgx_probe(struct udevice *dev)
{
int octeontx_bgx_probe(struct udevice *dev)
{
struct bgx *bgx = dev_get_priv(dev);
u8 lmac = 0;
int qlm[4] = {-1, -1, -1, -1};
struct bgx *bgx = dev_get_priv(dev);
u8 lmac = 0;
int qlm[4] = {-1, -1, -1, -1};
struct lmac *tlmac = &bgx->lmac[lmac];
tlmac->dev = dev;
struct lmac *tlmac = &bgx->lmac[lmac];
tlmac->dev = dev;
- tlmac->init_pend = 1;
- tlmac->bgx = bgx;
+ err = bgx_lmac_enable(bgx, lmac);
+ if (err) {
+ printf("BGX%d failed to enable lmac%d\n",
+ bgx->bgx_id, lmac);
+ }