diff options
author | Nicolas Saenz Julienne | 2021-01-12 13:55:29 +0100 |
---|---|---|
committer | Matthias Brugger | 2021-02-18 11:59:08 +0100 |
commit | c89c96d3222ca4f4ecfacd2cbaf560ff5d3d2a2f (patch) | |
tree | 649c47224bfe87021ee2af0109ffedd060fc7616 /include/mmc.h | |
parent | 1a474559d90a4b4f7acd95050fe759fe52395867 (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 <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.h | 6 |
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 */ |