Skip to content

Commit 30fb6a7

Browse files
committed
stm32/eth.c: Remove redundant 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>
1 parent 3e32374 commit 30fb6a7

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

ports/stm32/eth.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -246,19 +246,12 @@ STATIC int eth_mac_init(eth_t *self) {
246246
#endif
247247
mpu_config_end(irq_state);
248248

249-
// Enable peripheral clock
249+
// Set MAC to reset state
250250
#if defined(STM32H5)
251-
__HAL_RCC_ETH_CLK_ENABLE();
252-
__HAL_RCC_ETHTX_CLK_ENABLE();
253-
__HAL_RCC_ETHRX_CLK_ENABLE();
254251
__HAL_RCC_ETH_FORCE_RESET();
255252
#elif defined(STM32H7)
256-
__HAL_RCC_ETH1MAC_CLK_ENABLE();
257-
__HAL_RCC_ETH1TX_CLK_ENABLE();
258-
__HAL_RCC_ETH1RX_CLK_ENABLE();
259253
__HAL_RCC_ETH1MAC_FORCE_RESET();
260254
#else
261-
__HAL_RCC_ETH_CLK_ENABLE();
262255
__HAL_RCC_ETHMAC_FORCE_RESET();
263256
#endif
264257

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy