blob: 4853208c2bed7e4d3b744d3883d71bc8a82aebfd [file] [log] [blame]
Yann Gautier5380b0d2018-10-15 09:36:04 +02001/*
Yann Gautier3194afe2019-05-28 11:54:50 +02002 * Copyright (c) 2017-2019, STMicroelectronics - All Rights Reserved
Yann Gautier5380b0d2018-10-15 09:36:04 +02003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef STM32_SDMMC2_H
8#define STM32_SDMMC2_H
9
Yann Gautier5380b0d2018-10-15 09:36:04 +020010#include <stdbool.h>
11
Antonio Nino Diaze0f90632018-12-14 00:18:21 +000012#include <drivers/mmc.h>
13
Yann Gautier5380b0d2018-10-15 09:36:04 +020014struct 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 Gautier3194afe2019-05-28 11:54:50 +020025 unsigned int max_freq;
Yann Gautier5380b0d2018-10-15 09:36:04 +020026 bool use_dma;
27};
28
29unsigned long long stm32_sdmmc2_mmc_get_device_size(void);
30int stm32_sdmmc2_mmc_init(struct stm32_sdmmc2_params *params);
31bool plat_sdmmc2_use_dma(unsigned int instance, unsigned int memory);
32
33#endif /* STM32_SDMMC2_H */