summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrobert-hh <robert@hammelrath.com>2024-02-11 12:33:08 +0100
committerDamien George <damien@micropython.org>2024-03-07 17:54:04 +1100
commit085e3244f0bc5a1ddaaad4ab32c33ce5545be4ac (patch)
tree37b3401e39ad96e09eb70a2341e52c439e6b1c9a
parent185ae18360f47f8d97070689116b398b019e14db (diff)
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>
-rw-r--r--ports/stm32/eth.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/ports/stm32/eth.c b/ports/stm32/eth.c
index e1e6f074c..f5bdcc152 100644
--- a/ports/stm32/eth.c
+++ b/ports/stm32/eth.c
@@ -246,19 +246,12 @@ static int eth_mac_init(eth_t *self) {
#endif
mpu_config_end(irq_state);
- // Enable peripheral clock
+ // Set MAC to reset state
#if defined(STM32H5)
- __HAL_RCC_ETH_CLK_ENABLE();
- __HAL_RCC_ETHTX_CLK_ENABLE();
- __HAL_RCC_ETHRX_CLK_ENABLE();
__HAL_RCC_ETH_FORCE_RESET();
#elif defined(STM32H7)
- __HAL_RCC_ETH1MAC_CLK_ENABLE();
- __HAL_RCC_ETH1TX_CLK_ENABLE();
- __HAL_RCC_ETH1RX_CLK_ENABLE();
__HAL_RCC_ETH1MAC_FORCE_RESET();
#else
- __HAL_RCC_ETH_CLK_ENABLE();
__HAL_RCC_ETHMAC_FORCE_RESET();
#endif