aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/octeontx
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-04-20 07:32:04 -0400
committerTom Rini <trini@konsulko.com>2021-04-20 07:32:04 -0400
commit842d049be23976ebcbb2522fa8d752d3aae8631a (patch)
treeca4ff1ffa3d447d51e945ce4cd9f75f6e80babe9 /drivers/net/octeontx
parenteed05148c261e3b5f00b11a7a14bf0222b80a0ac (diff)
parent4e9bce12432492aa7a7c2121d9fae1640606ace5 (diff)
downloadu-boot-842d049be23976ebcbb2522fa8d752d3aae8631a.zip
u-boot-842d049be23976ebcbb2522fa8d752d3aae8631a.tar.gz
u-boot-842d049be23976ebcbb2522fa8d752d3aae8631a.tar.bz2
Merge branch '2021-04-20-assorted-improvements'WIP/20Apr2021
- ARM64 GIC fix, CONFIG_IRQ now moved to Kconfig - IDE, lz4 fixes - octeontx cleanups / enhancements - highbank DM migration - psci updates - Enable use of -fstack-protector
Diffstat (limited to 'drivers/net/octeontx')
-rw-r--r--drivers/net/octeontx/bgx.c20
-rw-r--r--drivers/net/octeontx/smi.c2
2 files changed, 9 insertions, 13 deletions
diff --git a/drivers/net/octeontx/bgx.c b/drivers/net/octeontx/bgx.c
index 2ea54be..a5c0c9f 100644
--- a/drivers/net/octeontx/bgx.c
+++ b/drivers/net/octeontx/bgx.c
@@ -36,7 +36,6 @@ struct lmac {
int dmac;
u8 mac[6];
bool link_up;
- bool init_pend;
int lmacid; /* ID within BGX */
int phy_addr; /* ID on board */
struct udevice *dev;
@@ -849,6 +848,7 @@ static int bgx_lmac_enable(struct bgx *bgx, int8_t lmacid)
u64 cfg;
lmac = &bgx->lmac[lmacid];
+ lmac->bgx = bgx;
debug("%s: lmac: %p, lmacid = %d\n", __func__, lmac, lmacid);
@@ -895,16 +895,6 @@ int bgx_poll_for_link(int node, int bgx_idx, int lmacid)
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) {
@@ -1461,6 +1451,7 @@ int octeontx_bgx_remove(struct udevice *dev)
int octeontx_bgx_probe(struct udevice *dev)
{
+ int err;
struct bgx *bgx = dev_get_priv(dev);
u8 lmac = 0;
int qlm[4] = {-1, -1, -1, -1};
@@ -1540,8 +1531,11 @@ skip_qlm_config:
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);
+ }
}
return 0;
diff --git a/drivers/net/octeontx/smi.c b/drivers/net/octeontx/smi.c
index 91dcd05..27f4423 100644
--- a/drivers/net/octeontx/smi.c
+++ b/drivers/net/octeontx/smi.c
@@ -325,6 +325,8 @@ int octeontx_smi_probe(struct udevice *dev)
return -1;
}
+ node = fdt_node_offset_by_compatible(gd->fdt_blob, -1,
+ "cavium,thunder-8890-mdio-nexus");
fdt_for_each_subnode(subnode, gd->fdt_blob, node) {
ret = fdt_node_check_compatible(gd->fdt_blob, subnode,
"cavium,thunder-8890-mdio");