blob: aa9472c8303d7f92e9fa9518a5610d08c3fdc419 [file] [log] [blame]
Yann Gautier5380b0d2018-10-15 09:36:04 +02001/*
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 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;
25 bool use_dma;
26};
27
28unsigned long long stm32_sdmmc2_mmc_get_device_size(void);
29int stm32_sdmmc2_mmc_init(struct stm32_sdmmc2_params *params);
30bool plat_sdmmc2_use_dma(unsigned int instance, unsigned int memory);
31
32#endif /* STM32_SDMMC2_H */