Yann Gautier | 5380b0d | 2018-10-15 09:36:04 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2017-2018, 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 | |
Yann Gautier | 5380b0d | 2018-10-15 09:36:04 +0200 | [diff] [blame] | 10 | #include <stdbool.h> |
| 11 | |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 12 | #include <drivers/mmc.h> |
| 13 | |
Yann Gautier | 5380b0d | 2018-10-15 09:36:04 +0200 | [diff] [blame] | 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 | bool use_dma; |
| 26 | }; |
| 27 | |
| 28 | unsigned long long stm32_sdmmc2_mmc_get_device_size(void); |
| 29 | int stm32_sdmmc2_mmc_init(struct stm32_sdmmc2_params *params); |
| 30 | bool plat_sdmmc2_use_dma(unsigned int instance, unsigned int memory); |
| 31 | |
| 32 | #endif /* STM32_SDMMC2_H */ |