mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 17:44:19 +00:00

To correctly initialize the MMC devices, a power cycle is required. For this we need to: - disable vmmc-supply regulator - make the power cycle required for SDMMC2 peripheral - enable regulators Change-Id: I2be6d9082d1cc4c864a82cf2c31ff8522e2d31a2 Signed-off-by: Yann Gautier <yann.gautier@st.com>
35 lines
827 B
C
35 lines
827 B
C
/*
|
|
* 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 */
|