summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNicolas Saenz Julienne <[email protected]>2021-01-12 13:55:29 +0100
committerMatthias Brugger <[email protected]>2021-02-18 11:59:08 +0100
commitc89c96d3222ca4f4ecfacd2cbaf560ff5d3d2a2f (patch)
tree649c47224bfe87021ee2af0109ffedd060fc7616 /include
parent1a474559d90a4b4f7acd95050fe759fe52395867 (diff)
mmc: Introduce mmc_phys_to_bus()/mmc_bus_to_phys()
This will allow us to use DM variants of phys_to_bus()/bus_to_phys() when relevant. Signed-off-by: Nicolas Saenz Julienne <[email protected]> Reviewed-by: Simon Glass <[email protected]> Tested-by: Peter Robinson <[email protected]> Signed-off-by: Matthias Brugger <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/mmc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/mmc.h b/include/mmc.h
index 1d377e0281f..c12c7a0b5cf 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -736,6 +736,12 @@ struct mmc {
u8 hs400_tuning;
};
+#if CONFIG_IS_ENABLED(DM_MMC)
+#define mmc_to_dev(_mmc) _mmc->dev
+#else
+#define mmc_to_dev(_mmc) NULL
+#endif
+
struct mmc_hwpart_conf {
struct {
uint enh_start; /* in 512-byte sectors */