• Ben Wolsieffer's avatar
    net: stmmac: dwmac-stm32: refactor clock config · 4d177f49
    Ben Wolsieffer authored
    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>
    4d177f49
dwmac-stm32.c 14.1 KB