From c89c96d3222ca4f4ecfacd2cbaf560ff5d3d2a2f Mon Sep 17 00:00:00 2001 From: Nicolas Saenz Julienne Date: Tue, 12 Jan 2021 13:55:29 +0100 Subject: 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 Reviewed-by: Simon Glass Tested-by: Peter Robinson Signed-off-by: Matthias Brugger --- include/mmc.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') 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 */ -- cgit