mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-01-22 01:30:35 -05:00
stm32h7: detect unsupported SDMMC transfers to ITCM
Change-Id: I4916829155d334148bf9683a9a66a125ef90a1f4
This commit is contained in:
parent
3da69af83c
commit
047871c58a
1 changed files with 11 additions and 1 deletions
|
|
@ -45,7 +45,7 @@
|
|||
#define DATA_SUCCESS_BITS \
|
||||
__reg_orm(SDMMC_STAR, DATAEND)
|
||||
#define DATA_ERROR_BITS \
|
||||
__reg_orm(SDMMC_STAR, DTIMEOUT, DABORT, DCRCFAIL, TXUNDERR, RXOVERR)
|
||||
__reg_orm(SDMMC_STAR, IDMATE, DTIMEOUT, DABORT, DCRCFAIL, TXUNDERR, RXOVERR)
|
||||
#define DATA_END_BITS \
|
||||
(DATA_SUCCESS_BITS | DATA_ERROR_BITS)
|
||||
|
||||
|
|
@ -284,6 +284,16 @@ int stm32h7_sdmmc_submit_command(void *controller,
|
|||
(uintptr_t)buff_addr < STM32_DTCM_BASE + STM32_DTCM_SIZE)
|
||||
panicf("%s: buffer in DTCM not supported", __func__);
|
||||
|
||||
/*
|
||||
* Must assign to a variable to prevent GCC from whining
|
||||
* about 'limited range of data type', because the ITCM
|
||||
* is mapped at address 0.
|
||||
*/
|
||||
static const uintptr_t itcm_base = STM32_ITCM_BASE;
|
||||
if ((uintptr_t)buff_addr >= itcm_base &&
|
||||
(uintptr_t)buff_addr < itcm_base + STM32_ITCM_SIZE)
|
||||
panicf("%s: buffer in ITCM not supported", __func__);
|
||||
|
||||
/* Set block size */
|
||||
uint32_t dctrl = 0;
|
||||
uint32_t dblocksize = find_first_set_bit(cmd->block_len);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue