Skip to content

Commit 3d25045

Browse files
aspeeddylandavem330
authored andcommitted
net: ftgmac100: access hardware register after clock ready
AST2600 MAC register 0x58 is writable only when the MAC clock is enabled. Usually, the MAC clock is enabled by the bootloader so register 0x58 is set normally when the bootloader is involved. To make ast2600 ftgmac100 work without the bootloader, postpone the register write until the clock is ready. Fixes: 137d23c ("net: ftgmac100: Fix Aspeed ast2600 TX hang issue") Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 762c299 commit 3d25045

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

drivers/net/ethernet/faraday/ftgmac100.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1835,11 +1835,6 @@ static int ftgmac100_probe(struct platform_device *pdev)
18351835
priv->rxdes0_edorr_mask = BIT(30);
18361836
priv->txdes0_edotr_mask = BIT(30);
18371837
priv->is_aspeed = true;
1838-
/* Disable ast2600 problematic HW arbitration */
1839-
if (of_device_is_compatible(np, "aspeed,ast2600-mac")) {
1840-
iowrite32(FTGMAC100_TM_DEFAULT,
1841-
priv->base + FTGMAC100_OFFSET_TM);
1842-
}
18431838
} else {
18441839
priv->rxdes0_edorr_mask = BIT(15);
18451840
priv->txdes0_edotr_mask = BIT(15);
@@ -1911,6 +1906,11 @@ static int ftgmac100_probe(struct platform_device *pdev)
19111906
err = ftgmac100_setup_clk(priv);
19121907
if (err)
19131908
goto err_phy_connect;
1909+
1910+
/* Disable ast2600 problematic HW arbitration */
1911+
if (of_device_is_compatible(np, "aspeed,ast2600-mac"))
1912+
iowrite32(FTGMAC100_TM_DEFAULT,
1913+
priv->base + FTGMAC100_OFFSET_TM);
19141914
}
19151915

19161916
/* Default ring sizes */

0 commit comments

Comments
 (0)