summaryrefslogtreecommitdiff
path: root/include/drivers/st/stm32_sdmmc2.h
blob: c83f62509aef1d90e9390ced02121db14a7bca97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
 * Copyright (c) 2017-2021, STMicroelectronics - All Rights Reserved
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#ifndef STM32_SDMMC2_H
#define STM32_SDMMC2_H

#include <stdbool.h>

#include <drivers/mmc.h>
#include <drivers/st/regulator.h>

struct stm32_sdmmc2_params {
	uintptr_t		reg_base;
	unsigned int		clk_rate;
	unsigned int		bus_width;
	unsigned int		flags;
	struct mmc_device_info	*device_info;
	unsigned int		pin_ckin;
	unsigned int		negedge;
	unsigned int		dirpol;
	unsigned int		clock_id;
	unsigned int		reset_id;
	unsigned int		max_freq;
	bool			use_dma;
	struct rdev		*vmmc_regu;
};

unsigned long long stm32_sdmmc2_mmc_get_device_size(void);
int stm32_sdmmc2_mmc_init(struct stm32_sdmmc2_params *params);
bool plat_sdmmc2_use_dma(unsigned int instance, unsigned int memory);

#endif /* STM32_SDMMC2_H */