Skip to content
Commit 4d177f49 authored by Ben Wolsieffer's avatar Ben Wolsieffer Committed by David S. Miller
Browse files

net: stmmac: dwmac-stm32: refactor clock config



Currently, clock configuration is spread throughout the driver and
partially duplicated for the STM32MP1 and STM32 MCU variants. This makes
it difficult to keep track of which clocks need to be enabled or disabled
in various scenarios.

This patch adds symmetric stm32_dwmac_clk_enable/disable() functions
that handle all clock configuration, including quirks required while
suspending or resuming. syscfg_clk and clk_eth_ck are not present on
STM32 MCUs, but it is fine to try to configure them anyway since NULL
clocks are ignored.

Signed-off-by: default avatarBen Wolsieffer <ben.wolsieffer@hefring.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7497b0af
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment