aboutsummaryrefslogtreecommitdiffstats
path: root/include/drivers
diff options
context:
space:
mode:
authorYann Gautier <yann.gautier@st.com>2018-10-15 09:36:04 +0200
committerYann Gautier <yann.gautier@st.com>2018-10-15 09:36:04 +0200
commit8e2e5e8b182abfc2034a4730804b870f0cc2d7f9 (patch)
tree174ec66d804fc00a837477cb1cb4222b40b35df5 /include/drivers
parent0a09313ec780d2f66efcda3eb2a5d1632719bd81 (diff)
downloadplatform_external_arm-trusted-firmware-8e2e5e8b182abfc2034a4730804b870f0cc2d7f9.tar.gz
platform_external_arm-trusted-firmware-8e2e5e8b182abfc2034a4730804b870f0cc2d7f9.tar.bz2
platform_external_arm-trusted-firmware-8e2e5e8b182abfc2034a4730804b870f0cc2d7f9.zip
stm32mp1: add sdmmc2 driver
This driver is for the STMicroelectronics sdmmc2 IP which is in STM32MP1 SoC. It uses the MMC framework, and can address either eMMC or SD-card. Signed-off-by: Yann Gautier <yann.gautier@st.com>
Diffstat (limited to 'include/drivers')
-rw-r--r--include/drivers/st/stm32_sdmmc2.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/drivers/st/stm32_sdmmc2.h b/include/drivers/st/stm32_sdmmc2.h
new file mode 100644
index 000000000..b17265926
--- /dev/null
+++ b/include/drivers/st/stm32_sdmmc2.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2017-2018, STMicroelectronics - All Rights Reserved
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef STM32_SDMMC2_H
+#define STM32_SDMMC2_H
+
+#include <mmc.h>
+#include <stdbool.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;
+ bool use_dma;
+};
+
+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 */