disk: Add support for MCUs with SDIO drivers.

Use abstracted define to cover more MCUs.

Signed-off-by: John Kjellberg <kjellberg.john@gmail.com>
This commit is contained in:
John Kjellberg 2021-07-13 18:32:38 +02:00 committed by Christopher Friedt
commit 0647b2e0a8

View file

@ -18,6 +18,10 @@
LOG_MODULE_REGISTER(stm32_sdmmc, CONFIG_SDMMC_LOG_LEVEL); LOG_MODULE_REGISTER(stm32_sdmmc, CONFIG_SDMMC_LOG_LEVEL);
#ifndef MMC_TypeDef
#define MMC_TypeDef SDMMC_TypeDef
#endif
struct stm32_sdmmc_priv { struct stm32_sdmmc_priv {
SD_HandleTypeDef hsd; SD_HandleTypeDef hsd;
int status; int status;
@ -402,7 +406,7 @@ static const struct soc_gpio_pinctrl sdmmc_pins_1[] =
static struct stm32_sdmmc_priv stm32_sdmmc_priv_1 = { static struct stm32_sdmmc_priv stm32_sdmmc_priv_1 = {
.hsd = { .hsd = {
.Instance = (SDMMC_TypeDef *)DT_INST_REG_ADDR(0), .Instance = (MMC_TypeDef *)DT_INST_REG_ADDR(0),
}, },
#if DT_INST_NODE_HAS_PROP(0, cd_gpios) #if DT_INST_NODE_HAS_PROP(0, cd_gpios)
.cd = { .cd = {