Skip to content

Commit c4f78b6

Browse files
arnopoerwango
authored andcommitted
stm32cube: stm32mp2xx: eth: Fix ETH_DMA_XXX definitions
On the Ethernet peripheral, there are two DMA channels. As a consequence, the ETH_DMACSR_XXX definitions do not exist and should be replaced by ETH_DMAC0SR_CDE and ETH_DMAC1SR_CDE. While waiting for the fix in the STM32Cube distribution, the workaround is to replace ETH_DMACSR_XXX with ETH_DMAC0SR_XXX. Indeed, the bit definitions for ETH_DMAC0SR_XXX and ETH_DMAC1SR_XXX are identical. Signed-off-by: Arnaud Pouliquen <[email protected]>
1 parent d354938 commit c4f78b6

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

stm32cube/stm32mp2xx/README

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,13 @@ Patch List:
7272
stm32cube/stm32mp2xx/drivers/src/stm32mp2xx_hal_dcmipp.c
7373
Internal reference: 215688
7474

75+
*ethernet: Fix ETH_DMA_XXX definitions
76+
On the Ethernet peripheral, there are two DMA channels.
77+
As a consequence, the ETH_DMACSR_XXX definitions do not exist and
78+
should be replaced by ETH_DMAC0SR_CDE and ETH_DMAC1SR_CDE.
79+
The workaround is to replace ETH_DMACSR_XXX with ETH_DMAC0SR_XXX.
80+
Impacted file:
81+
stm32cube/stm32mp13xx/drivers/include/stm32mp13xx_hal_eth.h
82+
Internal reference: 220075
83+
7584
See release_note.html from STM32Cube

stm32cube/stm32mp2xx/drivers/include/stm32mp2xx_hal_eth.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,13 +1291,13 @@ typedef struct
12911291
#define ETH_DMA_TX_DESC_WRITE_ERROR_FLAG 0x00060000U
12921292
#define ETH_DMA_TX_BUFFER_READ_ERROR_FLAG 0x00050000U
12931293
#define ETH_DMA_TX_BUFFER_WRITE_ERROR_FLAG 0x00040000U
1294-
#define ETH_DMA_CONTEXT_DESC_ERROR_FLAG ETH_DMACSR_CDE
1295-
#define ETH_DMA_FATAL_BUS_ERROR_FLAG ETH_DMACSR_FBE
1296-
#define ETH_DMA_EARLY_TX_IT_FLAG ETH_DMACSR_ERI
1297-
#define ETH_DMA_RX_WATCHDOG_TIMEOUT_FLAG ETH_DMACSR_RWT
1298-
#define ETH_DMA_RX_PROCESS_STOPPED_FLAG ETH_DMACSR_RPS
1299-
#define ETH_DMA_RX_BUFFER_UNAVAILABLE_FLAG ETH_DMACSR_RBU
1300-
#define ETH_DMA_TX_PROCESS_STOPPED_FLAG ETH_DMACSR_TPS
1294+
#define ETH_DMA_CONTEXT_DESC_ERROR_FLAG ETH_DMAC0SR_CDE
1295+
#define ETH_DMA_FATAL_BUS_ERROR_FLAG ETH_DMAC0SR_FBE
1296+
#define ETH_DMA_EARLY_TX_IT_FLAG ETH_DMAC0SR_ERI
1297+
#define ETH_DMA_RX_WATCHDOG_TIMEOUT_FLAG ETH_DMAC0SR_RWT
1298+
#define ETH_DMA_RX_PROCESS_STOPPED_FLAG ETH_DMAC0SR_RPS
1299+
#define ETH_DMA_RX_BUFFER_UNAVAILABLE_FLAG ETH_DMAC0SR_RBU
1300+
#define ETH_DMA_TX_PROCESS_STOPPED_FLAG ETH_DMAC0SR_TPS
13011301
/**
13021302
* @}
13031303
*/

0 commit comments

Comments
 (0)