summaryrefslogtreecommitdiff
path: root/include/mmc.h
diff options
context:
space:
mode:
authorNicolas Saenz Julienne <nsaenzjulienne@suse.de>2021-01-12 15:55:29 +0300
committerMatthias Brugger <mbrugger@suse.com>2021-02-18 13:59:08 +0300
commitc89c96d3222ca4f4ecfacd2cbaf560ff5d3d2a2f (patch)
tree649c47224bfe87021ee2af0109ffedd060fc7616 /include/mmc.h
parent1a474559d90a4b4f7acd95050fe759fe52395867 (diff)
downloadu-boot-c89c96d3222ca4f4ecfacd2cbaf560ff5d3d2a2f.tar.xz
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 <nsaenzjulienne@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Peter Robinson <pbrobinson@gmail.com> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Diffstat (limited to 'include/mmc.h')
-rw-r--r--include/mmc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/mmc.h b/include/mmc.h
index 1d377e0281..c12c7a0b5c 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 */