mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-20 09:31:09 +00:00
net: ftgmac100: access hardware register after clock ready
[ Upstream commit3d25045245
] 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:137d23cea1
("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
8f79ce226a
commit
331c99ee8d
1 changed files with 5 additions and 5 deletions
|
@ -1817,11 +1817,6 @@ static int ftgmac100_probe(struct platform_device *pdev)
|
|||
priv->rxdes0_edorr_mask = BIT(30);
|
||||
priv->txdes0_edotr_mask = BIT(30);
|
||||
priv->is_aspeed = true;
|
||||
/* Disable ast2600 problematic HW arbitration */
|
||||
if (of_device_is_compatible(np, "aspeed,ast2600-mac")) {
|
||||
iowrite32(FTGMAC100_TM_DEFAULT,
|
||||
priv->base + FTGMAC100_OFFSET_TM);
|
||||
}
|
||||
} else {
|
||||
priv->rxdes0_edorr_mask = BIT(15);
|
||||
priv->txdes0_edotr_mask = BIT(15);
|
||||
|
@ -1893,6 +1888,11 @@ static int ftgmac100_probe(struct platform_device *pdev)
|
|||
err = ftgmac100_setup_clk(priv);
|
||||
if (err)
|
||||
goto err_phy_connect;
|
||||
|
||||
/* Disable ast2600 problematic HW arbitration */
|
||||
if (of_device_is_compatible(np, "aspeed,ast2600-mac"))
|
||||
iowrite32(FTGMAC100_TM_DEFAULT,
|
||||
priv->base + FTGMAC100_OFFSET_TM);
|
||||
}
|
||||
|
||||
/* Default ring sizes */
|
||||
|
|
Loading…
Reference in a new issue