1 /* 2 * Copyright (c) 2017-2019, 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 14 struct stm32_sdmmc2_params { 15 uintptr_t reg_base; 16 unsigned int clk_rate; 17 unsigned int bus_width; 18 unsigned int flags; 19 struct mmc_device_info *device_info; 20 unsigned int pin_ckin; 21 unsigned int negedge; 22 unsigned int dirpol; 23 unsigned int clock_id; 24 unsigned int reset_id; 25 unsigned int max_freq; 26 bool use_dma; 27 }; 28 29 unsigned long long stm32_sdmmc2_mmc_get_device_size(void); 30 int stm32_sdmmc2_mmc_init(struct stm32_sdmmc2_params *params); 31 bool plat_sdmmc2_use_dma(unsigned int instance, unsigned int memory); 32 33 #endif /* STM32_SDMMC2_H */ 34