Yann Gautier | 8e2e5e8 | 2018-10-15 09:36:04 +0200 | [diff] [blame] | 1 | /* |
Yann Gautier | 2c2c9f1 | 2019-05-28 11:54:50 +0200 | [diff] [blame^] | 2 | * Copyright (c) 2017-2019, STMicroelectronics - All Rights Reserved |
Yann Gautier | 8e2e5e8 | 2018-10-15 09:36:04 +0200 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #ifndef STM32_SDMMC2_H |
| 8 | #define STM32_SDMMC2_H |
| 9 | |
Yann Gautier | 8e2e5e8 | 2018-10-15 09:36:04 +0200 | [diff] [blame] | 10 | #include <stdbool.h> |
| 11 | |
Antonio Nino Diaz | 09d40e0 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 12 | #include <drivers/mmc.h> |
| 13 | |
Yann Gautier | 8e2e5e8 | 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; |
Yann Gautier | 2c2c9f1 | 2019-05-28 11:54:50 +0200 | [diff] [blame^] | 25 | unsigned int max_freq; |
Yann Gautier | 8e2e5e8 | 2018-10-15 09:36:04 +0200 | [diff] [blame] | 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 */ |