diff options
author | Simon Glass <sjg@chromium.org> | 2020-02-03 07:36:16 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-02-05 19:33:46 -0700 |
commit | 336d4615f8fa774557d14f9b3245daa9e5fe3dbc (patch) | |
tree | 7a4d2d33113f44238d64e7e409fd3aafef63c2ed /drivers/mmc | |
parent | 61b29b82683863a970fd4609a7c58512872616bc (diff) |
dm: core: Create a new header file for 'compat' features
At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.
Move the compatibility features into a separate header file.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/am654_sdhci.c | 1 | ||||
-rw-r--r-- | drivers/mmc/arm_pl180_mmci.c | 1 | ||||
-rw-r--r-- | drivers/mmc/bcm2835_sdhost.c | 1 | ||||
-rw-r--r-- | drivers/mmc/fsl_esdhc.c | 1 | ||||
-rw-r--r-- | drivers/mmc/fsl_esdhc_imx.c | 1 | ||||
-rw-r--r-- | drivers/mmc/jz_mmc.c | 1 | ||||
-rw-r--r-- | drivers/mmc/mmc-uclass.c | 2 | ||||
-rw-r--r-- | drivers/mmc/msm_sdhci.c | 1 | ||||
-rw-r--r-- | drivers/mmc/mtk-sd.c | 1 | ||||
-rw-r--r-- | drivers/mmc/renesas-sdhi.c | 2 | ||||
-rw-r--r-- | drivers/mmc/sdhci-cadence.c | 1 | ||||
-rw-r--r-- | drivers/mmc/sh_mmcif.c | 1 | ||||
-rw-r--r-- | drivers/mmc/sh_sdhi.c | 1 | ||||
-rw-r--r-- | drivers/mmc/snps_dw_mmc.c | 1 | ||||
-rw-r--r-- | drivers/mmc/socfpga_dw_mmc.c | 1 | ||||
-rw-r--r-- | drivers/mmc/stm32_sdmmc2.c | 1 | ||||
-rw-r--r-- | drivers/mmc/tmio-common.c | 1 | ||||
-rw-r--r-- | drivers/mmc/uniphier-sd.c | 2 | ||||
-rw-r--r-- | drivers/mmc/zynq_sdhci.c | 1 |
19 files changed, 22 insertions, 0 deletions
diff --git a/drivers/mmc/am654_sdhci.c b/drivers/mmc/am654_sdhci.c index 6053d3d536..aad9d8b85b 100644 --- a/drivers/mmc/am654_sdhci.c +++ b/drivers/mmc/am654_sdhci.c @@ -12,6 +12,7 @@ #include <power-domain.h> #include <regmap.h> #include <sdhci.h> +#include <dm/device_compat.h> #include <linux/err.h> /* CTL_CFG Registers */ diff --git a/drivers/mmc/arm_pl180_mmci.c b/drivers/mmc/arm_pl180_mmci.c index ea8eb0d509..d396afc14c 100644 --- a/drivers/mmc/arm_pl180_mmci.c +++ b/drivers/mmc/arm_pl180_mmci.c @@ -16,6 +16,7 @@ #include <errno.h> #include <malloc.h> #include <mmc.h> +#include <dm/device_compat.h> #include <asm/io.h> #include <asm-generic/gpio.h> diff --git a/drivers/mmc/bcm2835_sdhost.c b/drivers/mmc/bcm2835_sdhost.c index 7f70acaf39..8cebf99c58 100644 --- a/drivers/mmc/bcm2835_sdhost.c +++ b/drivers/mmc/bcm2835_sdhost.c @@ -36,6 +36,7 @@ #include <asm/arch/msg.h> #include <asm/arch/mbox.h> #include <asm/unaligned.h> +#include <dm/device_compat.h> #include <linux/compat.h> #include <linux/io.h> #include <linux/iopoll.h> diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index 112f115015..ab40019ccb 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -22,6 +22,7 @@ #include <fdt_support.h> #include <asm/io.h> #include <dm.h> +#include <dm/device_compat.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c index 7cbd6e4587..4900498e9b 100644 --- a/drivers/mmc/fsl_esdhc_imx.c +++ b/drivers/mmc/fsl_esdhc_imx.c @@ -19,6 +19,7 @@ #include <hwconfig.h> #include <mmc.h> #include <part.h> +#include <dm/device_compat.h> #include <linux/err.h> #include <power/regulator.h> #include <malloc.h> diff --git a/drivers/mmc/jz_mmc.c b/drivers/mmc/jz_mmc.c index cb2a7c3eb5..8d4f886cb4 100644 --- a/drivers/mmc/jz_mmc.c +++ b/drivers/mmc/jz_mmc.c @@ -12,6 +12,7 @@ #include <asm/io.h> #include <asm/unaligned.h> #include <errno.h> +#include <dm/device_compat.h> #include <mach/jz4780.h> #include <wait_bit.h> diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c index c7a832ca90..0b90a97650 100644 --- a/drivers/mmc/mmc-uclass.c +++ b/drivers/mmc/mmc-uclass.c @@ -8,7 +8,9 @@ #include <mmc.h> #include <dm.h> #include <dm/device-internal.h> +#include <dm/device_compat.h> #include <dm/lists.h> +#include <linux/compat.h> #include "mmc_private.h" int dm_mmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c index cae42ec4ac..da3ae2ec35 100644 --- a/drivers/mmc/msm_sdhci.c +++ b/drivers/mmc/msm_sdhci.c @@ -10,6 +10,7 @@ #include <common.h> #include <clk.h> #include <dm.h> +#include <malloc.h> #include <sdhci.h> #include <wait_bit.h> #include <asm/io.h> diff --git a/drivers/mmc/mtk-sd.c b/drivers/mmc/mtk-sd.c index d4870818a8..bd1fb09d1c 100644 --- a/drivers/mmc/mtk-sd.c +++ b/drivers/mmc/mtk-sd.c @@ -15,6 +15,7 @@ #include <mapmem.h> #include <stdbool.h> #include <asm/gpio.h> +#include <dm/device_compat.h> #include <dm/pinctrl.h> #include <linux/bitops.h> #include <linux/io.h> diff --git a/drivers/mmc/renesas-sdhi.c b/drivers/mmc/renesas-sdhi.c index e01ac310e9..c3b13136f8 100644 --- a/drivers/mmc/renesas-sdhi.c +++ b/drivers/mmc/renesas-sdhi.c @@ -6,8 +6,10 @@ #include <common.h> #include <clk.h> #include <fdtdec.h> +#include <malloc.h> #include <mmc.h> #include <dm.h> +#include <dm/device_compat.h> #include <linux/compat.h> #include <linux/dma-direction.h> #include <linux/io.h> diff --git a/drivers/mmc/sdhci-cadence.c b/drivers/mmc/sdhci-cadence.c index 4736263bf2..e9108dabd1 100644 --- a/drivers/mmc/sdhci-cadence.c +++ b/drivers/mmc/sdhci-cadence.c @@ -6,6 +6,7 @@ #include <common.h> #include <dm.h> +#include <dm/device_compat.h> #include <linux/bitfield.h> #include <linux/io.h> #include <linux/iopoll.h> diff --git a/drivers/mmc/sh_mmcif.c b/drivers/mmc/sh_mmcif.c index c8875ce8f8..29bbb4b3a6 100644 --- a/drivers/mmc/sh_mmcif.c +++ b/drivers/mmc/sh_mmcif.c @@ -13,6 +13,7 @@ #include <clk.h> #include <dm.h> #include <malloc.h> +#include <dm/device_compat.h> #include <linux/errno.h> #include <linux/compat.h> #include <linux/io.h> diff --git a/drivers/mmc/sh_sdhi.c b/drivers/mmc/sh_sdhi.c index e38e8abfef..2202158c88 100644 --- a/drivers/mmc/sh_sdhi.c +++ b/drivers/mmc/sh_sdhi.c @@ -13,6 +13,7 @@ #include <malloc.h> #include <mmc.h> #include <dm.h> +#include <dm/device_compat.h> #include <linux/errno.h> #include <linux/compat.h> #include <linux/io.h> diff --git a/drivers/mmc/snps_dw_mmc.c b/drivers/mmc/snps_dw_mmc.c index 5a413f0ec7..c606ef011b 100644 --- a/drivers/mmc/snps_dw_mmc.c +++ b/drivers/mmc/snps_dw_mmc.c @@ -13,6 +13,7 @@ #include <dwmmc.h> #include <errno.h> #include <fdtdec.h> +#include <dm/device_compat.h> #include <linux/libfdt.h> #include <linux/err.h> #include <malloc.h> diff --git a/drivers/mmc/socfpga_dw_mmc.c b/drivers/mmc/socfpga_dw_mmc.c index 568a3e77d3..786cdc700a 100644 --- a/drivers/mmc/socfpga_dw_mmc.c +++ b/drivers/mmc/socfpga_dw_mmc.c @@ -11,6 +11,7 @@ #include <dwmmc.h> #include <errno.h> #include <fdtdec.h> +#include <dm/device_compat.h> #include <linux/libfdt.h> #include <linux/err.h> #include <malloc.h> diff --git a/drivers/mmc/stm32_sdmmc2.c b/drivers/mmc/stm32_sdmmc2.c index 0a7a2fe624..6f3b2ad653 100644 --- a/drivers/mmc/stm32_sdmmc2.c +++ b/drivers/mmc/stm32_sdmmc2.c @@ -9,6 +9,7 @@ #include <cpu_func.h> #include <dm.h> #include <fdtdec.h> +#include <malloc.h> #include <linux/libfdt.h> #include <mmc.h> #include <reset.h> diff --git a/drivers/mmc/tmio-common.c b/drivers/mmc/tmio-common.c index 5a8506dcb6..092b740f56 100644 --- a/drivers/mmc/tmio-common.c +++ b/drivers/mmc/tmio-common.c @@ -11,6 +11,7 @@ #include <fdtdec.h> #include <mmc.h> #include <dm.h> +#include <dm/device_compat.h> #include <dm/pinctrl.h> #include <linux/compat.h> #include <linux/dma-direction.h> diff --git a/drivers/mmc/uniphier-sd.c b/drivers/mmc/uniphier-sd.c index 8f89bda233..4dbe71fa2e 100644 --- a/drivers/mmc/uniphier-sd.c +++ b/drivers/mmc/uniphier-sd.c @@ -7,8 +7,10 @@ #include <common.h> #include <clk.h> #include <fdtdec.h> +#include <malloc.h> #include <mmc.h> #include <dm.h> +#include <dm/device_compat.h> #include <linux/compat.h> #include <linux/dma-direction.h> #include <linux/io.h> diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c index 83c32a361a..24fabeee95 100644 --- a/drivers/mmc/zynq_sdhci.c +++ b/drivers/mmc/zynq_sdhci.c @@ -10,6 +10,7 @@ #include <dm.h> #include <fdtdec.h> #include "mmc_private.h" +#include <dm/device_compat.h> #include <linux/err.h> #include <linux/libfdt.h> #include <malloc.h> |