1 /* 2 * Copyright (c) 2017-2021, STMicroelectronics - All Rights Reserved 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef STM32_SDMMC2_H 8 #define STM32_SDMMC2_H 9 10 #include <stdbool.h> 11 12 #include <drivers/mmc.h> 13 #include <drivers/st/regulator.h> 14 15 struct stm32_sdmmc2_params { 16 uintptr_t reg_base; 17 unsigned int clk_rate; 18 unsigned int bus_width; 19 unsigned int flags; 20 struct mmc_device_info *device_info; 21 unsigned int pin_ckin; 22 unsigned int negedge; 23 unsigned int dirpol; 24 unsigned int clock_id; 25 unsigned int reset_id; 26 unsigned int max_freq; 27 bool use_dma; 28 struct rdev *vmmc_regu; 29 }; 30 31 unsigned long long stm32_sdmmc2_mmc_get_device_size(void); 32 int stm32_sdmmc2_mmc_init(struct stm32_sdmmc2_params *params); 33 bool plat_sdmmc2_use_dma(unsigned int instance, unsigned int memory); 34 35 #endif /* STM32_SDMMC2_H */ 36