diff options
author | Yao Zi <ziyao@disroot.org> | 2025-08-08 09:36:55 +0000 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2025-08-12 12:52:21 +0200 |
commit | 4cc339ce482ba78589a2d5cbe1c84b735d263383 (patch) | |
tree | f6f1dd6acebb9a07a8a838111cacbd1979b2e985 /lib/mpi/mpi-add.c | |
parent | c8a9a619c072e9a45e9a9b4b035269427dc00aa8 (diff) |
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 <ziyao@disroot.org>
Tested-by: Drew Fustini <fustini@kernel.org>
Reviewed-by: Drew Fustini <fustini@kernel.org>
Link: https://patch.msgid.link/20250808093655.48074-4-ziyao@disroot.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'lib/mpi/mpi-add.c')
0 files changed, 0 insertions, 0 deletions