diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2020-05-21 14:58:36 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2020-05-21 19:11:24 +0200 |
commit | 6dc3dce65848891468830105a63e36da1c8158bd (patch) | |
tree | 2192914c5c12646d564b97f6b048b16077a1a36d /target/linux/bcm63xx/patches-5.4/428-bcm63xx_enet-rgmii-ctrl-fix.patch | |
parent | 7a817752f67119be746d55dd90f6c43036f0c725 (diff) | |
download | upstream-6dc3dce65848891468830105a63e36da1c8158bd.tar.gz upstream-6dc3dce65848891468830105a63e36da1c8158bd.tar.bz2 upstream-6dc3dce65848891468830105a63e36da1c8158bd.zip |
bcm63xx: improve rgmii ctrl overrides
There are older devices which require overriding the RGMII ports, so this
shouldn't be limited and forced to BCM63268.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm63xx/patches-5.4/428-bcm63xx_enet-rgmii-ctrl-fix.patch')
-rw-r--r-- | target/linux/bcm63xx/patches-5.4/428-bcm63xx_enet-rgmii-ctrl-fix.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/target/linux/bcm63xx/patches-5.4/428-bcm63xx_enet-rgmii-ctrl-fix.patch b/target/linux/bcm63xx/patches-5.4/428-bcm63xx_enet-rgmii-ctrl-fix.patch new file mode 100644 index 0000000000..f744d3dab9 --- /dev/null +++ b/target/linux/bcm63xx/patches-5.4/428-bcm63xx_enet-rgmii-ctrl-fix.patch @@ -0,0 +1,25 @@ +--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h ++++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h +@@ -79,6 +79,9 @@ struct bcm63xx_enetsw_port { + int force_speed; + int force_duplex_full; + ++ int mii_override; ++ int timing_sel; ++ + const char *name; + }; + +--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c ++++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c +@@ -2209,6 +2209,10 @@ static int bcm_enetsw_open(struct net_de + + rgmii_ctrl = enetsw_readb(priv, ENETSW_RGMII_CTRL_REG(i)); + rgmii_ctrl |= ENETSW_RGMII_CTRL_GMII_CLK_EN; ++ if (priv->used_ports[i].mii_override) ++ rgmii_ctrl |= ENETSW_RGMII_CTRL_MII_OVERRIDE_EN; ++ if (priv->used_ports[i].timing_sel) ++ rgmii_ctrl |= ENETSW_RGMII_CTRL_TIMING_SEL_EN; + enetsw_writeb(priv, rgmii_ctrl, ENETSW_RGMII_CTRL_REG(i)); + } + |