summaryrefslogtreecommitdiffstats
path: root/include/mci.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2021-06-07 12:44:03 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2021-06-10 15:16:12 +0200
commit6fb9b51fcaa302e935a31b7fce269589427b7aa0 (patch)
treeae15d3813e085fb6af5646e300f214ab4a558043 /include/mci.h
parenta3900f221692606410d404a9a48ed7b86ab38908 (diff)
downloadbarebox-6fb9b51fcaa302e935a31b7fce269589427b7aa0.tar.gz
barebox-6fb9b51fcaa302e935a31b7fce269589427b7aa0.tar.xz
mci: sdhci: port over some common functions from Linux
This adds some functions useful for SDHCI drivers from Linux: sdhci_calc_clk() sdhci_set_clock() sdhci_enable_clk() sdhci_read_caps() sdhci_set_bus_width() These functions can be used to further unify our different SDHCI drivers. All the new functions assume the also newly introduced sdhci_setup_host() has been called before using them. The functions are moslty the same as their Linux pendants, only sdhci_calc_clk() takes an addional clock rate argument where Linux uses host->max_clk. This is not suitable for the upcoming Rockchip driver which needs to adjust the input clock using clk_set_rate(), so fixed host->max_clk is not accurate for this driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://lore.barebox.org/20210607104411.23071-5-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/mci.h')
-rw-r--r--include/mci.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/mci.h b/include/mci.h
index 5e6805e8dc..df2437f618 100644
--- a/include/mci.h
+++ b/include/mci.h
@@ -365,6 +365,8 @@ enum mci_timing {
MMC_TIMING_UHS_SDR104 = 4,
MMC_TIMING_UHS_DDR50 = 5,
MMC_TIMING_MMC_HS200 = 6,
+ MMC_TIMING_MMC_DDR52 = 7,
+ MMC_TIMING_MMC_HS400 = 8,
};
struct mci_ios {