]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: stmmac: dwmac-rk: rework optional clock handling
authorSebastian Reichel <sebastian.reichel@collabora.com>
Fri, 7 Apr 2023 16:11:28 +0000 (18:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:03:21 +0000 (23:03 +0900)
commitb787c427e093455f668c95bdbeddbab5fba0f47e
tree899d949a82cb88aeac8cf5089ff2fb3e92a4fdd2
parent2eb92126f4e2105b1ef0e8b9d9f30921c7a7debb
net: ethernet: stmmac: dwmac-rk: rework optional clock handling

[ Upstream commit ea449f7fa0bf3fcd02e04a770b9ff707bf5e8f96 ]

The clock requesting code is quite repetitive. Fix this by requesting
the clocks via devm_clk_bulk_get_optional. The optional variant has been
used, since this is effectively what the old code did. The exact clocks
required depend on the platform and configuration. As a side effect
this change adds correct -EPROBE_DEFER handling.

Suggested-by: Jakub Kicinski <kuba@kernel.org>
Suggested-by: Andrew Lunn <andrew@lunn.ch>
Fixes: cc3d0194bb71 ("GMAC: add driver for Rockchip RK3288 SoCs integrated GMAC")
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c