Browse Source

stm32/eth: Remove redundant ETH clock enable code.

The MAC clock was initialized both in eth_init() and eth_mac_init().  The
latter is not required.

Signed-off-by: robert-hh <robert@hammelrath.com>
pull/13630/head
robert-hh 9 months ago
committed by Damien George
parent
commit
085e3244f0
  1. 9
      ports/stm32/eth.c

9
ports/stm32/eth.c

@ -246,19 +246,12 @@ static int eth_mac_init(eth_t *self) {
#endif #endif
mpu_config_end(irq_state); mpu_config_end(irq_state);
// Enable peripheral clock // Set MAC to reset state
#if defined(STM32H5) #if defined(STM32H5)
__HAL_RCC_ETH_CLK_ENABLE();
__HAL_RCC_ETHTX_CLK_ENABLE();
__HAL_RCC_ETHRX_CLK_ENABLE();
__HAL_RCC_ETH_FORCE_RESET(); __HAL_RCC_ETH_FORCE_RESET();
#elif defined(STM32H7) #elif defined(STM32H7)
__HAL_RCC_ETH1MAC_CLK_ENABLE();
__HAL_RCC_ETH1TX_CLK_ENABLE();
__HAL_RCC_ETH1RX_CLK_ENABLE();
__HAL_RCC_ETH1MAC_FORCE_RESET(); __HAL_RCC_ETH1MAC_FORCE_RESET();
#else #else
__HAL_RCC_ETH_CLK_ENABLE();
__HAL_RCC_ETHMAC_FORCE_RESET(); __HAL_RCC_ETHMAC_FORCE_RESET();
#endif #endif

Loading…
Cancel
Save