aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/utils.c
diff options
context:
space:
mode:
authorYao Zi <[email protected]>2025-08-08 09:36:55 +0000
committerPaolo Abeni <[email protected]>2025-08-12 10:52:21 +0000
commit4cc339ce482ba78589a2d5cbe1c84b735d263383 (patch)
treef6f1dd6acebb9a07a8a838111cacbd1979b2e985 /net/core/utils.c
parentdt-bindings: net: thead,th1520-gmac: Describe APB interface clock (diff)
downloadkernel-4cc339ce482ba78589a2d5cbe1c84b735d263383.tar.gz
kernel-4cc339ce482ba78589a2d5cbe1c84b735d263383.zip
net: stmmac: thead: Get and enable APB clock on initialization
It's necessary to adjust the MAC TX clock when the linkspeed changes, but it's noted such adjustment always fails on TH1520 SoC, and reading back from APB glue registers that control clock generation results in garbage, causing broken link. With some testing, it's found a clock must be ungated for access to APB glue registers. Without any consumer, the clock is automatically disabled during late kernel startup. Let's get and enable it if it's described in devicetree. For backward compatibility with older devicetrees, probing won't fail if the APB clock isn't found. In this case, we emit a warning since the link will break if the speed changes. Fixes: 33a1a01e3afa ("net: stmmac: Add glue layer for T-HEAD TH1520 SoC") Signed-off-by: Yao Zi <[email protected]> Tested-by: Drew Fustini <[email protected]> Reviewed-by: Drew Fustini <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'net/core/utils.c')
0 files changed, 0 insertions, 0 deletions