net: ftgmac100: access hardware register after clock ready
authorDylan Hung <dylan_hung@aspeedtech.com>
Tue, 12 Apr 2022 11:48:59 +0000 (19:48 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Apr 2022 11:43:55 +0000 (12:43 +0100)
commit3d2504524531990b32a0629cc984db44f399d161
treed157369c18444feeb103b99d16bb752d75bb72d9
parent762c2998c9625f642f0d23da7d3f7e4f90665fdf
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: 137d23cea1c0 ("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>
drivers/net/ethernet/faraday/ftgmac100.c