diff options
author | Tim Harvey | 2021-03-25 19:07:35 -0500 |
---|---|---|
committer | Tom Rini | 2021-04-20 06:31:12 -0500 |
commit | 8c64347b7e45f96d82f8c6782c2fcd309f4e45cf (patch) | |
tree | 10ca89b6701a7bc4f812849f65d9d3ad241d248d | |
parent | 9889a8e562461837312879d82bcbfe80854de67a (diff) | |
download | ti-u-boot-8c64347b7e45f96d82f8c6782c2fcd309f4e45cf.tar.gz ti-u-boot-8c64347b7e45f96d82f8c6782c2fcd309f4e45cf.tar.xz ti-u-boot-8c64347b7e45f96d82f8c6782c2fcd309f4e45cf.zip |
drivers: net: octeontx: fix QSGMII
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>
-rw-r--r-- | drivers/net/octeontx/bgx.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/drivers/net/octeontx/bgx.c b/drivers/net/octeontx/bgx.c index 2ea54be84d..a5c0c9fe2b 100644 --- a/drivers/net/octeontx/bgx.c +++ b/drivers/net/octeontx/bgx.c | |||
@@ -36,7 +36,6 @@ struct lmac { | |||
36 | int dmac; | 36 | int dmac; |
37 | u8 mac[6]; | 37 | u8 mac[6]; |
38 | bool link_up; | 38 | bool link_up; |
39 | bool init_pend; | ||
40 | int lmacid; /* ID within BGX */ | 39 | int lmacid; /* ID within BGX */ |
41 | int phy_addr; /* ID on board */ | 40 | int phy_addr; /* ID on board */ |
42 | struct udevice *dev; | 41 | struct udevice *dev; |
@@ -849,6 +848,7 @@ static int bgx_lmac_enable(struct bgx *bgx, int8_t lmacid) | |||
849 | u64 cfg; | 848 | u64 cfg; |
850 | 849 | ||
851 | lmac = &bgx->lmac[lmacid]; | 850 | lmac = &bgx->lmac[lmacid]; |
851 | lmac->bgx = bgx; | ||
852 | 852 | ||
853 | debug("%s: lmac: %p, lmacid = %d\n", __func__, lmac, lmacid); | 853 | debug("%s: lmac: %p, lmacid = %d\n", __func__, lmac, lmacid); |
854 | 854 | ||
@@ -895,16 +895,6 @@ int bgx_poll_for_link(int node, int bgx_idx, int lmacid) | |||
895 | debug("%s: %d, lmac: %d/%d/%d %p\n", | 895 | debug("%s: %d, lmac: %d/%d/%d %p\n", |
896 | __FILE__, __LINE__, | 896 | __FILE__, __LINE__, |
897 | node, bgx_idx, lmacid, lmac); | 897 | node, bgx_idx, lmacid, lmac); |
898 | if (lmac->init_pend) { | ||
899 | ret = bgx_lmac_enable(lmac->bgx, lmacid); | ||
900 | if (ret < 0) { | ||
901 | printf("BGX%d LMAC%d lmac_enable failed\n", bgx_idx, | ||
902 | lmacid); | ||
903 | return ret; | ||
904 | } | ||
905 | lmac->init_pend = 0; | ||
906 | mdelay(100); | ||
907 | } | ||
908 | if (lmac->qlm_mode == QLM_MODE_SGMII || | 898 | if (lmac->qlm_mode == QLM_MODE_SGMII || |
909 | lmac->qlm_mode == QLM_MODE_RGMII || | 899 | lmac->qlm_mode == QLM_MODE_RGMII || |
910 | lmac->qlm_mode == QLM_MODE_QSGMII) { | 900 | lmac->qlm_mode == QLM_MODE_QSGMII) { |
@@ -1461,6 +1451,7 @@ int octeontx_bgx_remove(struct udevice *dev) | |||
1461 | 1451 | ||
1462 | int octeontx_bgx_probe(struct udevice *dev) | 1452 | int octeontx_bgx_probe(struct udevice *dev) |
1463 | { | 1453 | { |
1454 | int err; | ||
1464 | struct bgx *bgx = dev_get_priv(dev); | 1455 | struct bgx *bgx = dev_get_priv(dev); |
1465 | u8 lmac = 0; | 1456 | u8 lmac = 0; |
1466 | int qlm[4] = {-1, -1, -1, -1}; | 1457 | int qlm[4] = {-1, -1, -1, -1}; |
@@ -1540,8 +1531,11 @@ skip_qlm_config: | |||
1540 | struct lmac *tlmac = &bgx->lmac[lmac]; | 1531 | struct lmac *tlmac = &bgx->lmac[lmac]; |
1541 | 1532 | ||
1542 | tlmac->dev = dev; | 1533 | tlmac->dev = dev; |
1543 | tlmac->init_pend = 1; | 1534 | err = bgx_lmac_enable(bgx, lmac); |
1544 | tlmac->bgx = bgx; | 1535 | if (err) { |
1536 | printf("BGX%d failed to enable lmac%d\n", | ||
1537 | bgx->bgx_id, lmac); | ||
1538 | } | ||
1545 | } | 1539 | } |
1546 | 1540 | ||
1547 | return 0; | 1541 | return 0; |