]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: stmmac: dwmac-stm32: Add test to verify if ETHCK is used before checking clk...
authorChristophe Roullier <christophe.roullier@foss.st.com>
Mon, 1 Jul 2024 06:48:37 +0000 (08:48 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 2 Jul 2024 13:47:09 +0000 (15:47 +0200)
commit3cd1d4651cebe9776a0142ade36ff9f2e3545436
tree57a58f0e5214b32ce68a60cee8d68fca74f1ffde
parentd01e0e98de31f9cc5cf328f5eb7ae3d7a13c1021
net: stmmac: dwmac-stm32: Add test to verify if ETHCK is used before checking clk rate

When we want to use clock from RCC to clock Ethernet PHY (with ETHCK)
we need to check if value of clock rate is authorized.
If ETHCK is unused, the ETHCK frequency is 0Hz and validation fails.
It makes no sense to validate unused ETHCK, so skip the validation.

Fixes: 582ac134963e ("net: stmmac: dwmac-stm32: Separate out external clock rate validation")
Signed-off-by: Christophe Roullier <christophe.roullier@foss.st.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Tested-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c