aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-imx/cmd_nandbcb.c1
-rw-r--r--arch/arm/mach-imx/imx8/image.c1
-rw-r--r--arch/arm/mach-mvebu/mbus.c1
-rw-r--r--arch/arm/mach-rockchip/rk3288/rk3288.c1
-rw-r--r--arch/arm/mach-rockchip/rk3308/rk3308.c1
-rw-r--r--arch/arm/mach-socfpga/clock_manager_agilex.c1
-rw-r--r--arch/arm/mach-socfpga/clock_manager_arria10.c1
-rw-r--r--arch/arm/mach-stm32mp/pwr_regulator.c1
-rw-r--r--arch/arm/mach-tegra/cboot.c1
-rw-r--r--arch/arm/mach-zynq/clk.c1
-rw-r--r--arch/arm/mach-zynq/timer.c1
-rw-r--r--arch/mips/mach-mtmips/cpu.c1
-rw-r--r--arch/mips/mach-pic32/cpu.c1
-rw-r--r--arch/sandbox/cpu/cpu.c1
-rw-r--r--arch/x86/cpu/apollolake/fsp_s.c1
-rw-r--r--arch/x86/cpu/apollolake/spl.c1
-rw-r--r--arch/x86/cpu/apollolake/uart.c1
-rw-r--r--arch/x86/cpu/intel_common/itss.c1
-rw-r--r--arch/x86/cpu/qemu/e820.c1
-rw-r--r--arch/x86/cpu/qfw_cpu.c1
-rw-r--r--arch/x86/lib/coreboot_table.c1
-rw-r--r--arch/x86/lib/fsp1/fsp_common.c1
-rw-r--r--arch/x86/lib/mrccache.c1
-rw-r--r--arch/x86/lib/tables.c1
-rw-r--r--board/compulab/common/common.c1
-rw-r--r--board/corscience/tricorder/tricorder.c1
-rw-r--r--board/gardena/smart-gateway-mt7688/board.c1
-rw-r--r--board/ge/common/vpd_reader.c1
-rw-r--r--board/isee/igep003x/board.c1
-rw-r--r--board/isee/igep00x0/igep00x0.c1
-rw-r--r--board/menlo/m53menlo/m53menlo.c1
-rw-r--r--board/microchip/pic32mzda/pic32mzda.c1
-rw-r--r--board/overo/overo.c1
-rw-r--r--board/siemens/common/board.c1
-rw-r--r--board/siemens/pxm2/board.c1
-rw-r--r--board/siemens/rut/board.c1
-rw-r--r--board/st/stm32mp1/stm32mp1.c1
-rw-r--r--board/synopsys/hsdk/clk-lib.c1
-rw-r--r--board/technexion/tao3530/tao3530.c1
-rw-r--r--board/ti/am335x/board.c1
-rw-r--r--board/ti/am57xx/board.c1
-rw-r--r--board/timll/devkit8000/devkit8000.c1
-rw-r--r--cmd/bootefi.c1
-rw-r--r--cmd/gpio.c1
-rw-r--r--cmd/host.c1
-rw-r--r--cmd/rng.c1
-rw-r--r--cmd/tpm-common.c1
-rw-r--r--cmd/ubi.c1
-rw-r--r--cmd/usb_mass_storage.c1
-rw-r--r--cmd/ximg.c1
-rw-r--r--common/android_ab.c1
-rw-r--r--common/autoboot.c1
-rw-r--r--common/image-fdt.c1
-rw-r--r--common/image.c1
-rw-r--r--common/usb.c1
-rw-r--r--common/usb_hub.c1
-rw-r--r--drivers/adc/stm32-adc-core.c1
-rw-r--r--drivers/adc/stm32-adc.c1
-rw-r--r--drivers/axi/sandbox_store.c1
-rw-r--r--drivers/block/blk-uclass.c1
-rw-r--r--drivers/block/sandbox.c1
-rw-r--r--drivers/clk/altera/clk-arria10.c2
-rw-r--r--drivers/clk/at91/clk-generated.c1
-rw-r--r--drivers/clk/at91/clk-h32mx.c1
-rw-r--r--drivers/clk/at91/clk-peripheral.c1
-rw-r--r--drivers/clk/clk-cdce9xx.c1
-rw-r--r--drivers/clk/clk-ti-sci.c2
-rw-r--r--drivers/clk/clk-uclass.c1
-rw-r--r--drivers/clk/clk_sandbox.c1
-rw-r--r--drivers/clk/clk_sandbox_ccf.c1
-rw-r--r--drivers/clk/clk_sandbox_test.c2
-rw-r--r--drivers/clk/clk_versal.c1
-rw-r--r--drivers/clk/clk_vexpress_osc.c1
-rw-r--r--drivers/clk/clk_zynq.c1
-rw-r--r--drivers/clk/clk_zynqmp.c2
-rw-r--r--drivers/clk/imx/clk-imx8.c1
-rw-r--r--drivers/clk/mvebu/armada-37xx-periph.c1
-rw-r--r--drivers/clk/mvebu/armada-37xx-tbg.c1
-rw-r--r--drivers/clk/rockchip/clk_px30.c1
-rw-r--r--drivers/clk/rockchip/clk_rk3036.c1
-rw-r--r--drivers/clk/rockchip/clk_rk3128.c1
-rw-r--r--drivers/clk/rockchip/clk_rk3188.c1
-rw-r--r--drivers/clk/rockchip/clk_rk322x.c1
-rw-r--r--drivers/clk/rockchip/clk_rk3288.c1
-rw-r--r--drivers/clk/rockchip/clk_rk3308.c1
-rw-r--r--drivers/clk/rockchip/clk_rk3328.c1
-rw-r--r--drivers/clk/rockchip/clk_rk3368.c1
-rw-r--r--drivers/clk/rockchip/clk_rk3399.c1
-rw-r--r--drivers/clk/rockchip/clk_rv1108.c1
-rw-r--r--drivers/clk/tegra/tegra-car-clk.c1
-rw-r--r--drivers/clk/uniphier/clk-uniphier-core.c1
-rw-r--r--drivers/core/devres.c1
-rw-r--r--drivers/core/of_access.c1
-rw-r--r--drivers/core/ofnode.c1
-rw-r--r--drivers/core/syscon-uclass.c1
-rw-r--r--drivers/ddr/altera/sdram_gen5.c1
-rw-r--r--drivers/ddr/altera/sdram_soc64.c1
-rw-r--r--drivers/dma/bcm6348-iudma.c1
-rw-r--r--drivers/dma/dma-uclass.c1
-rw-r--r--drivers/dma/sandbox-dma-test.c1
-rw-r--r--drivers/dma/ti/k3-udma.c1
-rw-r--r--drivers/firmware/ti_sci.c2
-rw-r--r--drivers/fpga/fpga.c1
-rw-r--r--drivers/gpio/74x164_gpio.c1
-rw-r--r--drivers/gpio/adi_gpio2.c1
-rw-r--r--drivers/gpio/at91_gpio.c1
-rw-r--r--drivers/gpio/atmel_pio4.c1
-rw-r--r--drivers/gpio/da8xx_gpio.c1
-rw-r--r--drivers/gpio/dwapb_gpio.c1
-rw-r--r--drivers/gpio/gpio-rcar.c2
-rw-r--r--drivers/gpio/kona_gpio.c1
-rw-r--r--drivers/gpio/mpc83xx_gpio.c1
-rw-r--r--drivers/gpio/mscc_sgpio.c1
-rw-r--r--drivers/gpio/mvgpio.c1
-rw-r--r--drivers/gpio/mxs_gpio.c1
-rw-r--r--drivers/gpio/pca953x_gpio.c1
-rw-r--r--drivers/gpio/pca9698.c1
-rw-r--r--drivers/gpio/sh_pfc.c1
-rw-r--r--drivers/gpio/spear_gpio.c1
-rw-r--r--drivers/gpio/stm32_gpio.c1
-rw-r--r--drivers/hwspinlock/hwspinlock-uclass.c2
-rw-r--r--drivers/hwspinlock/stm32_hwspinlock.c1
-rw-r--r--drivers/i2c/at91_i2c.c1
-rw-r--r--drivers/i2c/designware_i2c.c2
-rw-r--r--drivers/i2c/i2c-uniphier-f.c1
-rw-r--r--drivers/i2c/i2c-uniphier.c1
-rw-r--r--drivers/i2c/imx_lpi2c.c1
-rw-r--r--drivers/i2c/muxes/i2c-arb-gpio-challenge.c1
-rw-r--r--drivers/i2c/muxes/i2c-mux-gpio.c1
-rw-r--r--drivers/i2c/muxes/i2c-mux-uclass.c1
-rw-r--r--drivers/i2c/muxes/pca954x.c1
-rw-r--r--drivers/i2c/mxc_i2c.c1
-rw-r--r--drivers/i2c/rcar_i2c.c1
-rw-r--r--drivers/i2c/stm32f7_i2c.c1
-rw-r--r--drivers/i2c/xilinx_xiic.c1
-rw-r--r--drivers/led/led_gpio.c1
-rw-r--r--drivers/mailbox/k3-sec-proxy.c2
-rw-r--r--drivers/mailbox/mailbox-uclass.c1
-rw-r--r--drivers/mailbox/sandbox-mbox-test.c1
-rw-r--r--drivers/mailbox/sandbox-mbox.c1
-rw-r--r--drivers/mailbox/stm32-ipcc.c2
-rw-r--r--drivers/mailbox/tegra-hsp.c1
-rw-r--r--drivers/mailbox/zynqmp-ipi.c1
-rw-r--r--drivers/misc/imx8/scu_api.c1
-rw-r--r--drivers/misc/k3_avs.c1
-rw-r--r--drivers/misc/p2sb-uclass.c1
-rw-r--r--drivers/misc/stm32_rcc.c1
-rw-r--r--drivers/misc/tegra186_bpmp.c1
-rw-r--r--drivers/misc/vexpress_config.c1
-rw-r--r--drivers/mmc/am654_sdhci.c1
-rw-r--r--drivers/mmc/arm_pl180_mmci.c1
-rw-r--r--drivers/mmc/bcm2835_sdhost.c1
-rw-r--r--drivers/mmc/fsl_esdhc.c1
-rw-r--r--drivers/mmc/fsl_esdhc_imx.c1
-rw-r--r--drivers/mmc/jz_mmc.c1
-rw-r--r--drivers/mmc/mmc-uclass.c2
-rw-r--r--drivers/mmc/msm_sdhci.c1
-rw-r--r--drivers/mmc/mtk-sd.c1
-rw-r--r--drivers/mmc/renesas-sdhi.c2
-rw-r--r--drivers/mmc/sdhci-cadence.c1
-rw-r--r--drivers/mmc/sh_mmcif.c1
-rw-r--r--drivers/mmc/sh_sdhi.c1
-rw-r--r--drivers/mmc/snps_dw_mmc.c1
-rw-r--r--drivers/mmc/socfpga_dw_mmc.c1
-rw-r--r--drivers/mmc/stm32_sdmmc2.c1
-rw-r--r--drivers/mmc/tmio-common.c1
-rw-r--r--drivers/mmc/uniphier-sd.c2
-rw-r--r--drivers/mmc/zynq_sdhci.c1
-rw-r--r--drivers/mtd/hbmc-am654.c1
-rw-r--r--drivers/mtd/mtd_uboot.c1
-rw-r--r--drivers/mtd/nand/core.c1
-rw-r--r--drivers/mtd/nand/raw/atmel_nand.c1
-rw-r--r--drivers/mtd/nand/raw/brcmnand/brcmnand.c1
-rw-r--r--drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c3
-rw-r--r--drivers/mtd/nand/raw/denali.c2
-rw-r--r--drivers/mtd/nand/raw/denali_dt.c1
-rw-r--r--drivers/mtd/nand/raw/pxa3xx_nand.c1
-rw-r--r--drivers/mtd/nand/raw/sunxi_nand.c2
-rw-r--r--drivers/mtd/nand/raw/tegra_nand.c1
-rw-r--r--drivers/mtd/nand/raw/vf610_nfc.c1
-rw-r--r--drivers/mtd/nand/spi/core.c1
-rw-r--r--drivers/mtd/nand/spi/gigadevice.c1
-rw-r--r--drivers/mtd/nand/spi/macronix.c1
-rw-r--r--drivers/mtd/nand/spi/micron.c1
-rw-r--r--drivers/mtd/nand/spi/winbond.c1
-rw-r--r--drivers/mtd/renesas_rpc_hf.c2
-rw-r--r--drivers/mtd/spi/sf-uclass.c1
-rw-r--r--drivers/mtd/spi/spi-nor-core.c1
-rw-r--r--drivers/mtd/spi/spi-nor-tiny.c1
-rw-r--r--drivers/mtd/ubi/debug.c1
-rw-r--r--drivers/mtd/ubi/misc.c1
-rw-r--r--drivers/mtd/ubi/upd.c1
-rw-r--r--drivers/net/bcm6348-eth.c1
-rw-r--r--drivers/net/bcm6368-eth.c2
-rw-r--r--drivers/net/designware.c1
-rw-r--r--drivers/net/dwc_eth_qos.c1
-rw-r--r--drivers/net/dwmac_socfpga.c1
-rw-r--r--drivers/net/e1000.c1
-rw-r--r--drivers/net/e1000_spi.c1
-rw-r--r--drivers/net/fsl-mc/dpio/qbman_portal.c1
-rw-r--r--drivers/net/fsl-mc/mc.c1
-rw-r--r--drivers/net/fsl_enetc.c1
-rw-r--r--drivers/net/ftgmac100.c2
-rw-r--r--drivers/net/higmacv300.c1
-rw-r--r--drivers/net/mscc_eswitch/jr2_switch.c1
-rw-r--r--drivers/net/mscc_eswitch/luton_switch.c1
-rw-r--r--drivers/net/mscc_eswitch/ocelot_switch.c1
-rw-r--r--drivers/net/mscc_eswitch/serval_switch.c1
-rw-r--r--drivers/net/mscc_eswitch/servalt_switch.c1
-rw-r--r--drivers/net/mtk_eth.c1
-rw-r--r--drivers/net/mvneta.c1
-rw-r--r--drivers/net/mvpp2.c1
-rw-r--r--drivers/net/pch_gbe.c1
-rw-r--r--drivers/net/pfe_eth/pfe_driver.c1
-rw-r--r--drivers/net/pfe_eth/pfe_eth.c1
-rw-r--r--drivers/net/pfe_eth/pfe_firmware.c1
-rw-r--r--drivers/net/pfe_eth/pfe_mdio.c1
-rw-r--r--drivers/net/phy/fixed.c1
-rw-r--r--drivers/net/pic32_eth.c1
-rw-r--r--drivers/net/sandbox-raw-bus.c1
-rw-r--r--drivers/net/sni_ave.c8
-rw-r--r--drivers/net/sun8i_emac.c1
-rw-r--r--drivers/net/sunxi_emac.c1
-rw-r--r--drivers/net/ti/am65-cpsw-nuss.c2
-rw-r--r--drivers/net/ti/cpsw-common.c1
-rw-r--r--drivers/net/ti/cpsw.c1
-rw-r--r--drivers/net/ti/cpsw_mdio.c1
-rw-r--r--drivers/net/zynq_gem.c1
-rw-r--r--drivers/nvme/nvme.c2
-rw-r--r--drivers/pci/pci-aardvark.c1
-rw-r--r--drivers/pci/pci-uclass.c1
-rw-r--r--drivers/pci/pci_mvebu.c1
-rw-r--r--drivers/pci/pcie_dw_ti.c1
-rw-r--r--drivers/pci/pcie_fsl.c1
-rw-r--r--drivers/pci/pcie_imx.c1
-rw-r--r--drivers/pci/pcie_intel_fpga.c1
-rw-r--r--drivers/pci/pcie_mediatek.c1
-rw-r--r--drivers/phy/allwinner/phy-sun4i-usb.c1
-rw-r--r--drivers/phy/bcm6318-usbh-phy.c1
-rw-r--r--drivers/phy/bcm6348-usbh-phy.c1
-rw-r--r--drivers/phy/bcm6358-usbh-phy.c1
-rw-r--r--drivers/phy/bcm6368-usbh-phy.c1
-rw-r--r--drivers/phy/marvell/comphy_core.c1
-rw-r--r--drivers/phy/meson-g12a-usb2.c1
-rw-r--r--drivers/phy/meson-g12a-usb3-pcie.c1
-rw-r--r--drivers/phy/meson-gxl-usb2.c1
-rw-r--r--drivers/phy/meson-gxl-usb3.c1
-rw-r--r--drivers/phy/phy-mtk-tphy.c2
-rw-r--r--drivers/phy/phy-rcar-gen2.c2
-rw-r--r--drivers/phy/phy-rcar-gen3.c1
-rw-r--r--drivers/phy/phy-stm32-usbphyc.c1
-rw-r--r--drivers/phy/phy-ti-am654.c1
-rw-r--r--drivers/pinctrl/broadcom/pinctrl-bcm6838.c1
-rw-r--r--drivers/pinctrl/intel/pinctrl.c1
-rw-r--r--drivers/pinctrl/meson/pinctrl-meson.c2
-rw-r--r--drivers/pinctrl/mscc/mscc-common.c1
-rw-r--r--drivers/pinctrl/mtmips/pinctrl-mtmips-common.c1
-rw-r--r--drivers/pinctrl/mvebu/pinctrl-armada-37xx.c2
-rw-r--r--drivers/pinctrl/nxp/pinctrl-imx.c2
-rw-r--r--drivers/pinctrl/nxp/pinctrl-mxs.c1
-rw-r--r--drivers/pinctrl/pinctrl-generic.c1
-rw-r--r--drivers/pinctrl/pinctrl-single.c1
-rw-r--r--drivers/pinctrl/pinctrl-stmfx.c1
-rw-r--r--drivers/pinctrl/pinctrl-uclass.c2
-rw-r--r--drivers/pinctrl/pinctrl_stm32.c2
-rw-r--r--drivers/pinctrl/renesas/pfc.c1
-rw-r--r--drivers/pinctrl/uniphier/pinctrl-uniphier-core.c1
-rw-r--r--drivers/power/domain/bcm6328-power-domain.c1
-rw-r--r--drivers/power/domain/imx8-power-domain-legacy.c1
-rw-r--r--drivers/power/domain/imx8-power-domain.c1
-rw-r--r--drivers/power/domain/imx8m-power-domain.c1
-rw-r--r--drivers/power/domain/meson-ee-pwrc.c1
-rw-r--r--drivers/power/domain/meson-gx-pwrc-vpu.c1
-rw-r--r--drivers/power/domain/mtk-power-domain.c1
-rw-r--r--drivers/power/domain/power-domain-uclass.c1
-rw-r--r--drivers/power/domain/sandbox-power-domain-test.c1
-rw-r--r--drivers/power/domain/sandbox-power-domain.c1
-rw-r--r--drivers/power/domain/tegra186-power-domain.c1
-rw-r--r--drivers/power/domain/ti-sci-power-domain.c2
-rw-r--r--drivers/power/pmic/fan53555.c1
-rw-r--r--drivers/power/pmic/i2c_pmic_emul.c1
-rw-r--r--drivers/power/pmic/stpmic1.c1
-rw-r--r--drivers/power/regulator/pwm_regulator.c1
-rw-r--r--drivers/power/regulator/stm32-vrefbuf.c1
-rw-r--r--drivers/power/regulator/tps62360_regulator.c1
-rw-r--r--drivers/ram/k3-am654-ddrss.c1
-rw-r--r--drivers/ram/k3-j721e/k3-j721e-ddrss.c1
-rw-r--r--drivers/ram/stm32_sdram.c1
-rw-r--r--drivers/remoteproc/k3_system_controller.c1
-rw-r--r--drivers/remoteproc/rproc-elf-loader.c3
-rw-r--r--drivers/remoteproc/stm32_copro.c1
-rw-r--r--drivers/remoteproc/ti_k3_arm64_rproc.c1
-rw-r--r--drivers/remoteproc/ti_k3_dsp_rproc.c2
-rw-r--r--drivers/remoteproc/ti_k3_r5f_rproc.c2
-rw-r--r--drivers/reset/reset-bcm6345.c1
-rw-r--r--drivers/reset/reset-hisilicon.c1
-rw-r--r--drivers/reset/reset-imx7.c1
-rw-r--r--drivers/reset/reset-mediatek.c1
-rw-r--r--drivers/reset/reset-meson.c1
-rw-r--r--drivers/reset/reset-mtmips.c1
-rw-r--r--drivers/reset/reset-rockchip.c1
-rw-r--r--drivers/reset/reset-socfpga.c1
-rw-r--r--drivers/reset/reset-sunxi.c1
-rw-r--r--drivers/reset/reset-ti-sci.c2
-rw-r--r--drivers/reset/reset-uclass.c1
-rw-r--r--drivers/reset/reset-uniphier.c2
-rw-r--r--drivers/reset/sandbox-reset-test.c1
-rw-r--r--drivers/reset/sandbox-reset.c1
-rw-r--r--drivers/reset/sti-reset.c1
-rw-r--r--drivers/reset/stm32-reset.c1
-rw-r--r--drivers/reset/tegra-car-reset.c1
-rw-r--r--drivers/reset/tegra186-reset.c1
-rw-r--r--drivers/rtc/ds3232.c1
-rw-r--r--drivers/rtc/rv3029.c1
-rw-r--r--drivers/rtc/stm32_rtc.c2
-rw-r--r--drivers/serial/atmel_usart.c1
-rw-r--r--drivers/serial/serial-uclass.c1
-rw-r--r--drivers/serial/serial_bcm6345.c1
-rw-r--r--drivers/serial/serial_lpuart.c1
-rw-r--r--drivers/serial/serial_msm.c1
-rw-r--r--drivers/serial/serial_pic32.c1
-rw-r--r--drivers/serial/serial_stm32.c1
-rw-r--r--drivers/serial/serial_zynq.c1
-rw-r--r--drivers/smem/msm_smem.c1
-rw-r--r--drivers/soc/ti/k3-navss-ringacc.c1
-rw-r--r--drivers/sound/sound-uclass.c1
-rw-r--r--drivers/spi/atmel-quadspi.c2
-rw-r--r--drivers/spi/bcm63xx_hsspi.c1
-rw-r--r--drivers/spi/bcm63xx_spi.c1
-rw-r--r--drivers/spi/cadence_qspi.c1
-rw-r--r--drivers/spi/designware_spi.c1
-rw-r--r--drivers/spi/mvebu_a3700_spi.c1
-rw-r--r--drivers/spi/mxc_spi.c1
-rw-r--r--drivers/spi/spi-mem-nodm.c1
-rw-r--r--drivers/spi/spi-mem.c1
-rw-r--r--drivers/spi/spi-sunxi.c1
-rw-r--r--drivers/spi/stm32_qspi.c1
-rw-r--r--drivers/spi/stm32_spi.c2
-rw-r--r--drivers/spi/uniphier_spi.c1
-rw-r--r--drivers/spi/zynqmp_gqspi.c1
-rw-r--r--drivers/spmi/spmi-msm.c1
-rw-r--r--drivers/sysreset/sysreset-ti-sci.c1
-rw-r--r--drivers/tee/optee/core.c1
-rw-r--r--drivers/tee/optee/rpmb.c1
-rw-r--r--drivers/tee/optee/supplicant.c1
-rw-r--r--drivers/tee/tee-uclass.c3
-rw-r--r--drivers/timer/dw-apb-timer.c2
-rw-r--r--drivers/timer/ostm_timer.c1
-rw-r--r--drivers/timer/stm32_timer.c1
-rw-r--r--drivers/ufs/cdns-platform.c1
-rw-r--r--drivers/ufs/ti-j721e-ufs.c1
-rw-r--r--drivers/ufs/ufs.c1
-rw-r--r--drivers/usb/cdns3/cdns3-ti.c1
-rw-r--r--drivers/usb/cdns3/core.c1
-rw-r--r--drivers/usb/cdns3/drd.c1
-rw-r--r--drivers/usb/cdns3/ep0.c1
-rw-r--r--drivers/usb/cdns3/gadget.c1
-rw-r--r--drivers/usb/dwc3/core.c1
-rw-r--r--drivers/usb/dwc3/dwc3-omap.c1
-rw-r--r--drivers/usb/dwc3/dwc3-uniphier.c1
-rw-r--r--drivers/usb/dwc3/ep0.c1
-rw-r--r--drivers/usb/dwc3/gadget.c1
-rw-r--r--drivers/usb/dwc3/ti_usb_phy.c1
-rw-r--r--drivers/usb/gadget/dwc2_udc_otg.c1
-rw-r--r--drivers/usb/gadget/storage_common.c1
-rw-r--r--drivers/usb/gadget/udc/udc-core.c1
-rw-r--r--drivers/usb/host/dwc2.c1
-rw-r--r--drivers/usb/host/ehci-atmel.c1
-rw-r--r--drivers/usb/host/ehci-generic.c1
-rw-r--r--drivers/usb/host/ehci-hcd.c1
-rw-r--r--drivers/usb/host/ohci-da8xx.c2
-rw-r--r--drivers/usb/host/ohci-generic.c1
-rw-r--r--drivers/usb/host/r8a66597-hcd.c1
-rw-r--r--drivers/usb/host/xhci-rcar.c2
-rw-r--r--drivers/usb/musb-new/am35x.c1
-rw-r--r--drivers/usb/musb-new/da8xx.c1
-rw-r--r--drivers/usb/musb-new/musb_core.c1
-rw-r--r--drivers/usb/musb-new/musb_dsps.c1
-rw-r--r--drivers/usb/musb-new/musb_gadget.c1
-rw-r--r--drivers/usb/musb-new/musb_gadget_ep0.c1
-rw-r--r--drivers/usb/musb-new/musb_host.c1
-rw-r--r--drivers/usb/musb-new/musb_uboot.c1
-rw-r--r--drivers/usb/musb-new/omap2430.c1
-rw-r--r--drivers/usb/musb-new/pic32.c1
-rw-r--r--drivers/usb/musb-new/sunxi.c2
-rw-r--r--drivers/usb/musb-new/ti-musb.c1
-rw-r--r--drivers/usb/phy/omap_usb_phy.c1
-rw-r--r--drivers/video/atmel_hlcdfb.c1
-rw-r--r--drivers/video/console_truetype.c1
-rw-r--r--drivers/video/da8xx-fb.c1
-rw-r--r--drivers/video/dw_mipi_dsi.c1
-rw-r--r--drivers/video/hitachi_tx18d42vm_lcd.c1
-rw-r--r--drivers/video/mali_dp.c2
-rw-r--r--drivers/video/mvebu_lcd.c1
-rw-r--r--drivers/video/mxsfb.c1
-rw-r--r--drivers/video/orisetech_otm8009a.c1
-rw-r--r--drivers/video/pwm_backlight.c1
-rw-r--r--drivers/video/raydium-rm68200.c1
-rw-r--r--drivers/video/rockchip/rk3288_hdmi.c1
-rw-r--r--drivers/video/rockchip/rk_edp.c1
-rw-r--r--drivers/video/sandbox_osd.c1
-rw-r--r--drivers/video/scf0403_lcd.c1
-rw-r--r--drivers/video/ssd2828.c1
-rw-r--r--drivers/video/stm32/stm32_dsi.c1
-rw-r--r--drivers/video/stm32/stm32_ltdc.c1
-rw-r--r--drivers/video/video-uclass.c1
-rw-r--r--drivers/virtio/virtio-uclass.c1
-rw-r--r--drivers/virtio/virtio_ring.c1
-rw-r--r--drivers/w1-eeprom/ds2502.c1
-rw-r--r--drivers/w1/mxc_w1.c1
-rw-r--r--drivers/watchdog/armada-37xx-wdt.c1
-rw-r--r--drivers/watchdog/cdns_wdt.c1
-rw-r--r--fs/ext4/ext4_write.c1
-rw-r--r--fs/ext4/ext4fs.c1
-rw-r--r--fs/fat/fat_write.c1
-rw-r--r--fs/sandbox/sandboxfs.c1
-rw-r--r--fs/ubifs/lprops.c1
-rw-r--r--fs/ubifs/ubifs.c1
-rw-r--r--fs/yaffs2/yaffs_nandif.c1
-rw-r--r--fs/yaffs2/yaffs_uboot_glue.c1
-rw-r--r--include/dm/device.h71
-rw-r--r--include/dm/device_compat.h86
-rw-r--r--include/linux/clk-provider.h1
-rw-r--r--lib/bch.c1
-rw-r--r--lib/binman.c1
-rw-r--r--lib/bzip2/bzlib.c1
-rw-r--r--lib/crypto/rsa_helper.c1
-rw-r--r--lib/efi/efi.c1
-rw-r--r--lib/efi/efi_app.c1
-rw-r--r--lib/efi/efi_stub.c1
-rw-r--r--lib/efi_driver/efi_block_device.c1
-rw-r--r--lib/efi_driver/efi_uclass.c1
-rw-r--r--lib/efi_loader/efi_console.c1
-rw-r--r--lib/efi_loader/efi_runtime.c1
-rw-r--r--lib/fdtdec.c1
-rw-r--r--lib/libavb/avb_cmdline.c1
-rw-r--r--lib/libavb/avb_descriptor.c1
-rw-r--r--lib/libavb/avb_rsa.c1
-rw-r--r--lib/libavb/avb_slot_verify.c1
-rw-r--r--lib/libavb/avb_sysdeps_posix.c1
-rw-r--r--lib/libavb/avb_util.c1
-rw-r--r--lib/linux_compat.c1
-rw-r--r--lib/lmb.c1
-rw-r--r--lib/rsa/rsa-sign.c1
-rw-r--r--lib/rsa/rsa-verify.c1
-rw-r--r--lib/zstd/decompress.c1
-rw-r--r--lib/zstd/zstd_common.c1
-rw-r--r--net/mdio-uclass.c3
-rw-r--r--post/post.c1
-rw-r--r--test/dm/clk.c1
-rw-r--r--test/dm/dma.c1
-rw-r--r--test/dm/gpio.c1
-rw-r--r--test/dm/mailbox.c1
-rw-r--r--test/dm/power-domain.c1
-rw-r--r--test/dm/reset.c1
-rw-r--r--test/dm/spmi.c1
-rw-r--r--test/dm/tee.c1
-rw-r--r--test/dm/video.c1
-rw-r--r--test/lib/lmb.c1
-rw-r--r--test/unicode_ut.c1
460 files changed, 593 insertions, 77 deletions
diff --git a/arch/arm/mach-imx/cmd_nandbcb.c b/arch/arm/mach-imx/cmd_nandbcb.c
index a1c265f..b3e59b1 100644
--- a/arch/arm/mach-imx/cmd_nandbcb.c
+++ b/arch/arm/mach-imx/cmd_nandbcb.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <malloc.h>
#include <nand.h>
#include <dm/devres.h>
diff --git a/arch/arm/mach-imx/imx8/image.c b/arch/arm/mach-imx/imx8/image.c
index 58a29e8..c956a80 100644
--- a/arch/arm/mach-imx/imx8/image.c
+++ b/arch/arm/mach-imx/imx8/image.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <errno.h>
+#include <malloc.h>
#include <asm/io.h>
#include <mmc.h>
#include <spi_flash.h>
diff --git a/arch/arm/mach-mvebu/mbus.c b/arch/arm/mach-mvebu/mbus.c
index c68e93b..a95db5e 100644
--- a/arch/arm/mach-mvebu/mbus.c
+++ b/arch/arm/mach-mvebu/mbus.c
@@ -47,6 +47,7 @@
*/
#include <common.h>
+#include <malloc.h>
#include <linux/errno.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
diff --git a/arch/arm/mach-rockchip/rk3288/rk3288.c b/arch/arm/mach-rockchip/rk3288/rk3288.c
index 6088911..812f3bd 100644
--- a/arch/arm/mach-rockchip/rk3288/rk3288.c
+++ b/arch/arm/mach-rockchip/rk3288/rk3288.c
@@ -7,6 +7,7 @@
#include <env.h>
#include <clk.h>
#include <init.h>
+#include <malloc.h>
#include <asm/armv7.h>
#include <asm/io.h>
#include <asm/arch-rockchip/bootrom.h>
diff --git a/arch/arm/mach-rockchip/rk3308/rk3308.c b/arch/arm/mach-rockchip/rk3308/rk3308.c
index b6815dd..edf5994 100644
--- a/arch/arm/mach-rockchip/rk3308/rk3308.c
+++ b/arch/arm/mach-rockchip/rk3308/rk3308.c
@@ -3,6 +3,7 @@
*Copyright (c) 2018 Rockchip Electronics Co., Ltd
*/
#include <common.h>
+#include <malloc.h>
#include <asm/io.h>
#include <asm/arch/grf_rk3308.h>
#include <asm/arch-rockchip/hardware.h>
diff --git a/arch/arm/mach-socfpga/clock_manager_agilex.c b/arch/arm/mach-socfpga/clock_manager_agilex.c
index 791066d..4ee2b7b 100644
--- a/arch/arm/mach-socfpga/clock_manager_agilex.c
+++ b/arch/arm/mach-socfpga/clock_manager_agilex.c
@@ -7,6 +7,7 @@
#include <clk.h>
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <asm/arch/clock_manager.h>
#include <asm/arch/system_manager.h>
#include <asm/io.h>
diff --git a/arch/arm/mach-socfpga/clock_manager_arria10.c b/arch/arm/mach-socfpga/clock_manager_arria10.c
index 392f2eb..d7c8eaf 100644
--- a/arch/arm/mach-socfpga/clock_manager_arria10.c
+++ b/arch/arm/mach-socfpga/clock_manager_arria10.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <fdtdec.h>
+#include <malloc.h>
#include <asm/io.h>
#include <dm.h>
#include <clk.h>
diff --git a/arch/arm/mach-stm32mp/pwr_regulator.c b/arch/arm/mach-stm32mp/pwr_regulator.c
index 977cc7d..4559ef5 100644
--- a/arch/arm/mach-stm32mp/pwr_regulator.c
+++ b/arch/arm/mach-stm32mp/pwr_regulator.c
@@ -8,6 +8,7 @@
#include <errno.h>
#include <regmap.h>
#include <syscon.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/arch/arm/mach-tegra/cboot.c b/arch/arm/mach-tegra/cboot.c
index c5361ca..3902294 100644
--- a/arch/arm/mach-tegra/cboot.c
+++ b/arch/arm/mach-tegra/cboot.c
@@ -8,6 +8,7 @@
#include <fdt_support.h>
#include <fdtdec.h>
#include <hang.h>
+#include <malloc.h>
#include <stdlib.h>
#include <string.h>
diff --git a/arch/arm/mach-zynq/clk.c b/arch/arm/mach-zynq/clk.c
index 1a6acd4..b578f65 100644
--- a/arch/arm/mach-zynq/clk.c
+++ b/arch/arm/mach-zynq/clk.c
@@ -6,6 +6,7 @@
#include <clk.h>
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <asm/arch/clk.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-zynq/timer.c b/arch/arm/mach-zynq/timer.c
index 211ea15..d822e20 100644
--- a/arch/arm/mach-zynq/timer.c
+++ b/arch/arm/mach-zynq/timer.c
@@ -32,6 +32,7 @@
#include <div64.h>
#include <dm.h>
#include <time.h>
+#include <malloc.h>
#include <asm/io.h>
#include <asm/arch/hardware.h>
#include <asm/arch/clk.h>
diff --git a/arch/mips/mach-mtmips/cpu.c b/arch/mips/mach-mtmips/cpu.c
index cee3c0c..8976ef5 100644
--- a/arch/mips/mach-mtmips/cpu.c
+++ b/arch/mips/mach-mtmips/cpu.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <init.h>
+#include <malloc.h>
#include <ram.h>
#include <wdt.h>
#include <asm/io.h>
diff --git a/arch/mips/mach-pic32/cpu.c b/arch/mips/mach-pic32/cpu.c
index 8bb12a5..8075d93 100644
--- a/arch/mips/mach-pic32/cpu.c
+++ b/arch/mips/mach-pic32/cpu.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <malloc.h>
#include <mach/pic32.h>
#include <mach/ddr.h>
#include <dt-bindings/clock/microchip,clock.h>
diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c
index ff74303..56ee3f5 100644
--- a/arch/sandbox/cpu/cpu.c
+++ b/arch/sandbox/cpu/cpu.c
@@ -10,6 +10,7 @@
#include <linux/libfdt.h>
#include <os.h>
#include <asm/io.h>
+#include <asm/malloc.h>
#include <asm/setjmp.h>
#include <asm/state.h>
#include <dm/root.h>
diff --git a/arch/x86/cpu/apollolake/fsp_s.c b/arch/x86/cpu/apollolake/fsp_s.c
index 9804227..92ecacf 100644
--- a/arch/x86/cpu/apollolake/fsp_s.c
+++ b/arch/x86/cpu/apollolake/fsp_s.c
@@ -9,6 +9,7 @@
#include <binman.h>
#include <dm.h>
#include <irq.h>
+#include <malloc.h>
#include <asm/intel_pinctrl.h>
#include <asm/io.h>
#include <asm/intel_regs.h>
diff --git a/arch/x86/cpu/apollolake/spl.c b/arch/x86/cpu/apollolake/spl.c
index 7ab7243..d32f2a9 100644
--- a/arch/x86/cpu/apollolake/spl.c
+++ b/arch/x86/cpu/apollolake/spl.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <binman_sym.h>
#include <dm.h>
+#include <malloc.h>
#include <spi.h>
#include <spl.h>
#include <spi_flash.h>
diff --git a/arch/x86/cpu/apollolake/uart.c b/arch/x86/cpu/apollolake/uart.c
index f2b356e..f368f7d 100644
--- a/arch/x86/cpu/apollolake/uart.c
+++ b/arch/x86/cpu/apollolake/uart.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <dm.h>
#include <dt-structs.h>
+#include <malloc.h>
#include <ns16550.h>
#include <spl.h>
#include <asm/io.h>
diff --git a/arch/x86/cpu/intel_common/itss.c b/arch/x86/cpu/intel_common/itss.c
index 9df51ad..fb30984 100644
--- a/arch/x86/cpu/intel_common/itss.c
+++ b/arch/x86/cpu/intel_common/itss.c
@@ -13,6 +13,7 @@
#include <dm.h>
#include <dt-structs.h>
#include <irq.h>
+#include <malloc.h>
#include <p2sb.h>
#include <spl.h>
#include <asm/itss.h>
diff --git a/arch/x86/cpu/qemu/e820.c b/arch/x86/cpu/qemu/e820.c
index a4136eb..0da36bd 100644
--- a/arch/x86/cpu/qemu/e820.c
+++ b/arch/x86/cpu/qemu/e820.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <env_internal.h>
+#include <malloc.h>
#include <asm/e820.h>
#include <asm/arch/qemu.h>
diff --git a/arch/x86/cpu/qfw_cpu.c b/arch/x86/cpu/qfw_cpu.c
index 49e9dfc..349bab1 100644
--- a/arch/x86/cpu/qfw_cpu.c
+++ b/arch/x86/cpu/qfw_cpu.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <cpu.h>
#include <dm.h>
+#include <malloc.h>
#include <qfw.h>
#include <dm/lists.h>
#include <dm/uclass-internal.h>
diff --git a/arch/x86/lib/coreboot_table.c b/arch/x86/lib/coreboot_table.c
index 8685aa3..2943e11 100644
--- a/arch/x86/lib/coreboot_table.c
+++ b/arch/x86/lib/coreboot_table.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <acpi_s3.h>
+#include <malloc.h>
#include <vbe.h>
#include <asm/coreboot_tables.h>
#include <asm/e820.h>
diff --git a/arch/x86/lib/fsp1/fsp_common.c b/arch/x86/lib/fsp1/fsp_common.c
index ec9c218..aee2a05 100644
--- a/arch/x86/lib/fsp1/fsp_common.c
+++ b/arch/x86/lib/fsp1/fsp_common.c
@@ -7,6 +7,7 @@
#include <acpi_s3.h>
#include <dm.h>
#include <errno.h>
+#include <malloc.h>
#include <rtc.h>
#include <asm/cmos_layout.h>
#include <asm/early_cmos.h>
diff --git a/arch/x86/lib/mrccache.c b/arch/x86/lib/mrccache.c
index b9420a4..8914960 100644
--- a/arch/x86/lib/mrccache.c
+++ b/arch/x86/lib/mrccache.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
+#include <malloc.h>
#include <net.h>
#include <spi.h>
#include <spi_flash.h>
diff --git a/arch/x86/lib/tables.c b/arch/x86/lib/tables.c
index 99f1429..7aea722 100644
--- a/arch/x86/lib/tables.c
+++ b/arch/x86/lib/tables.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <malloc.h>
#include <smbios.h>
#include <asm/sfi.h>
#include <asm/mpspec.h>
diff --git a/board/compulab/common/common.c b/board/compulab/common/common.c
index cbac112..2f92c65 100644
--- a/board/compulab/common/common.c
+++ b/board/compulab/common/common.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <malloc.h>
#include <asm/bootm.h>
#include <asm/gpio.h>
#include <asm/setup.h>
diff --git a/board/corscience/tricorder/tricorder.c b/board/corscience/tricorder/tricorder.c
index da33f84..cec819b 100644
--- a/board/corscience/tricorder/tricorder.c
+++ b/board/corscience/tricorder/tricorder.c
@@ -10,6 +10,7 @@
* Frederik Kriewitz <frederik@kriewitz.eu>
*/
#include <common.h>
+#include <malloc.h>
#include <twl4030.h>
#include <status_led.h>
#include <asm/io.h>
diff --git a/board/gardena/smart-gateway-mt7688/board.c b/board/gardena/smart-gateway-mt7688/board.c
index ae03f0a..48cf309 100644
--- a/board/gardena/smart-gateway-mt7688/board.c
+++ b/board/gardena/smart-gateway-mt7688/board.c
@@ -8,6 +8,7 @@
#include <env_internal.h>
#include <init.h>
#include <led.h>
+#include <malloc.h>
#include <net.h>
#include <spi.h>
#include <spi_flash.h>
diff --git a/board/ge/common/vpd_reader.c b/board/ge/common/vpd_reader.c
index 12410d9..94eeab9 100644
--- a/board/ge/common/vpd_reader.c
+++ b/board/ge/common/vpd_reader.c
@@ -4,6 +4,7 @@
*/
#include "vpd_reader.h"
+#include <malloc.h>
#include <i2c.h>
#include <linux/bch.h>
diff --git a/board/isee/igep003x/board.c b/board/isee/igep003x/board.c
index bc9fdcd..b0f8d8a 100644
--- a/board/isee/igep003x/board.c
+++ b/board/isee/igep003x/board.c
@@ -9,6 +9,7 @@
#include <env.h>
#include <errno.h>
#include <init.h>
+#include <malloc.h>
#include <serial.h>
#include <spl.h>
#include <asm/arch/cpu.h>
diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c
index 74fc5f0..1b871fd 100644
--- a/board/isee/igep00x0/igep00x0.c
+++ b/board/isee/igep00x0/igep00x0.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
#include <env.h>
+#include <malloc.h>
#include <status_led.h>
#include <dm.h>
#include <ns16550.h>
diff --git a/board/menlo/m53menlo/m53menlo.c b/board/menlo/m53menlo/m53menlo.c
index 065e6a2..70a13aa 100644
--- a/board/menlo/m53menlo/m53menlo.c
+++ b/board/menlo/m53menlo/m53menlo.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <dm.h>
#include <init.h>
+#include <malloc.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/sys_proto.h>
diff --git a/board/microchip/pic32mzda/pic32mzda.c b/board/microchip/pic32mzda/pic32mzda.c
index 8bfdee9..aa8aab3 100644
--- a/board/microchip/pic32mzda/pic32mzda.c
+++ b/board/microchip/pic32mzda/pic32mzda.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <dm.h>
#include <clk.h>
+#include <malloc.h>
#include <dt-bindings/clock/microchip,clock.h>
#include <mach/pic32.h>
diff --git a/board/overo/overo.c b/board/overo/overo.c
index 442028a..baa7997 100644
--- a/board/overo/overo.c
+++ b/board/overo/overo.c
@@ -14,6 +14,7 @@
#include <common.h>
#include <dm.h>
#include <env.h>
+#include <malloc.h>
#include <ns16550.h>
#include <netdev.h>
#include <twl4030.h>
diff --git a/board/siemens/common/board.c b/board/siemens/common/board.c
index 5f5e2eb..24429d2 100644
--- a/board/siemens/common/board.c
+++ b/board/siemens/common/board.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <env.h>
#include <errno.h>
+#include <malloc.h>
#include <serial.h>
#include <spl.h>
#include <asm/arch/cpu.h>
diff --git a/board/siemens/pxm2/board.c b/board/siemens/pxm2/board.c
index b5a10eb..58bb5ba 100644
--- a/board/siemens/pxm2/board.c
+++ b/board/siemens/pxm2/board.c
@@ -16,6 +16,7 @@
#include <env.h>
#include <errno.h>
#include <init.h>
+#include <malloc.h>
#include <spl.h>
#include <asm/arch/cpu.h>
#include <asm/arch/hardware.h>
diff --git a/board/siemens/rut/board.c b/board/siemens/rut/board.c
index d7d9738..bd4eaa4 100644
--- a/board/siemens/rut/board.c
+++ b/board/siemens/rut/board.c
@@ -14,6 +14,7 @@
#include <env.h>
#include <errno.h>
#include <init.h>
+#include <malloc.h>
#include <spi.h>
#include <spl.h>
#include <asm/arch/cpu.h>
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index 9ee2e0b..ca76579 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -16,6 +16,7 @@
#include <i2c.h>
#include <init.h>
#include <led.h>
+#include <malloc.h>
#include <memalign.h>
#include <misc.h>
#include <mtd.h>
diff --git a/board/synopsys/hsdk/clk-lib.c b/board/synopsys/hsdk/clk-lib.c
index 6c75ce0..6b6bb70 100644
--- a/board/synopsys/hsdk/clk-lib.c
+++ b/board/synopsys/hsdk/clk-lib.c
@@ -5,6 +5,7 @@
*/
#include <clk.h>
+#include <malloc.h>
#include <dm/device.h>
#include "clk-lib.h"
diff --git a/board/technexion/tao3530/tao3530.c b/board/technexion/tao3530/tao3530.c
index 22d26e5..7d7c427 100644
--- a/board/technexion/tao3530/tao3530.c
+++ b/board/technexion/tao3530/tao3530.c
@@ -4,6 +4,7 @@
* Tapani Utriainen <linuxfae@technexion.com>
*/
#include <common.h>
+#include <malloc.h>
#include <netdev.h>
#include <twl4030.h>
#include <asm/io.h>
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index 3d7f738..01b28e8 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -12,6 +12,7 @@
#include <env.h>
#include <errno.h>
#include <init.h>
+#include <malloc.h>
#include <spl.h>
#include <serial.h>
#include <asm/arch/cpu.h>
diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
index d70ab0c..7528de3 100644
--- a/board/ti/am57xx/board.c
+++ b/board/ti/am57xx/board.c
@@ -11,6 +11,7 @@
#include <env.h>
#include <fdt_support.h>
#include <init.h>
+#include <malloc.h>
#include <palmas.h>
#include <sata.h>
#include <serial.h>
diff --git a/board/timll/devkit8000/devkit8000.c b/board/timll/devkit8000/devkit8000.c
index 490d8cb..b037d72 100644
--- a/board/timll/devkit8000/devkit8000.c
+++ b/board/timll/devkit8000/devkit8000.c
@@ -18,6 +18,7 @@
#include <common.h>
#include <dm.h>
#include <env.h>
+#include <malloc.h>
#include <ns16550.h>
#include <twl4030.h>
#include <asm/io.h>
diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index 56bdff3..d347bd5 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -13,6 +13,7 @@
#include <efi_selftest.h>
#include <env.h>
#include <errno.h>
+#include <malloc.h>
#include <linux/libfdt.h>
#include <linux/libfdt_env.h>
#include <mapmem.h>
diff --git a/cmd/gpio.c b/cmd/gpio.c
index 5f4c7ff..8ce8ba9 100644
--- a/cmd/gpio.c
+++ b/cmd/gpio.c
@@ -10,6 +10,7 @@
#include <command.h>
#include <errno.h>
#include <dm.h>
+#include <malloc.h>
#include <asm/gpio.h>
#include <linux/err.h>
diff --git a/cmd/host.c b/cmd/host.c
index 98c4d2a..eefc4f2 100644
--- a/cmd/host.c
+++ b/cmd/host.c
@@ -8,6 +8,7 @@
#include <fs.h>
#include <part.h>
#include <sandboxblockdev.h>
+#include <dm/device_compat.h>
#include <linux/errno.h>
static int host_curr_device = -1;
diff --git a/cmd/rng.c b/cmd/rng.c
index 36ca7a1..76367fe 100644
--- a/cmd/rng.c
+++ b/cmd/rng.c
@@ -8,6 +8,7 @@
#include <command.h>
#include <dm.h>
#include <hexdump.h>
+#include <malloc.h>
#include <rng.h>
static int do_rng(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
diff --git a/cmd/tpm-common.c b/cmd/tpm-common.c
index 42882b1..3014255 100644
--- a/cmd/tpm-common.c
+++ b/cmd/tpm-common.c
@@ -7,6 +7,7 @@
#include <command.h>
#include <dm.h>
#include <env.h>
+#include <malloc.h>
#include <asm/unaligned.h>
#include <linux/string.h>
#include <tpm-common.h>
diff --git a/cmd/ubi.c b/cmd/ubi.c
index 7fb4cdf..cecf251 100644
--- a/cmd/ubi.c
+++ b/cmd/ubi.c
@@ -15,6 +15,7 @@
#include <command.h>
#include <env.h>
#include <exports.h>
+#include <malloc.h>
#include <memalign.h>
#include <mtd.h>
#include <nand.h>
diff --git a/cmd/usb_mass_storage.c b/cmd/usb_mass_storage.c
index 570cf3a..c5c6899 100644
--- a/cmd/usb_mass_storage.c
+++ b/cmd/usb_mass_storage.c
@@ -11,6 +11,7 @@
#include <command.h>
#include <console.h>
#include <g_dnl.h>
+#include <malloc.h>
#include <part.h>
#include <usb.h>
#include <usb_mass_storage.h>
diff --git a/cmd/ximg.c b/cmd/ximg.c
index dccd114..770f6a3 100644
--- a/cmd/ximg.c
+++ b/cmd/ximg.c
@@ -17,6 +17,7 @@
#include <env.h>
#include <gzip.h>
#include <image.h>
+#include <malloc.h>
#include <mapmem.h>
#include <watchdog.h>
#if defined(CONFIG_BZIP2)
diff --git a/common/android_ab.c b/common/android_ab.c
index 6c4df41..e0fe32d 100644
--- a/common/android_ab.c
+++ b/common/android_ab.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <android_ab.h>
#include <android_bootloader_message.h>
+#include <malloc.h>
#include <linux/err.h>
#include <memalign.h>
#include <u-boot/crc.h>
diff --git a/common/autoboot.c b/common/autoboot.c
index 94a1b4a..4ea9be6 100644
--- a/common/autoboot.c
+++ b/common/autoboot.c
@@ -13,6 +13,7 @@
#include <env.h>
#include <fdtdec.h>
#include <hash.h>
+#include <malloc.h>
#include <memalign.h>
#include <menu.h>
#include <post.h>
diff --git a/common/image-fdt.c b/common/image-fdt.c
index dbe8535..3002948 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -14,6 +14,7 @@
#include <env.h>
#include <errno.h>
#include <image.h>
+#include <malloc.h>
#include <linux/libfdt.h>
#include <mapmem.h>
#include <asm/io.h>
diff --git a/common/image.c b/common/image.c
index 2288cff..94873cb 100644
--- a/common/image.c
+++ b/common/image.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <cpu_func.h>
#include <env.h>
+#include <malloc.h>
#include <u-boot/crc.h>
#include <watchdog.h>
diff --git a/common/usb.c b/common/usb.c
index d9bcb5a..349e838 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -28,6 +28,7 @@
#include <common.h>
#include <command.h>
#include <dm.h>
+#include <malloc.h>
#include <memalign.h>
#include <asm/processor.h>
#include <linux/compiler.h>
diff --git a/common/usb_hub.c b/common/usb_hub.c
index 25c2ac4..c642b68 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -26,6 +26,7 @@
#include <dm.h>
#include <env.h>
#include <errno.h>
+#include <malloc.h>
#include <memalign.h>
#include <asm/processor.h>
#include <asm/unaligned.h>
diff --git a/drivers/adc/stm32-adc-core.c b/drivers/adc/stm32-adc-core.c
index 04b6a8a..2ca0fb4 100644
--- a/drivers/adc/stm32-adc-core.c
+++ b/drivers/adc/stm32-adc-core.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#include <power/regulator.h>
#include "stm32-adc-core.h"
diff --git a/drivers/adc/stm32-adc.c b/drivers/adc/stm32-adc.c
index 029338e..ca1ac3e 100644
--- a/drivers/adc/stm32-adc.c
+++ b/drivers/adc/stm32-adc.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <adc.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#include <linux/iopoll.h>
#include "stm32-adc-core.h"
diff --git a/drivers/axi/sandbox_store.c b/drivers/axi/sandbox_store.c
index d724f19..a6f483e 100644
--- a/drivers/axi/sandbox_store.c
+++ b/drivers/axi/sandbox_store.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <axi.h>
#include <dm.h>
+#include <malloc.h>
/**
* struct sandbox_store_priv - Private data structure of a AXI store device
diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c
index 7771114..7c39aa5 100644
--- a/drivers/block/blk-uclass.c
+++ b/drivers/block/blk-uclass.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <blk.h>
#include <dm.h>
+#include <malloc.h>
#include <dm/device-internal.h>
#include <dm/lists.h>
#include <dm/uclass-internal.h>
diff --git a/drivers/block/sandbox.c b/drivers/block/sandbox.c
index d3b1aaa..cca2237 100644
--- a/drivers/block/sandbox.c
+++ b/drivers/block/sandbox.c
@@ -11,6 +11,7 @@
#include <os.h>
#include <malloc.h>
#include <sandboxblockdev.h>
+#include <dm/device_compat.h>
#include <linux/errno.h>
#include <dm/device-internal.h>
diff --git a/drivers/clk/altera/clk-arria10.c b/drivers/clk/altera/clk-arria10.c
index a39cd34..affeb31 100644
--- a/drivers/clk/altera/clk-arria10.c
+++ b/drivers/clk/altera/clk-arria10.c
@@ -4,9 +4,11 @@
*/
#include <common.h>
+#include <malloc.h>
#include <asm/io.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <dm/lists.h>
#include <dm/util.h>
diff --git a/drivers/clk/at91/clk-generated.c b/drivers/clk/at91/clk-generated.c
index d8562e1..a80f259 100644
--- a/drivers/clk/at91/clk-generated.c
+++ b/drivers/clk/at91/clk-generated.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <malloc.h>
#include <linux/err.h>
#include <linux/io.h>
#include <mach/at91_pmc.h>
diff --git a/drivers/clk/at91/clk-h32mx.c b/drivers/clk/at91/clk-h32mx.c
index 8f02d73..86bb71f 100644
--- a/drivers/clk/at91/clk-h32mx.c
+++ b/drivers/clk/at91/clk-h32mx.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <dm/device_compat.h>
#include <dm/util.h>
#include <linux/io.h>
#include <mach/at91_pmc.h>
diff --git a/drivers/clk/at91/clk-peripheral.c b/drivers/clk/at91/clk-peripheral.c
index c880af8..c55e621 100644
--- a/drivers/clk/at91/clk-peripheral.c
+++ b/drivers/clk/at91/clk-peripheral.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <malloc.h>
#include <linux/io.h>
#include <mach/at91_pmc.h>
#include "pmc.h"
diff --git a/drivers/clk/clk-cdce9xx.c b/drivers/clk/clk-cdce9xx.c
index 5d1489a..f1f76b0 100644
--- a/drivers/clk/clk-cdce9xx.c
+++ b/drivers/clk/clk-cdce9xx.c
@@ -13,6 +13,7 @@
#include <errno.h>
#include <clk-uclass.h>
#include <i2c.h>
+#include <dm/device_compat.h>
#define MAX_NUMBER_OF_PLLS 4
#define MAX_NUMER_OF_OUTPUTS 9
diff --git a/drivers/clk/clk-ti-sci.c b/drivers/clk/clk-ti-sci.c
index b085a4f..82241d9 100644
--- a/drivers/clk/clk-ti-sci.c
+++ b/drivers/clk/clk-ti-sci.c
@@ -12,6 +12,8 @@
#include <dm.h>
#include <errno.h>
#include <clk-uclass.h>
+#include <malloc.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
#include <linux/soc/ti/ti_sci_protocol.h>
#include <k3-avs.h>
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index 6787d25..7187847 100644
--- a/drivers/clk/clk-uclass.c
+++ b/drivers/clk/clk-uclass.c
@@ -12,6 +12,7 @@
#include <dm.h>
#include <dt-structs.h>
#include <errno.h>
+#include <malloc.h>
#include <dm/devres.h>
#include <dm/read.h>
#include <linux/clk-provider.h>
diff --git a/drivers/clk/clk_sandbox.c b/drivers/clk/clk_sandbox.c
index cc084b0..768fbb7 100644
--- a/drivers/clk/clk_sandbox.c
+++ b/drivers/clk/clk_sandbox.c
@@ -7,6 +7,7 @@
#include <clk-uclass.h>
#include <dm.h>
#include <errno.h>
+#include <malloc.h>
#include <asm/clk.h>
struct sandbox_clk_priv {
diff --git a/drivers/clk/clk_sandbox_ccf.c b/drivers/clk/clk_sandbox_ccf.c
index 0903c81..3543bea 100644
--- a/drivers/clk/clk_sandbox_ccf.c
+++ b/drivers/clk/clk_sandbox_ccf.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <dm.h>
#include <clk.h>
+#include <malloc.h>
#include <asm/clk.h>
#include <clk-uclass.h>
#include <dm/devres.h>
diff --git a/drivers/clk/clk_sandbox_test.c b/drivers/clk/clk_sandbox_test.c
index 628110d..8733838 100644
--- a/drivers/clk/clk_sandbox_test.c
+++ b/drivers/clk/clk_sandbox_test.c
@@ -6,7 +6,9 @@
#include <common.h>
#include <dm.h>
#include <clk.h>
+#include <malloc.h>
#include <asm/clk.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
struct sandbox_clk_test {
diff --git a/drivers/clk/clk_versal.c b/drivers/clk/clk_versal.c
index 66cbef1..9d4d214 100644
--- a/drivers/clk/clk_versal.c
+++ b/drivers/clk/clk_versal.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/bitfield.h>
#include <malloc.h>
diff --git a/drivers/clk/clk_vexpress_osc.c b/drivers/clk/clk_vexpress_osc.c
index c692a6d..82e589e 100644
--- a/drivers/clk/clk_vexpress_osc.c
+++ b/drivers/clk/clk_vexpress_osc.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <dm/device_compat.h>
#include <dm/lists.h>
#include <errno.h>
#include <misc.h>
diff --git a/drivers/clk/clk_zynq.c b/drivers/clk/clk_zynq.c
index b09c37d..4ca1cc0 100644
--- a/drivers/clk/clk_zynq.c
+++ b/drivers/clk/clk_zynq.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <dm/device_compat.h>
#include <dm/lists.h>
#include <errno.h>
#include <asm/io.h>
diff --git a/drivers/clk/clk_zynqmp.c b/drivers/clk/clk_zynqmp.c
index a365b56..e0eb897 100644
--- a/drivers/clk/clk_zynqmp.c
+++ b/drivers/clk/clk_zynqmp.c
@@ -6,6 +6,8 @@
*/
#include <common.h>
+#include <malloc.h>
+#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <clk-uclass.h>
#include <clk.h>
diff --git a/drivers/clk/imx/clk-imx8.c b/drivers/clk/imx/clk-imx8.c
index a755e26..671054d 100644
--- a/drivers/clk/imx/clk-imx8.c
+++ b/drivers/clk/imx/clk-imx8.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <malloc.h>
#include <asm/arch/sci/sci.h>
#include <asm/arch/clock.h>
#include <dt-bindings/clock/imx8qxp-clock.h>
diff --git a/drivers/clk/mvebu/armada-37xx-periph.c b/drivers/clk/mvebu/armada-37xx-periph.c
index b1a3596..068e48e 100644
--- a/drivers/clk/mvebu/armada-37xx-periph.c
+++ b/drivers/clk/mvebu/armada-37xx-periph.c
@@ -15,6 +15,7 @@
#include <dm.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
+#include <dm/device_compat.h>
#define TBG_SEL 0x0
#define DIV_SEL0 0x4
diff --git a/drivers/clk/mvebu/armada-37xx-tbg.c b/drivers/clk/mvebu/armada-37xx-tbg.c
index aa7ccd6..233926e 100644
--- a/drivers/clk/mvebu/armada-37xx-tbg.c
+++ b/drivers/clk/mvebu/armada-37xx-tbg.c
@@ -14,6 +14,7 @@
#include <dm.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
+#include <dm/device_compat.h>
#define NUM_TBG 4
diff --git a/drivers/clk/rockchip/clk_px30.c b/drivers/clk/rockchip/clk_px30.c
index 36764c1..b885341 100644
--- a/drivers/clk/rockchip/clk_px30.c
+++ b/drivers/clk/rockchip/clk_px30.c
@@ -8,6 +8,7 @@
#include <clk-uclass.h>
#include <dm.h>
#include <errno.h>
+#include <malloc.h>
#include <syscon.h>
#include <asm/arch-rockchip/clock.h>
#include <asm/arch-rockchip/cru_px30.h>
diff --git a/drivers/clk/rockchip/clk_rk3036.c b/drivers/clk/rockchip/clk_rk3036.c
index 6d5ae3d..6e085c4 100644
--- a/drivers/clk/rockchip/clk_rk3036.c
+++ b/drivers/clk/rockchip/clk_rk3036.c
@@ -7,6 +7,7 @@
#include <clk-uclass.h>
#include <dm.h>
#include <errno.h>
+#include <malloc.h>
#include <syscon.h>
#include <asm/io.h>
#include <asm/arch-rockchip/clock.h>
diff --git a/drivers/clk/rockchip/clk_rk3128.c b/drivers/clk/rockchip/clk_rk3128.c
index efda8c8..a6f7902 100644
--- a/drivers/clk/rockchip/clk_rk3128.c
+++ b/drivers/clk/rockchip/clk_rk3128.c
@@ -7,6 +7,7 @@
#include <clk-uclass.h>
#include <dm.h>
#include <errno.h>
+#include <malloc.h>
#include <syscon.h>
#include <asm/io.h>
#include <asm/arch-rockchip/clock.h>
diff --git a/drivers/clk/rockchip/clk_rk3188.c b/drivers/clk/rockchip/clk_rk3188.c
index 82eea40..2b82a40 100644
--- a/drivers/clk/rockchip/clk_rk3188.c
+++ b/drivers/clk/rockchip/clk_rk3188.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <dt-structs.h>
#include <errno.h>
+#include <malloc.h>
#include <mapmem.h>
#include <syscon.h>
#include <asm/io.h>
diff --git a/drivers/clk/rockchip/clk_rk322x.c b/drivers/clk/rockchip/clk_rk322x.c
index 6e8a164..ef33adb 100644
--- a/drivers/clk/rockchip/clk_rk322x.c
+++ b/drivers/clk/rockchip/clk_rk322x.c
@@ -7,6 +7,7 @@
#include <clk-uclass.h>
#include <dm.h>
#include <errno.h>
+#include <malloc.h>
#include <syscon.h>
#include <asm/io.h>
#include <asm/arch-rockchip/clock.h>
diff --git a/drivers/clk/rockchip/clk_rk3288.c b/drivers/clk/rockchip/clk_rk3288.c
index 2d42f6f..81cdb8e 100644
--- a/drivers/clk/rockchip/clk_rk3288.c
+++ b/drivers/clk/rockchip/clk_rk3288.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <dt-structs.h>
#include <errno.h>
+#include <malloc.h>
#include <mapmem.h>
#include <syscon.h>
#include <asm/io.h>
diff --git a/drivers/clk/rockchip/clk_rk3308.c b/drivers/clk/rockchip/clk_rk3308.c
index f212c5f..c0f1285 100644
--- a/drivers/clk/rockchip/clk_rk3308.c
+++ b/drivers/clk/rockchip/clk_rk3308.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <div64.h>
#include <errno.h>
+#include <malloc.h>
#include <syscon.h>
#include <asm/io.h>
#include <asm/arch/cru_rk3308.h>
diff --git a/drivers/clk/rockchip/clk_rk3328.c b/drivers/clk/rockchip/clk_rk3328.c
index e700a1b..8e867c5 100644
--- a/drivers/clk/rockchip/clk_rk3328.c
+++ b/drivers/clk/rockchip/clk_rk3328.c
@@ -8,6 +8,7 @@
#include <clk-uclass.h>
#include <dm.h>
#include <errno.h>
+#include <malloc.h>
#include <syscon.h>
#include <asm/arch-rockchip/clock.h>
#include <asm/arch-rockchip/cru_rk3328.h>
diff --git a/drivers/clk/rockchip/clk_rk3368.c b/drivers/clk/rockchip/clk_rk3368.c
index b51d529..2cce1b9 100644
--- a/drivers/clk/rockchip/clk_rk3368.c
+++ b/drivers/clk/rockchip/clk_rk3368.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <dt-structs.h>
#include <errno.h>
+#include <malloc.h>
#include <mapmem.h>
#include <syscon.h>
#include <bitfield.h>
diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c
index 37fc142..865b80c 100644
--- a/drivers/clk/rockchip/clk_rk3399.c
+++ b/drivers/clk/rockchip/clk_rk3399.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <dt-structs.h>
#include <errno.h>
+#include <malloc.h>
#include <mapmem.h>
#include <syscon.h>
#include <bitfield.h>
diff --git a/drivers/clk/rockchip/clk_rv1108.c b/drivers/clk/rockchip/clk_rv1108.c
index 97fdd09..da9c48b 100644
--- a/drivers/clk/rockchip/clk_rv1108.c
+++ b/drivers/clk/rockchip/clk_rv1108.c
@@ -9,6 +9,7 @@
#include <clk-uclass.h>
#include <dm.h>
#include <errno.h>
+#include <malloc.h>
#include <syscon.h>
#include <asm/io.h>
#include <asm/arch-rockchip/clock.h>
diff --git a/drivers/clk/tegra/tegra-car-clk.c b/drivers/clk/tegra/tegra-car-clk.c
index 07e8734..6083f14 100644
--- a/drivers/clk/tegra/tegra-car-clk.c
+++ b/drivers/clk/tegra/tegra-car-clk.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <malloc.h>
#include <asm/arch/clock.h>
#include <asm/arch-tegra/clk_rst.h>
diff --git a/drivers/clk/uniphier/clk-uniphier-core.c b/drivers/clk/uniphier/clk-uniphier-core.c
index 1da6381..9f24050 100644
--- a/drivers/clk/uniphier/clk-uniphier-core.c
+++ b/drivers/clk/uniphier/clk-uniphier-core.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/io.h>
#include <linux/sizes.h>
diff --git a/drivers/core/devres.c b/drivers/core/devres.c
index d98e80d..457e130 100644
--- a/drivers/core/devres.c
+++ b/drivers/core/devres.c
@@ -10,6 +10,7 @@
#define LOG_CATEGORY LOGC_DEVRES
#include <common.h>
+#include <malloc.h>
#include <linux/compat.h>
#include <linux/kernel.h>
#include <linux/list.h>
diff --git a/drivers/core/of_access.c b/drivers/core/of_access.c
index 945b814..acd745c 100644
--- a/drivers/core/of_access.c
+++ b/drivers/core/of_access.c
@@ -20,6 +20,7 @@
*/
#include <common.h>
+#include <malloc.h>
#include <linux/libfdt.h>
#include <dm/of_access.h>
#include <linux/ctype.h>
diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c
index f55ef15..96a5dd2 100644
--- a/drivers/core/ofnode.c
+++ b/drivers/core/ofnode.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <fdtdec.h>
#include <fdt_support.h>
+#include <malloc.h>
#include <linux/libfdt.h>
#include <dm/of_access.h>
#include <dm/of_addr.h>
diff --git a/drivers/core/syscon-uclass.c b/drivers/core/syscon-uclass.c
index 5bb38e3..ac2de47 100644
--- a/drivers/core/syscon-uclass.c
+++ b/drivers/core/syscon-uclass.c
@@ -10,6 +10,7 @@
#include <errno.h>
#include <regmap.h>
#include <dm/device-internal.h>
+#include <dm/device_compat.h>
#include <dm/lists.h>
#include <dm/root.h>
#include <linux/err.h>
diff --git a/drivers/ddr/altera/sdram_gen5.c b/drivers/ddr/altera/sdram_gen5.c
index a3b914f..381b11b 100644
--- a/drivers/ddr/altera/sdram_gen5.c
+++ b/drivers/ddr/altera/sdram_gen5.c
@@ -15,6 +15,7 @@
#include <asm/arch/sdram.h>
#include <asm/arch/system_manager.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#include "sequencer.h"
diff --git a/drivers/ddr/altera/sdram_soc64.c b/drivers/ddr/altera/sdram_soc64.c
index e0d04cc..1f7ead0 100644
--- a/drivers/ddr/altera/sdram_soc64.c
+++ b/drivers/ddr/altera/sdram_soc64.c
@@ -19,6 +19,7 @@
#include <asm/arch/system_manager.h>
#include <asm/arch/reset_manager.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#include <linux/sizes.h>
#define PGTABLE_OFF 0x4000
diff --git a/drivers/dma/bcm6348-iudma.c b/drivers/dma/bcm6348-iudma.c
index 96250eb..d99460f 100644
--- a/drivers/dma/bcm6348-iudma.c
+++ b/drivers/dma/bcm6348-iudma.c
@@ -20,6 +20,7 @@
#include <cpu_func.h>
#include <dm.h>
#include <dma-uclass.h>
+#include <malloc.h>
#include <memalign.h>
#include <reset.h>
#include <asm/io.h>
diff --git a/drivers/dma/dma-uclass.c b/drivers/dma/dma-uclass.c
index a0159d7..9d5a7fc 100644
--- a/drivers/dma/dma-uclass.c
+++ b/drivers/dma/dma-uclass.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <cpu_func.h>
#include <dm.h>
+#include <malloc.h>
#include <dm/read.h>
#include <dma-uclass.h>
#include <dt-structs.h>
diff --git a/drivers/dma/sandbox-dma-test.c b/drivers/dma/sandbox-dma-test.c
index d009bb2..234a7d2 100644
--- a/drivers/dma/sandbox-dma-test.c
+++ b/drivers/dma/sandbox-dma-test.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <dm/read.h>
#include <dma-uclass.h>
#include <dt-structs.h>
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index ab516b5..f274100 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -12,6 +12,7 @@
#include <malloc.h>
#include <asm/dma-mapping.h>
#include <dm.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <dm/read.h>
#include <dm/of_access.h>
diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index 5e37ee0..99b2e5d 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -11,7 +11,9 @@
#include <dm.h>
#include <errno.h>
#include <mailbox.h>
+#include <malloc.h>
#include <dm/device.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/compat.h>
#include <linux/err.h>
diff --git a/drivers/fpga/fpga.c b/drivers/fpga/fpga.c
index 7e8bd7e..0917871 100644
--- a/drivers/fpga/fpga.c
+++ b/drivers/fpga/fpga.c
@@ -9,6 +9,7 @@
#include <xilinx.h> /* xilinx specific definitions */
#include <altera.h> /* altera specific definitions */
#include <lattice.h>
+#include <dm/device_compat.h>
/* Local definitions */
#ifndef CONFIG_MAX_FPGA_DEVICES
diff --git a/drivers/gpio/74x164_gpio.c b/drivers/gpio/74x164_gpio.c
index dcb1c1b..64717a6 100644
--- a/drivers/gpio/74x164_gpio.c
+++ b/drivers/gpio/74x164_gpio.c
@@ -15,6 +15,7 @@
#include <malloc.h>
#include <asm/gpio.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#include <dt-bindings/gpio/gpio.h>
#include <spi.h>
diff --git a/drivers/gpio/adi_gpio2.c b/drivers/gpio/adi_gpio2.c
index 1012f2d..9d293b6 100644
--- a/drivers/gpio/adi_gpio2.c
+++ b/drivers/gpio/adi_gpio2.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <malloc.h>
#include <linux/errno.h>
#include <asm/gpio.h>
diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c
index 5ea3e77..3621cf2 100644
--- a/drivers/gpio/at91_gpio.c
+++ b/drivers/gpio/at91_gpio.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <malloc.h>
#include <asm/io.h>
#include <linux/sizes.h>
#include <asm/gpio.h>
diff --git a/drivers/gpio/atmel_pio4.c b/drivers/gpio/atmel_pio4.c
index 8e6f32d..a3f5e7a 100644
--- a/drivers/gpio/atmel_pio4.c
+++ b/drivers/gpio/atmel_pio4.c
@@ -9,6 +9,7 @@
#include <clk.h>
#include <dm.h>
#include <fdtdec.h>
+#include <malloc.h>
#include <asm/arch/hardware.h>
#include <asm/gpio.h>
#include <mach/gpio.h>
diff --git a/drivers/gpio/da8xx_gpio.c b/drivers/gpio/da8xx_gpio.c
index ac88f0c..0d0e9d2 100644
--- a/drivers/gpio/da8xx_gpio.c
+++ b/drivers/gpio/da8xx_gpio.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <dm.h>
#include <fdtdec.h>
+#include <malloc.h>
#include <asm/io.h>
#include <asm/gpio.h>
#include <dt-bindings/gpio/gpio.h>
diff --git a/drivers/gpio/dwapb_gpio.c b/drivers/gpio/dwapb_gpio.c
index 58e3e7b..e3439ee 100644
--- a/drivers/gpio/dwapb_gpio.c
+++ b/drivers/gpio/dwapb_gpio.c
@@ -12,6 +12,7 @@
#include <asm/io.h>
#include <dm.h>
#include <dm/device-internal.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <dm/lists.h>
#include <dm/root.h>
diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
index a8c5b7f..9dc4cd6 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -6,6 +6,8 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <malloc.h>
+#include <dm/device_compat.h>
#include <dm/pinctrl.h>
#include <errno.h>
#include <asm/gpio.h>
diff --git a/drivers/gpio/kona_gpio.c b/drivers/gpio/kona_gpio.c
index 912a4ca..2979188 100644
--- a/drivers/gpio/kona_gpio.c
+++ b/drivers/gpio/kona_gpio.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <malloc.h>
#include <asm/io.h>
#include <asm/arch/sysmap.h>
diff --git a/drivers/gpio/mpc83xx_gpio.c b/drivers/gpio/mpc83xx_gpio.c
index dcd78e7..276a3b3 100644
--- a/drivers/gpio/mpc83xx_gpio.c
+++ b/drivers/gpio/mpc83xx_gpio.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <malloc.h>
#include <mpc83xx.h>
#include <asm/gpio.h>
#include <asm/io.h>
diff --git a/drivers/gpio/mscc_sgpio.c b/drivers/gpio/mscc_sgpio.c
index 3378ebb..c65ca81 100644
--- a/drivers/gpio/mscc_sgpio.c
+++ b/drivers/gpio/mscc_sgpio.c
@@ -13,6 +13,7 @@
#include <asm/io.h>
#include <errno.h>
#include <clk.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
#define MSCC_SGPIOS_PER_BANK 32
diff --git a/drivers/gpio/mvgpio.c b/drivers/gpio/mvgpio.c
index ea2f689..12e7197 100644
--- a/drivers/gpio/mvgpio.c
+++ b/drivers/gpio/mvgpio.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <malloc.h>
#include <asm/io.h>
#include <linux/errno.h>
#include "mvgpio.h"
diff --git a/drivers/gpio/mxs_gpio.c b/drivers/gpio/mxs_gpio.c
index 77778e9..405e9ac 100644
--- a/drivers/gpio/mxs_gpio.c
+++ b/drivers/gpio/mxs_gpio.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <malloc.h>
#include <linux/errno.h>
#include <asm/io.h>
#include <asm/arch/iomux.h>
diff --git a/drivers/gpio/pca953x_gpio.c b/drivers/gpio/pca953x_gpio.c
index 5c29440..d06b834 100644
--- a/drivers/gpio/pca953x_gpio.c
+++ b/drivers/gpio/pca953x_gpio.c
@@ -26,6 +26,7 @@
#include <malloc.h>
#include <asm/gpio.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#include <dt-bindings/gpio/gpio.h>
#define PCA953X_INPUT 0
diff --git a/drivers/gpio/pca9698.c b/drivers/gpio/pca9698.c
index ab0c4c1..11274c7 100644
--- a/drivers/gpio/pca9698.c
+++ b/drivers/gpio/pca9698.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <i2c.h>
+#include <malloc.h>
#include <linux/errno.h>
#include <pca9698.h>
diff --git a/drivers/gpio/sh_pfc.c b/drivers/gpio/sh_pfc.c
index ad8da9e..6320a62 100644
--- a/drivers/gpio/sh_pfc.c
+++ b/drivers/gpio/sh_pfc.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <malloc.h>
#include <asm/bitops.h>
#include <asm/io.h>
#include <sh_pfc.h>
diff --git a/drivers/gpio/spear_gpio.c b/drivers/gpio/spear_gpio.c
index 525aa3b..4e4cd12 100644
--- a/drivers/gpio/spear_gpio.c
+++ b/drivers/gpio/spear_gpio.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <malloc.h>
#include <asm/arch/hardware.h>
#include <asm/gpio.h>
#include <asm/io.h>
diff --git a/drivers/gpio/stm32_gpio.c b/drivers/gpio/stm32_gpio.c
index 302a434..f55f834 100644
--- a/drivers/gpio/stm32_gpio.c
+++ b/drivers/gpio/stm32_gpio.c
@@ -12,6 +12,7 @@
#include <asm/arch/stm32.h>
#include <asm/gpio.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#include <linux/errno.h>
#include <linux/io.h>
diff --git a/drivers/hwspinlock/hwspinlock-uclass.c b/drivers/hwspinlock/hwspinlock-uclass.c
index 195f079..61d226b 100644
--- a/drivers/hwspinlock/hwspinlock-uclass.c
+++ b/drivers/hwspinlock/hwspinlock-uclass.c
@@ -8,6 +8,8 @@
#include <errno.h>
#include <hwspinlock.h>
#include <dm/device-internal.h>
+#include <dm/device_compat.h>
+#include <linux/compat.h>
static inline const struct hwspinlock_ops *
hwspinlock_dev_ops(struct udevice *dev)
diff --git a/drivers/hwspinlock/stm32_hwspinlock.c b/drivers/hwspinlock/stm32_hwspinlock.c
index a32bde4..74afb4a 100644
--- a/drivers/hwspinlock/stm32_hwspinlock.c
+++ b/drivers/hwspinlock/stm32_hwspinlock.c
@@ -7,6 +7,7 @@
#include <clk.h>
#include <dm.h>
#include <hwspinlock.h>
+#include <malloc.h>
#include <asm/io.h>
#define STM32_MUTEX_COREID BIT(8)
diff --git a/drivers/i2c/at91_i2c.c b/drivers/i2c/at91_i2c.c
index 846b3d5..c817ed6 100644
--- a/drivers/i2c/at91_i2c.c
+++ b/drivers/i2c/at91_i2c.c
@@ -5,6 +5,7 @@
* (C) Copyright 2016 Songjun Wu <songjun.wu@atmel.com>
*/
+#include <malloc.h>
#include <asm/io.h>
#include <common.h>
#include <clk.h>
diff --git a/drivers/i2c/designware_i2c.c b/drivers/i2c/designware_i2c.c
index ae9cf16..e1d5aeb 100644
--- a/drivers/i2c/designware_i2c.c
+++ b/drivers/i2c/designware_i2c.c
@@ -8,10 +8,12 @@
#include <clk.h>
#include <dm.h>
#include <i2c.h>
+#include <malloc.h>
#include <pci.h>
#include <reset.h>
#include <asm/io.h>
#include "designware_i2c.h"
+#include <dm/device_compat.h>
#include <linux/err.h>
#ifdef CONFIG_SYS_I2C_DW_ENABLE_STATUS_UNSUPPORTED
diff --git a/drivers/i2c/i2c-uniphier-f.c b/drivers/i2c/i2c-uniphier-f.c
index 62acd28..d8b4a68 100644
--- a/drivers/i2c/i2c-uniphier-f.c
+++ b/drivers/i2c/i2c-uniphier-f.c
@@ -5,6 +5,7 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
+#include <dm/device_compat.h>
#include <linux/errno.h>
#include <linux/io.h>
#include <linux/iopoll.h>
diff --git a/drivers/i2c/i2c-uniphier.c b/drivers/i2c/i2c-uniphier.c
index 07a7e03..f06523a 100644
--- a/drivers/i2c/i2c-uniphier.c
+++ b/drivers/i2c/i2c-uniphier.c
@@ -5,6 +5,7 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
+#include <dm/device_compat.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/io.h>
diff --git a/drivers/i2c/imx_lpi2c.c b/drivers/i2c/imx_lpi2c.c
index c9d3faa..62e6804 100644
--- a/drivers/i2c/imx_lpi2c.c
+++ b/drivers/i2c/imx_lpi2c.c
@@ -13,6 +13,7 @@
#include <dm.h>
#include <fdtdec.h>
#include <i2c.h>
+#include <dm/device_compat.h>
#define LPI2C_FIFO_SIZE 4
#define LPI2C_NACK_TOUT_MS 1
diff --git a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
index 413aaa6..5029c71 100644
--- a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
+++ b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <errno.h>
#include <i2c.h>
+#include <malloc.h>
#include <asm/gpio.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/i2c/muxes/i2c-mux-gpio.c b/drivers/i2c/muxes/i2c-mux-gpio.c
index 29e283c..0575bd8 100644
--- a/drivers/i2c/muxes/i2c-mux-gpio.c
+++ b/drivers/i2c/muxes/i2c-mux-gpio.c
@@ -11,6 +11,7 @@
#include <asm-generic/gpio.h>
#include <common.h>
#include <dm.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <dm/pinctrl.h>
#include <fdtdec.h>
diff --git a/drivers/i2c/muxes/i2c-mux-uclass.c b/drivers/i2c/muxes/i2c-mux-uclass.c
index 8b11499..9a3dd7e 100644
--- a/drivers/i2c/muxes/i2c-mux-uclass.c
+++ b/drivers/i2c/muxes/i2c-mux-uclass.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <errno.h>
#include <i2c.h>
+#include <malloc.h>
#include <dm/lists.h>
#include <dm/root.h>
diff --git a/drivers/i2c/muxes/pca954x.c b/drivers/i2c/muxes/pca954x.c
index bb2935f..be90a7b 100644
--- a/drivers/i2c/muxes/pca954x.c
+++ b/drivers/i2c/muxes/pca954x.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <errno.h>
#include <i2c.h>
+#include <malloc.h>
#include <asm-generic/gpio.h>
diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
index 6b7ce98..a03c465 100644
--- a/drivers/i2c/mxc_i2c.c
+++ b/drivers/i2c/mxc_i2c.c
@@ -16,6 +16,7 @@
#include <common.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
+#include <dm/device_compat.h>
#include <linux/errno.h>
#include <asm/mach-imx/mxc_i2c.h>
#include <asm/io.h>
diff --git a/drivers/i2c/rcar_i2c.c b/drivers/i2c/rcar_i2c.c
index 05d0dc6..b877602 100644
--- a/drivers/i2c/rcar_i2c.c
+++ b/drivers/i2c/rcar_i2c.c
@@ -17,6 +17,7 @@
#include <i2c.h>
#include <asm/io.h>
#include <wait_bit.h>
+#include <dm/device_compat.h>
#define RCAR_I2C_ICSCR 0x00 /* slave ctrl */
#define RCAR_I2C_ICMCR 0x04 /* master ctrl */
diff --git a/drivers/i2c/stm32f7_i2c.c b/drivers/i2c/stm32f7_i2c.c
index 21dfa50..7d046c1 100644
--- a/drivers/i2c/stm32f7_i2c.c
+++ b/drivers/i2c/stm32f7_i2c.c
@@ -7,6 +7,7 @@
#include <clk.h>
#include <dm.h>
#include <i2c.h>
+#include <malloc.h>
#include <reset.h>
#include <dm/device.h>
diff --git a/drivers/i2c/xilinx_xiic.c b/drivers/i2c/xilinx_xiic.c
index 5ce0f86..149bd32 100644
--- a/drivers/i2c/xilinx_xiic.c
+++ b/drivers/i2c/xilinx_xiic.c
@@ -15,6 +15,7 @@
#include <i2c.h>
#include <wait_bit.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
struct xilinx_xiic_priv {
void __iomem *base;
diff --git a/drivers/led/led_gpio.c b/drivers/led/led_gpio.c
index 93f6b91..af6b824 100644
--- a/drivers/led/led_gpio.c
+++ b/drivers/led/led_gpio.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <errno.h>
#include <led.h>
+#include <malloc.h>
#include <asm/gpio.h>
#include <dm/lists.h>
diff --git a/drivers/mailbox/k3-sec-proxy.c b/drivers/mailbox/k3-sec-proxy.c
index 1194c6f..a560209 100644
--- a/drivers/mailbox/k3-sec-proxy.c
+++ b/drivers/mailbox/k3-sec-proxy.c
@@ -7,7 +7,9 @@
*/
#include <common.h>
+#include <malloc.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#include <linux/types.h>
#include <linux/bitops.h>
#include <linux/soc/ti/k3-sec-proxy.h>
diff --git a/drivers/mailbox/mailbox-uclass.c b/drivers/mailbox/mailbox-uclass.c
index a6d2d1f..291f5c2 100644
--- a/drivers/mailbox/mailbox-uclass.c
+++ b/drivers/mailbox/mailbox-uclass.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <mailbox.h>
#include <mailbox-uclass.h>
+#include <malloc.h>
#include <time.h>
static inline struct mbox_ops *mbox_dev_ops(struct udevice *dev)
diff --git a/drivers/mailbox/sandbox-mbox-test.c b/drivers/mailbox/sandbox-mbox-test.c
index ba1bb1c..faca8fc 100644
--- a/drivers/mailbox/sandbox-mbox-test.c
+++ b/drivers/mailbox/sandbox-mbox-test.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <mailbox.h>
+#include <malloc.h>
#include <asm/io.h>
struct sandbox_mbox_test {
diff --git a/drivers/mailbox/sandbox-mbox.c b/drivers/mailbox/sandbox-mbox.c
index 442ca63..25e23eb 100644
--- a/drivers/mailbox/sandbox-mbox.c
+++ b/drivers/mailbox/sandbox-mbox.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <mailbox-uclass.h>
+#include <malloc.h>
#include <asm/io.h>
#include <asm/mbox.h>
diff --git a/drivers/mailbox/stm32-ipcc.c b/drivers/mailbox/stm32-ipcc.c
index d4035a8..13e642a 100644
--- a/drivers/mailbox/stm32-ipcc.c
+++ b/drivers/mailbox/stm32-ipcc.c
@@ -7,7 +7,9 @@
#include <clk.h>
#include <dm.h>
#include <mailbox-uclass.h>
+#include <malloc.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
/*
* IPCC has one set of registers per CPU
diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c
index c463e6a..60f6a38 100644
--- a/drivers/mailbox/tegra-hsp.c
+++ b/drivers/mailbox/tegra-hsp.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <malloc.h>
#include <asm/io.h>
#include <dm.h>
#include <mailbox-uclass.h>
diff --git a/drivers/mailbox/zynqmp-ipi.c b/drivers/mailbox/zynqmp-ipi.c
index c181a7b..17b4654 100644
--- a/drivers/mailbox/zynqmp-ipi.c
+++ b/drivers/mailbox/zynqmp-ipi.c
@@ -9,6 +9,7 @@
#include <asm/io.h>
#include <dm.h>
#include <mailbox-uclass.h>
+#include <dm/device_compat.h>
#include <mach/sys_proto.h>
#include <linux/ioport.h>
#include <linux/io.h>
diff --git a/drivers/misc/imx8/scu_api.c b/drivers/misc/imx8/scu_api.c
index b341917..3ad21c1 100644
--- a/drivers/misc/imx8/scu_api.c
+++ b/drivers/misc/imx8/scu_api.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <hang.h>
+#include <malloc.h>
#include <asm/io.h>
#include <dm.h>
#include <asm/arch/sci/sci.h>
diff --git a/drivers/misc/k3_avs.c b/drivers/misc/k3_avs.c
index c19c3c0..47e4273 100644
--- a/drivers/misc/k3_avs.c
+++ b/drivers/misc/k3_avs.c
@@ -13,6 +13,7 @@
#include <asm/io.h>
#include <i2c.h>
#include <k3-avs.h>
+#include <dm/device_compat.h>
#include <power/regulator.h>
#define AM6_VTM_DEVINFO(i) (priv->base + 0x100 + 0x20 * (i))
diff --git a/drivers/misc/p2sb-uclass.c b/drivers/misc/p2sb-uclass.c
index a198700..9fe0aca 100644
--- a/drivers/misc/p2sb-uclass.c
+++ b/drivers/misc/p2sb-uclass.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <mapmem.h>
#include <p2sb.h>
#include <spl.h>
diff --git a/drivers/misc/stm32_rcc.c b/drivers/misc/stm32_rcc.c
index e7efcde..980b844 100644
--- a/drivers/misc/stm32_rcc.c
+++ b/drivers/misc/stm32_rcc.c
@@ -9,6 +9,7 @@
#include <misc.h>
#include <stm32_rcc.h>
#include <dm/device-internal.h>
+#include <dm/device_compat.h>
#include <dm/lists.h>
struct stm32_rcc_clk stm32_rcc_clk_f42x = {
diff --git a/drivers/misc/tegra186_bpmp.c b/drivers/misc/tegra186_bpmp.c
index 489337c..ce2b925 100644
--- a/drivers/misc/tegra186_bpmp.c
+++ b/drivers/misc/tegra186_bpmp.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <time.h>
#include <dm/lists.h>
#include <dm/root.h>
diff --git a/drivers/misc/vexpress_config.c b/drivers/misc/vexpress_config.c
index 9f5baa5..53d7e1d 100644
--- a/drivers/misc/vexpress_config.c
+++ b/drivers/misc/vexpress_config.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <dm/read.h>
#include <asm/io.h>
#include <linux/delay.h>
diff --git a/drivers/mmc/am654_sdhci.c b/drivers/mmc/am654_sdhci.c
index 6053d3d..aad9d8b 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 ea8eb0d..d396afc 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 7f70aca..8cebf99 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 112f115..ab40019 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 7cbd6e4..4900498 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 cb2a7c3..8d4f886 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 c7a832c..0b90a97 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 cae42ec..da3ae2e 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 d487081..bd1fb09 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 e01ac31..c3b1313 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 4736263..e9108da 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 c8875ce..29bbb4b 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 e38e8ab..2202158 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 5a413f0..c606ef0 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 568a3e7..786cdc7 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 0a7a2fe..6f3b2ad 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 5a8506d..092b740 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 8f89bda..4dbe71f 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 83c32a3..24fabee 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>
diff --git a/drivers/mtd/hbmc-am654.c b/drivers/mtd/hbmc-am654.c
index 5a560f1..846b0e8 100644
--- a/drivers/mtd/hbmc-am654.c
+++ b/drivers/mtd/hbmc-am654.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <regmap.h>
#include <syscon.h>
+#include <dm/device_compat.h>
#define FSS_SYSC_REG 0x4
diff --git a/drivers/mtd/mtd_uboot.c b/drivers/mtd/mtd_uboot.c
index 17df8b0..db20a6b 100644
--- a/drivers/mtd/mtd_uboot.c
+++ b/drivers/mtd/mtd_uboot.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
#include <env.h>
+#include <malloc.h>
#include <dm/device.h>
#include <dm/uclass-internal.h>
#include <linux/err.h>
diff --git a/drivers/mtd/nand/core.c b/drivers/mtd/nand/core.c
index 3abaef2..bc0accf 100644
--- a/drivers/mtd/nand/core.c
+++ b/drivers/mtd/nand/core.c
@@ -11,6 +11,7 @@
#include <common.h>
#ifndef __UBOOT__
+#include <linux/compat.h>
#include <linux/module.h>
#endif
#include <linux/mtd/nand.h>
diff --git a/drivers/mtd/nand/raw/atmel_nand.c b/drivers/mtd/nand/raw/atmel_nand.c
index 3526585..996d3db 100644
--- a/drivers/mtd/nand/raw/atmel_nand.c
+++ b/drivers/mtd/nand/raw/atmel_nand.c
@@ -13,6 +13,7 @@
#include <common.h>
#include <asm/gpio.h>
#include <asm/arch/gpio.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <malloc.h>
diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
index d3e3966..5232328 100644
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
@@ -17,6 +17,7 @@
#include <memalign.h>
#include <nand.h>
#include <clk.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/err.h>
#include <linux/ioport.h>
diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c b/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c
index bb8aea2..c586798 100644
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c
@@ -1,8 +1,9 @@
// SPDX-License-Identifier: GPL-2.0+
#include <common.h>
-#include "brcmnand_compat.h"
+#include <malloc.h>
#include <dm/devres.h>
+#include "brcmnand_compat.h"
static char *devm_kvasprintf(struct udevice *dev, gfp_t gfp, const char *fmt,
va_list ap)
diff --git a/drivers/mtd/nand/raw/denali.c b/drivers/mtd/nand/raw/denali.c
index 235a5fc..f51d3e2 100644
--- a/drivers/mtd/nand/raw/denali.c
+++ b/drivers/mtd/nand/raw/denali.c
@@ -7,7 +7,9 @@
#include <asm/dma-mapping.h>
#include <dm.h>
+#include <malloc.h>
#include <nand.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/bitfield.h>
#include <linux/dma-direction.h>
diff --git a/drivers/mtd/nand/raw/denali_dt.c b/drivers/mtd/nand/raw/denali_dt.c
index 759ad40..41b93e6 100644
--- a/drivers/mtd/nand/raw/denali_dt.c
+++ b/drivers/mtd/nand/raw/denali_dt.c
@@ -6,6 +6,7 @@
#include <clk.h>
#include <dm.h>
+#include <dm/device_compat.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <linux/printk.h>
diff --git a/drivers/mtd/nand/raw/pxa3xx_nand.c b/drivers/mtd/nand/raw/pxa3xx_nand.c
index e179a78..03f210b 100644
--- a/drivers/mtd/nand/raw/pxa3xx_nand.c
+++ b/drivers/mtd/nand/raw/pxa3xx_nand.c
@@ -10,6 +10,7 @@
#include <malloc.h>
#include <fdtdec.h>
#include <nand.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/err.h>
#include <linux/errno.h>
diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c
index cd5c31e..9b99be1 100644
--- a/drivers/mtd/nand/raw/sunxi_nand.c
+++ b/drivers/mtd/nand/raw/sunxi_nand.c
@@ -26,8 +26,10 @@
#include <common.h>
#include <fdtdec.h>
+#include <malloc.h>
#include <memalign.h>
#include <nand.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/err.h>
diff --git a/drivers/mtd/nand/raw/tegra_nand.c b/drivers/mtd/nand/raw/tegra_nand.c
index 74acdfb..ae699d1 100644
--- a/drivers/mtd/nand/raw/tegra_nand.c
+++ b/drivers/mtd/nand/raw/tegra_nand.c
@@ -13,6 +13,7 @@
#include <asm/arch/clock.h>
#include <asm/arch/funcmux.h>
#include <asm/arch-tegra/clk_rst.h>
+#include <dm/device_compat.h>
#include <linux/errno.h>
#include <asm/gpio.h>
#include <fdtdec.h>
diff --git a/drivers/mtd/nand/raw/vf610_nfc.c b/drivers/mtd/nand/raw/vf610_nfc.c
index 3326c2b..52c8a94 100644
--- a/drivers/mtd/nand/raw/vf610_nfc.c
+++ b/drivers/mtd/nand/raw/vf610_nfc.c
@@ -23,6 +23,7 @@
#include <common.h>
#include <malloc.h>
+#include <dm/device_compat.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/rawnand.h>
diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
index d976c19..cd624ec 100644
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
@@ -24,6 +24,7 @@
#include <errno.h>
#include <spi.h>
#include <spi-mem.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/mtd/spinand.h>
#endif
diff --git a/drivers/mtd/nand/spi/gigadevice.c b/drivers/mtd/nand/spi/gigadevice.c
index e329c3c..0b228dc 100644
--- a/drivers/mtd/nand/spi/gigadevice.c
+++ b/drivers/mtd/nand/spi/gigadevice.c
@@ -7,6 +7,7 @@
*/
#ifndef __UBOOT__
+#include <malloc.h>
#include <linux/device.h>
#include <linux/kernel.h>
#endif
diff --git a/drivers/mtd/nand/spi/macronix.c b/drivers/mtd/nand/spi/macronix.c
index 1119677..67d092b 100644
--- a/drivers/mtd/nand/spi/macronix.c
+++ b/drivers/mtd/nand/spi/macronix.c
@@ -6,6 +6,7 @@
*/
#ifndef __UBOOT__
+#include <malloc.h>
#include <linux/device.h>
#include <linux/kernel.h>
#endif
diff --git a/drivers/mtd/nand/spi/micron.c b/drivers/mtd/nand/spi/micron.c
index 9c24542..687306e 100644
--- a/drivers/mtd/nand/spi/micron.c
+++ b/drivers/mtd/nand/spi/micron.c
@@ -7,6 +7,7 @@
*/
#ifndef __UBOOT__
+#include <malloc.h>
#include <linux/device.h>
#include <linux/kernel.h>
#endif
diff --git a/drivers/mtd/nand/spi/winbond.c b/drivers/mtd/nand/spi/winbond.c
index de9352e..6ede98c 100644
--- a/drivers/mtd/nand/spi/winbond.c
+++ b/drivers/mtd/nand/spi/winbond.c
@@ -8,6 +8,7 @@
*/
#ifndef __UBOOT__
+#include <malloc.h>
#include <linux/device.h>
#include <linux/kernel.h>
#endif
diff --git a/drivers/mtd/renesas_rpc_hf.c b/drivers/mtd/renesas_rpc_hf.c
index f5c6515..fc2aa22 100644
--- a/drivers/mtd/renesas_rpc_hf.c
+++ b/drivers/mtd/renesas_rpc_hf.c
@@ -8,9 +8,11 @@
*/
#include <common.h>
+#include <malloc.h>
#include <asm/io.h>
#include <clk.h>
#include <dm.h>
+#include <dm/device_compat.h>
#include <dm/of_access.h>
#include <errno.h>
#include <fdt_support.h>
diff --git a/drivers/mtd/spi/sf-uclass.c b/drivers/mtd/spi/sf-uclass.c
index c610752..5ebcca5 100644
--- a/drivers/mtd/spi/sf-uclass.c
+++ b/drivers/mtd/spi/sf-uclass.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <spi.h>
#include <spi_flash.h>
#include <dm/device-internal.h>
diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c
index b27e442..7b6ad49 100644
--- a/drivers/mtd/spi/spi-nor-core.c
+++ b/drivers/mtd/spi/spi-nor-core.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/err.h>
#include <linux/errno.h>
diff --git a/drivers/mtd/spi/spi-nor-tiny.c b/drivers/mtd/spi/spi-nor-tiny.c
index c19d468..ccc0ab0 100644
--- a/drivers/mtd/spi/spi-nor-tiny.c
+++ b/drivers/mtd/spi/spi-nor-tiny.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/log2.h>
diff --git a/drivers/mtd/ubi/debug.c b/drivers/mtd/ubi/debug.c
index aec2613..d2b7ca5 100644
--- a/drivers/mtd/ubi/debug.c
+++ b/drivers/mtd/ubi/debug.c
@@ -6,6 +6,7 @@
*/
#include <hexdump.h>
+#include <malloc.h>
#include <ubi_uboot.h>
#include "ubi.h"
#ifndef __UBOOT__
diff --git a/drivers/mtd/ubi/misc.c b/drivers/mtd/ubi/misc.c
index 685324d..3f7ee59 100644
--- a/drivers/mtd/ubi/misc.c
+++ b/drivers/mtd/ubi/misc.c
@@ -7,6 +7,7 @@
/* Here we keep miscellaneous functions which are used all over the UBI code */
+#include <malloc.h>
#include <ubi_uboot.h>
#include "ubi.h"
diff --git a/drivers/mtd/ubi/upd.c b/drivers/mtd/ubi/upd.c
index d0a6a1b..0f7951c 100644
--- a/drivers/mtd/ubi/upd.c
+++ b/drivers/mtd/ubi/upd.c
@@ -26,6 +26,7 @@
*/
#ifndef __UBOOT__
+#include <malloc.h>
#include <linux/uaccess.h>
#else
#include <div64.h>
diff --git a/drivers/net/bcm6348-eth.c b/drivers/net/bcm6348-eth.c
index 7100e68..fe35329 100644
--- a/drivers/net/bcm6348-eth.c
+++ b/drivers/net/bcm6348-eth.c
@@ -10,6 +10,7 @@
#include <clk.h>
#include <dm.h>
#include <dma.h>
+#include <malloc.h>
#include <miiphy.h>
#include <net.h>
#include <phy.h>
diff --git a/drivers/net/bcm6368-eth.c b/drivers/net/bcm6368-eth.c
index 110985e..1200049 100644
--- a/drivers/net/bcm6368-eth.c
+++ b/drivers/net/bcm6368-eth.c
@@ -10,11 +10,13 @@
#include <clk.h>
#include <dm.h>
#include <dma.h>
+#include <malloc.h>
#include <miiphy.h>
#include <net.h>
#include <reset.h>
#include <wait_bit.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#define ETH_PORT_STR "brcm,enetsw-port"
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index aa33fd5..baac277 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -17,6 +17,7 @@
#include <malloc.h>
#include <pci.h>
#include <reset.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/compiler.h>
#include <linux/err.h>
diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c
index 4632111..0564beb 100644
--- a/drivers/net/dwc_eth_qos.c
+++ b/drivers/net/dwc_eth_qos.c
@@ -31,6 +31,7 @@
#include <cpu_func.h>
#include <dm.h>
#include <errno.h>
+#include <malloc.h>
#include <memalign.h>
#include <miiphy.h>
#include <net.h>
diff --git a/drivers/net/dwmac_socfpga.c b/drivers/net/dwmac_socfpga.c
index 66a5f95..e93561d 100644
--- a/drivers/net/dwmac_socfpga.c
+++ b/drivers/net/dwmac_socfpga.c
@@ -14,6 +14,7 @@
#include <reset.h>
#include <syscon.h>
#include "designware.h"
+#include <dm/device_compat.h>
#include <linux/err.h>
#include <asm/arch/system_manager.h>
diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c
index 0946011..9212920 100644
--- a/drivers/net/e1000.c
+++ b/drivers/net/e1000.c
@@ -33,6 +33,7 @@ tested on both gig copper and gig fiber boards
#include <cpu_func.h>
#include <dm.h>
#include <errno.h>
+#include <malloc.h>
#include <memalign.h>
#include <pci.h>
#include "e1000.h"
diff --git a/drivers/net/e1000_spi.c b/drivers/net/e1000_spi.c
index aecd290..52b3c79 100644
--- a/drivers/net/e1000_spi.c
+++ b/drivers/net/e1000_spi.c
@@ -1,6 +1,7 @@
#include <common.h>
#include <console.h>
#include "e1000.h"
+#include <malloc.h>
#include <linux/compiler.h>
/*-----------------------------------------------------------------------
diff --git a/drivers/net/fsl-mc/dpio/qbman_portal.c b/drivers/net/fsl-mc/dpio/qbman_portal.c
index c51354c..e161b4e 100644
--- a/drivers/net/fsl-mc/dpio/qbman_portal.c
+++ b/drivers/net/fsl-mc/dpio/qbman_portal.c
@@ -3,6 +3,7 @@
* Copyright (C) 2014 Freescale Semiconductor
*/
+#include <malloc.h>
#include <asm/arch/clock.h>
#include "qbman_portal.h"
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index 8ff43a9..07bbcc9 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -8,6 +8,7 @@
#include <cpu_func.h>
#include <env.h>
#include <errno.h>
+#include <malloc.h>
#include <linux/bug.h>
#include <asm/io.h>
#include <linux/libfdt.h>
diff --git a/drivers/net/fsl_enetc.c b/drivers/net/fsl_enetc.c
index f0d15fe..bee7315 100644
--- a/drivers/net/fsl_enetc.c
+++ b/drivers/net/fsl_enetc.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <malloc.h>
#include <memalign.h>
#include <asm/io.h>
#include <pci.h>
diff --git a/drivers/net/ftgmac100.c b/drivers/net/ftgmac100.c
index ebb7433..40e6b3b 100644
--- a/drivers/net/ftgmac100.c
+++ b/drivers/net/ftgmac100.c
@@ -14,9 +14,11 @@
#include <clk.h>
#include <cpu_func.h>
#include <dm.h>
+#include <malloc.h>
#include <miiphy.h>
#include <net.h>
#include <wait_bit.h>
+#include <dm/device_compat.h>
#include <linux/io.h>
#include <linux/iopoll.h>
diff --git a/drivers/net/higmacv300.c b/drivers/net/higmacv300.c
index 897741a..0c1dd68 100644
--- a/drivers/net/higmacv300.c
+++ b/drivers/net/higmacv300.c
@@ -4,6 +4,7 @@
*/
#include <cpu_func.h>
+#include <malloc.h>
#include <asm/io.h>
#include <common.h>
#include <console.h>
diff --git a/drivers/net/mscc_eswitch/jr2_switch.c b/drivers/net/mscc_eswitch/jr2_switch.c
index 6655177..33dd002 100644
--- a/drivers/net/mscc_eswitch/jr2_switch.c
+++ b/drivers/net/mscc_eswitch/jr2_switch.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <config.h>
#include <dm.h>
+#include <malloc.h>
#include <dm/of_access.h>
#include <dm/of_addr.h>
#include <fdt_support.h>
diff --git a/drivers/net/mscc_eswitch/luton_switch.c b/drivers/net/mscc_eswitch/luton_switch.c
index dffe81d..9d24c00 100644
--- a/drivers/net/mscc_eswitch/luton_switch.c
+++ b/drivers/net/mscc_eswitch/luton_switch.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <config.h>
#include <dm.h>
+#include <malloc.h>
#include <dm/of_access.h>
#include <dm/of_addr.h>
#include <fdt_support.h>
diff --git a/drivers/net/mscc_eswitch/ocelot_switch.c b/drivers/net/mscc_eswitch/ocelot_switch.c
index 0ba84ab..fe48f37 100644
--- a/drivers/net/mscc_eswitch/ocelot_switch.c
+++ b/drivers/net/mscc_eswitch/ocelot_switch.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <config.h>
#include <dm.h>
+#include <malloc.h>
#include <dm/of_access.h>
#include <dm/of_addr.h>
#include <fdt_support.h>
diff --git a/drivers/net/mscc_eswitch/serval_switch.c b/drivers/net/mscc_eswitch/serval_switch.c
index 1a21360..f05fa42 100644
--- a/drivers/net/mscc_eswitch/serval_switch.c
+++ b/drivers/net/mscc_eswitch/serval_switch.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <config.h>
#include <dm.h>
+#include <malloc.h>
#include <dm/of_access.h>
#include <dm/of_addr.h>
#include <fdt_support.h>
diff --git a/drivers/net/mscc_eswitch/servalt_switch.c b/drivers/net/mscc_eswitch/servalt_switch.c
index d20ec49..bf95a38 100644
--- a/drivers/net/mscc_eswitch/servalt_switch.c
+++ b/drivers/net/mscc_eswitch/servalt_switch.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <config.h>
#include <dm.h>
+#include <malloc.h>
#include <dm/of_access.h>
#include <dm/of_addr.h>
#include <fdt_support.h>
diff --git a/drivers/net/mtk_eth.c b/drivers/net/mtk_eth.c
index c22e590..77589b2 100644
--- a/drivers/net/mtk_eth.c
+++ b/drivers/net/mtk_eth.c
@@ -17,6 +17,7 @@
#include <wait_bit.h>
#include <asm/gpio.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
#include <linux/ioport.h>
#include <linux/mdio.h>
diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c
index 505fabd..d737400 100644
--- a/drivers/net/mvneta.c
+++ b/drivers/net/mvneta.c
@@ -20,6 +20,7 @@
#include <config.h>
#include <malloc.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/errno.h>
#include <phy.h>
diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
index 105fdc9..fcd2486 100644
--- a/drivers/net/mvpp2.c
+++ b/drivers/net/mvpp2.c
@@ -17,6 +17,7 @@
#include <cpu_func.h>
#include <dm.h>
#include <dm/device-internal.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <dm/lists.h>
#include <net.h>
diff --git a/drivers/net/pch_gbe.c b/drivers/net/pch_gbe.c
index e4507bf..b282370 100644
--- a/drivers/net/pch_gbe.c
+++ b/drivers/net/pch_gbe.c
@@ -9,6 +9,7 @@
#include <cpu_func.h>
#include <dm.h>
#include <errno.h>
+#include <malloc.h>
#include <asm/io.h>
#include <pci.h>
#include <miiphy.h>
diff --git a/drivers/net/pfe_eth/pfe_driver.c b/drivers/net/pfe_eth/pfe_driver.c
index 14a8c68..f70a235 100644
--- a/drivers/net/pfe_eth/pfe_driver.c
+++ b/drivers/net/pfe_eth/pfe_driver.c
@@ -4,6 +4,7 @@
* Copyright 2017 NXP
*/
+#include <malloc.h>
#include <net/pfe_eth/pfe_eth.h>
#include <net/pfe_eth/pfe_firmware.h>
diff --git a/drivers/net/pfe_eth/pfe_eth.c b/drivers/net/pfe_eth/pfe_eth.c
index c525674..1b5d11e 100644
--- a/drivers/net/pfe_eth/pfe_eth.c
+++ b/drivers/net/pfe_eth/pfe_eth.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <dm/platform_data/pfe_dm_eth.h>
#include <net.h>
#include <net/pfe_eth/pfe_eth.h>
diff --git a/drivers/net/pfe_eth/pfe_firmware.c b/drivers/net/pfe_eth/pfe_firmware.c
index e4563f1..13112d9 100644
--- a/drivers/net/pfe_eth/pfe_firmware.c
+++ b/drivers/net/pfe_eth/pfe_firmware.c
@@ -10,6 +10,7 @@
* files.
*/
+#include <malloc.h>
#include <net/pfe_eth/pfe_eth.h>
#include <net/pfe_eth/pfe_firmware.h>
#ifdef CONFIG_CHAIN_OF_TRUST
diff --git a/drivers/net/pfe_eth/pfe_mdio.c b/drivers/net/pfe_eth/pfe_mdio.c
index 6230967..b990e7f 100644
--- a/drivers/net/pfe_eth/pfe_mdio.c
+++ b/drivers/net/pfe_eth/pfe_mdio.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <dm/platform_data/pfe_dm_eth.h>
#include <net.h>
#include <net/pfe_eth/pfe_eth.h>
diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c
index 0ae0edd..9d9f746 100644
--- a/drivers/net/phy/fixed.c
+++ b/drivers/net/phy/fixed.c
@@ -7,6 +7,7 @@
#include <config.h>
#include <common.h>
+#include <malloc.h>
#include <phy.h>
#include <dm.h>
#include <fdt_support.h>
diff --git a/drivers/net/pic32_eth.c b/drivers/net/pic32_eth.c
index 3458440..e966be0 100644
--- a/drivers/net/pic32_eth.c
+++ b/drivers/net/pic32_eth.c
@@ -7,6 +7,7 @@
#include <cpu_func.h>
#include <errno.h>
#include <dm.h>
+#include <malloc.h>
#include <net.h>
#include <miiphy.h>
#include <console.h>
diff --git a/drivers/net/sandbox-raw-bus.c b/drivers/net/sandbox-raw-bus.c
index 0086f25..fb1ba5a 100644
--- a/drivers/net/sandbox-raw-bus.c
+++ b/drivers/net/sandbox-raw-bus.c
@@ -8,6 +8,7 @@
#include <asm/eth-raw-os.h>
#include <dm.h>
#include <errno.h>
+#include <malloc.h>
#include <dm/device-internal.h>
#include <dm/lists.h>
diff --git a/drivers/net/sni_ave.c b/drivers/net/sni_ave.c
index 64e92ab..5d66a63 100644
--- a/drivers/net/sni_ave.c
+++ b/drivers/net/sni_ave.c
@@ -8,14 +8,16 @@
#include <cpu_func.h>
#include <dm.h>
#include <fdt_support.h>
-#include <linux/err.h>
-#include <linux/io.h>
-#include <linux/iopoll.h>
+#include <malloc.h>
#include <miiphy.h>
#include <net.h>
#include <regmap.h>
#include <reset.h>
#include <syscon.h>
+#include <dm/device_compat.h>
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/iopoll.h>
#define AVE_GRST_DELAY_MSEC 40
#define AVE_MIN_XMITSIZE 60
diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c
index 6f10578..1ae776b 100644
--- a/drivers/net/sun8i_emac.c
+++ b/drivers/net/sun8i_emac.c
@@ -18,6 +18,7 @@
#include <clk.h>
#include <dm.h>
#include <fdt_support.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
#include <malloc.h>
#include <miiphy.h>
diff --git a/drivers/net/sunxi_emac.c b/drivers/net/sunxi_emac.c
index 9a5f7fd..a9874e4 100644
--- a/drivers/net/sunxi_emac.c
+++ b/drivers/net/sunxi_emac.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
#include <malloc.h>
#include <miiphy.h>
diff --git a/drivers/net/ti/am65-cpsw-nuss.c b/drivers/net/ti/am65-cpsw-nuss.c
index 2590486..2b77213 100644
--- a/drivers/net/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ti/am65-cpsw-nuss.c
@@ -7,10 +7,12 @@
*/
#include <common.h>
+#include <malloc.h>
#include <asm/io.h>
#include <asm/processor.h>
#include <clk.h>
#include <dm.h>
+#include <dm/device_compat.h>
#include <dm/lists.h>
#include <dma-uclass.h>
#include <dm/of_access.h>
diff --git a/drivers/net/ti/cpsw-common.c b/drivers/net/ti/cpsw-common.c
index 21b8bbd..ca93edb 100644
--- a/drivers/net/ti/cpsw-common.c
+++ b/drivers/net/ti/cpsw-common.c
@@ -10,6 +10,7 @@
#include <fdt_support.h>
#include <asm/io.h>
#include <cpsw.h>
+#include <dm/device_compat.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/net/ti/cpsw.c b/drivers/net/ti/cpsw.c
index 5762562..04b01a8 100644
--- a/drivers/net/ti/cpsw.c
+++ b/drivers/net/ti/cpsw.c
@@ -14,6 +14,7 @@
#include <net.h>
#include <netdev.h>
#include <cpsw.h>
+#include <dm/device_compat.h>
#include <linux/errno.h>
#include <asm/gpio.h>
#include <asm/io.h>
diff --git a/drivers/net/ti/cpsw_mdio.c b/drivers/net/ti/cpsw_mdio.c
index 6e8f652..1fa520b 100644
--- a/drivers/net/ti/cpsw_mdio.c
+++ b/drivers/net/ti/cpsw_mdio.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <malloc.h>
#include <asm/io.h>
#include <miiphy.h>
#include <wait_bit.h>
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 3d9d520..288037e 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -25,6 +25,7 @@
#include <asm/system.h>
#include <asm/arch/hardware.h>
#include <asm/arch/sys_proto.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
#include <linux/errno.h>
diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c
index 2593eb1..ef4382d 100644
--- a/drivers/nvme/nvme.c
+++ b/drivers/nvme/nvme.c
@@ -8,10 +8,12 @@
#include <cpu_func.h>
#include <dm.h>
#include <errno.h>
+#include <malloc.h>
#include <memalign.h>
#include <pci.h>
#include <time.h>
#include <dm/device-internal.h>
+#include <linux/compat.h>
#include "nvme.h"
#define NVME_Q_DEPTH 2
diff --git a/drivers/pci/pci-aardvark.c b/drivers/pci/pci-aardvark.c
index f1527ac..d678e0b 100644
--- a/drivers/pci/pci-aardvark.c
+++ b/drivers/pci/pci-aardvark.c
@@ -29,6 +29,7 @@
#include <pci.h>
#include <asm/io.h>
#include <asm-generic/gpio.h>
+#include <dm/device_compat.h>
#include <linux/ioport.h>
/* PCIe core registers */
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index 5f31812..e2882e3 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <malloc.h>
#include <pci.h>
#include <asm/io.h>
#include <dm/device-internal.h>
diff --git a/drivers/pci/pci_mvebu.c b/drivers/pci/pci_mvebu.c
index 7d9ad34..483a87d 100644
--- a/drivers/pci/pci_mvebu.c
+++ b/drivers/pci/pci_mvebu.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <dm/device-internal.h>
#include <dm/lists.h>
#include <dm/of_access.h>
diff --git a/drivers/pci/pcie_dw_ti.c b/drivers/pci/pcie_dw_ti.c
index 8cfd071..f62264c 100644
--- a/drivers/pci/pcie_dw_ti.c
+++ b/drivers/pci/pcie_dw_ti.c
@@ -12,6 +12,7 @@
#include <syscon.h>
#include <asm/io.h>
#include <asm-generic/gpio.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pci/pcie_fsl.c b/drivers/pci/pcie_fsl.c
index f516ec0..dc994b7 100644
--- a/drivers/pci/pcie_fsl.c
+++ b/drivers/pci/pcie_fsl.c
@@ -15,6 +15,7 @@
#include <asm/fsl_serdes.h>
#include <asm/io.h>
#include "pcie_fsl.h"
+#include <dm/device_compat.h>
LIST_HEAD(fsl_pcie_list);
diff --git a/drivers/pci/pcie_imx.c b/drivers/pci/pcie_imx.c
index 8e1713a..f34a157 100644
--- a/drivers/pci/pcie_imx.c
+++ b/drivers/pci/pcie_imx.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <init.h>
+#include <malloc.h>
#include <pci.h>
#include <asm/arch/clock.h>
#include <asm/arch/iomux.h>
diff --git a/drivers/pci/pcie_intel_fpga.c b/drivers/pci/pcie_intel_fpga.c
index a1f6e95..6a9f29c 100644
--- a/drivers/pci/pcie_intel_fpga.c
+++ b/drivers/pci/pcie_intel_fpga.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <pci.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#define RP_TX_REG0 0x2000
#define RP_TX_CNTRL 0x2004
diff --git a/drivers/pci/pcie_mediatek.c b/drivers/pci/pcie_mediatek.c
index eabcb66..d8a32d5 100644
--- a/drivers/pci/pcie_mediatek.c
+++ b/drivers/pci/pcie_mediatek.c
@@ -11,6 +11,7 @@
#include <clk.h>
#include <dm.h>
#include <generic-phy.h>
+#include <malloc.h>
#include <pci.h>
#include <reset.h>
#include <asm/io.h>
diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
index 2c12fa6..612c428 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -21,6 +21,7 @@
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/cpu.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
#define REG_ISCR 0x00
diff --git a/drivers/phy/bcm6318-usbh-phy.c b/drivers/phy/bcm6318-usbh-phy.c
index de055a3..2de343d 100644
--- a/drivers/phy/bcm6318-usbh-phy.c
+++ b/drivers/phy/bcm6318-usbh-phy.c
@@ -11,6 +11,7 @@
#include <clk.h>
#include <dm.h>
#include <generic-phy.h>
+#include <malloc.h>
#include <power-domain.h>
#include <reset.h>
#include <asm/io.h>
diff --git a/drivers/phy/bcm6348-usbh-phy.c b/drivers/phy/bcm6348-usbh-phy.c
index e7761e3..ed9f02b 100644
--- a/drivers/phy/bcm6348-usbh-phy.c
+++ b/drivers/phy/bcm6348-usbh-phy.c
@@ -11,6 +11,7 @@
#include <clk.h>
#include <dm.h>
#include <generic-phy.h>
+#include <malloc.h>
#include <reset.h>
#include <asm/io.h>
#include <dm/device.h>
diff --git a/drivers/phy/bcm6358-usbh-phy.c b/drivers/phy/bcm6358-usbh-phy.c
index 189a1c1..f0fda02 100644
--- a/drivers/phy/bcm6358-usbh-phy.c
+++ b/drivers/phy/bcm6358-usbh-phy.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <dm.h>
#include <generic-phy.h>
+#include <malloc.h>
#include <reset.h>
#include <asm/io.h>
#include <dm/device.h>
diff --git a/drivers/phy/bcm6368-usbh-phy.c b/drivers/phy/bcm6368-usbh-phy.c
index 99da97a..53d1f45 100644
--- a/drivers/phy/bcm6368-usbh-phy.c
+++ b/drivers/phy/bcm6368-usbh-phy.c
@@ -11,6 +11,7 @@
#include <clk.h>
#include <dm.h>
#include <generic-phy.h>
+#include <malloc.h>
#include <power-domain.h>
#include <reset.h>
#include <asm/io.h>
diff --git a/drivers/phy/marvell/comphy_core.c b/drivers/phy/marvell/comphy_core.c
index d52f42d..244beef 100644
--- a/drivers/phy/marvell/comphy_core.c
+++ b/drivers/phy/marvell/comphy_core.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
#include <fdtdec.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <asm/io.h>
diff --git a/drivers/phy/meson-g12a-usb2.c b/drivers/phy/meson-g12a-usb2.c
index ad1a77f..c23bc87 100644
--- a/drivers/phy/meson-g12a-usb2.c
+++ b/drivers/phy/meson-g12a-usb2.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <malloc.h>
#include <asm/io.h>
#include <bitfield.h>
#include <dm.h>
diff --git a/drivers/phy/meson-g12a-usb3-pcie.c b/drivers/phy/meson-g12a-usb3-pcie.c
index 920675d..82655f2 100644
--- a/drivers/phy/meson-g12a-usb3-pcie.c
+++ b/drivers/phy/meson-g12a-usb3-pcie.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <malloc.h>
#include <regmap.h>
#include <errno.h>
#include <asm/io.h>
diff --git a/drivers/phy/meson-gxl-usb2.c b/drivers/phy/meson-gxl-usb2.c
index 86e69c7..c98d12b 100644
--- a/drivers/phy/meson-gxl-usb2.c
+++ b/drivers/phy/meson-gxl-usb2.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <malloc.h>
#include <asm/io.h>
#include <bitfield.h>
#include <dm.h>
diff --git a/drivers/phy/meson-gxl-usb3.c b/drivers/phy/meson-gxl-usb3.c
index 5cbbd4d..c2a8593 100644
--- a/drivers/phy/meson-gxl-usb3.c
+++ b/drivers/phy/meson-gxl-usb3.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <malloc.h>
#include <asm/io.h>
#include <bitfield.h>
#include <dm.h>
diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers/phy/phy-mtk-tphy.c
index 255d722..bd089b7 100644
--- a/drivers/phy/phy-mtk-tphy.c
+++ b/drivers/phy/phy-mtk-tphy.c
@@ -9,8 +9,10 @@
#include <clk.h>
#include <dm.h>
#include <generic-phy.h>
+#include <malloc.h>
#include <mapmem.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <dt-bindings/phy/phy.h>
diff --git a/drivers/phy/phy-rcar-gen2.c b/drivers/phy/phy-rcar-gen2.c
index ee70b81..e93130a 100644
--- a/drivers/phy/phy-rcar-gen2.c
+++ b/drivers/phy/phy-rcar-gen2.c
@@ -11,10 +11,12 @@
#include <dm.h>
#include <fdtdec.h>
#include <generic-phy.h>
+#include <malloc.h>
#include <reset.h>
#include <syscon.h>
#include <usb.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <power/regulator.h>
diff --git a/drivers/phy/phy-rcar-gen3.c b/drivers/phy/phy-rcar-gen3.c
index b662935..ce39cd8 100644
--- a/drivers/phy/phy-rcar-gen3.c
+++ b/drivers/phy/phy-rcar-gen3.c
@@ -11,6 +11,7 @@
#include <dm.h>
#include <fdtdec.h>
#include <generic-phy.h>
+#include <malloc.h>
#include <reset.h>
#include <syscon.h>
#include <usb.h>
diff --git a/drivers/phy/phy-stm32-usbphyc.c b/drivers/phy/phy-stm32-usbphyc.c
index 6f11190..6ba3721 100644
--- a/drivers/phy/phy-stm32-usbphyc.c
+++ b/drivers/phy/phy-stm32-usbphyc.c
@@ -13,6 +13,7 @@
#include <syscon.h>
#include <usb.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <power/regulator.h>
diff --git a/drivers/phy/phy-ti-am654.c b/drivers/phy/phy-ti-am654.c
index 1c7db0d..0b2b241 100644
--- a/drivers/phy/phy-ti-am654.c
+++ b/drivers/phy/phy-ti-am654.c
@@ -10,6 +10,7 @@
#include <clk-uclass.h>
#include <dm.h>
#include <dm/device.h>
+#include <dm/device_compat.h>
#include <dm/lists.h>
#include <dt-bindings/phy/phy.h>
#include <generic-phy.h>
diff --git a/drivers/pinctrl/broadcom/pinctrl-bcm6838.c b/drivers/pinctrl/broadcom/pinctrl-bcm6838.c
index 48c0b6b..6c8a990 100644
--- a/drivers/pinctrl/broadcom/pinctrl-bcm6838.c
+++ b/drivers/pinctrl/broadcom/pinctrl-bcm6838.c
@@ -4,6 +4,7 @@
#include <dm.h>
#include <regmap.h>
#include <syscon.h>
+#include <dm/device_compat.h>
#include <dm/pinctrl.h>
#define BCM6838_CMD_LOAD_MUX 0x21
diff --git a/drivers/pinctrl/intel/pinctrl.c b/drivers/pinctrl/intel/pinctrl.c
index 42618cf..168595a 100644
--- a/drivers/pinctrl/intel/pinctrl.c
+++ b/drivers/pinctrl/intel/pinctrl.c
@@ -19,6 +19,7 @@
#include <common.h>
#include <dm.h>
#include <irq.h>
+#include <malloc.h>
#include <p2sb.h>
#include <spl.h>
#include <asm-generic/gpio.h>
diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c
index f664d76..7fbe281 100644
--- a/drivers/pinctrl/meson/pinctrl-meson.c
+++ b/drivers/pinctrl/meson/pinctrl-meson.c
@@ -5,7 +5,9 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <dm/device-internal.h>
+#include <dm/device_compat.h>
#include <dm/lists.h>
#include <dm/pinctrl.h>
#include <fdt_support.h>
diff --git a/drivers/pinctrl/mscc/mscc-common.c b/drivers/pinctrl/mscc/mscc-common.c
index 2d76c41..90c54b4 100644
--- a/drivers/pinctrl/mscc/mscc-common.c
+++ b/drivers/pinctrl/mscc/mscc-common.c
@@ -14,6 +14,7 @@
#include <config.h>
#include <dm.h>
#include <dm/device-internal.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <dm/lists.h>
#include <dm/pinctrl.h>
diff --git a/drivers/pinctrl/mtmips/pinctrl-mtmips-common.c b/drivers/pinctrl/mtmips/pinctrl-mtmips-common.c
index ee6a9d1..e361916 100644
--- a/drivers/pinctrl/mtmips/pinctrl-mtmips-common.c
+++ b/drivers/pinctrl/mtmips/pinctrl-mtmips-common.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <dm/pinctrl.h>
#include <linux/io.h>
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index da1f091..6e0bcae 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -19,7 +19,9 @@
#include <common.h>
#include <config.h>
#include <dm.h>
+#include <malloc.h>
#include <dm/device-internal.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <dm/lists.h>
#include <dm/pinctrl.h>
diff --git a/drivers/pinctrl/nxp/pinctrl-imx.c b/drivers/pinctrl/nxp/pinctrl-imx.c
index 77a8a53..474c38a 100644
--- a/drivers/pinctrl/nxp/pinctrl-imx.c
+++ b/drivers/pinctrl/nxp/pinctrl-imx.c
@@ -4,7 +4,9 @@
*/
#include <common.h>
+#include <malloc.h>
#include <mapmem.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/io.h>
#include <linux/err.h>
diff --git a/drivers/pinctrl/nxp/pinctrl-mxs.c b/drivers/pinctrl/nxp/pinctrl-mxs.c
index 5147bdc..8d61dfe 100644
--- a/drivers/pinctrl/nxp/pinctrl-mxs.c
+++ b/drivers/pinctrl/nxp/pinctrl-mxs.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/io.h>
#include <linux/err.h>
diff --git a/drivers/pinctrl/pinctrl-generic.c b/drivers/pinctrl/pinctrl-generic.c
index eecf0f5..1098366 100644
--- a/drivers/pinctrl/pinctrl-generic.c
+++ b/drivers/pinctrl/pinctrl-generic.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <dm/device_compat.h>
#include <linux/compat.h>
#include <dm/pinctrl.h>
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index 1dfc97d..380b0da 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <dm/device_compat.h>
#include <dm/pinctrl.h>
#include <linux/libfdt.h>
#include <asm/io.h>
diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c
index 0b5a043..c8e61e2 100644
--- a/drivers/pinctrl/pinctrl-stmfx.c
+++ b/drivers/pinctrl/pinctrl-stmfx.c
@@ -11,6 +11,7 @@
#include <asm/gpio.h>
#include <dm/device.h>
#include <dm/device-internal.h>
+#include <dm/device_compat.h>
#include <dm/lists.h>
#include <dm/pinctrl.h>
#include <linux/bitfield.h>
diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c
index 3425ed1..aba8810 100644
--- a/drivers/pinctrl/pinctrl-uclass.c
+++ b/drivers/pinctrl/pinctrl-uclass.c
@@ -4,6 +4,8 @@
*/
#include <common.h>
+#include <malloc.h>
+#include <dm/device_compat.h>
#include <linux/libfdt.h>
#include <linux/err.h>
#include <linux/list.h>
diff --git a/drivers/pinctrl/pinctrl_stm32.c b/drivers/pinctrl/pinctrl_stm32.c
index e0380c3..9926235 100644
--- a/drivers/pinctrl/pinctrl_stm32.c
+++ b/drivers/pinctrl/pinctrl_stm32.c
@@ -1,9 +1,11 @@
#include <common.h>
#include <dm.h>
#include <hwspinlock.h>
+#include <malloc.h>
#include <asm/arch/gpio.h>
#include <asm/gpio.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#include <dm/lists.h>
#include <dm/pinctrl.h>
#include <linux/err.h>
diff --git a/drivers/pinctrl/renesas/pfc.c b/drivers/pinctrl/renesas/pfc.c
index 5ee1161..ab64f4f 100644
--- a/drivers/pinctrl/renesas/pfc.c
+++ b/drivers/pinctrl/renesas/pfc.c
@@ -14,6 +14,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <dm/pinctrl.h>
#include <linux/io.h>
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
index a5935e8..abeba96 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <dm/device_compat.h>
#include <linux/io.h>
#include <linux/err.h>
#include <linux/kernel.h>
diff --git a/drivers/power/domain/bcm6328-power-domain.c b/drivers/power/domain/bcm6328-power-domain.c
index 425451e..a6426be 100644
--- a/drivers/power/domain/bcm6328-power-domain.c
+++ b/drivers/power/domain/bcm6328-power-domain.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <power-domain-uclass.h>
#include <asm/io.h>
diff --git a/drivers/power/domain/imx8-power-domain-legacy.c b/drivers/power/domain/imx8-power-domain-legacy.c
index 74fcb05..6f01a60 100644
--- a/drivers/power/domain/imx8-power-domain-legacy.c
+++ b/drivers/power/domain/imx8-power-domain-legacy.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <power-domain-uclass.h>
#include <asm/io.h>
#include <asm/arch/power-domain.h>
diff --git a/drivers/power/domain/imx8-power-domain.c b/drivers/power/domain/imx8-power-domain.c
index 8e328f0..571146e 100644
--- a/drivers/power/domain/imx8-power-domain.c
+++ b/drivers/power/domain/imx8-power-domain.c
@@ -6,6 +6,7 @@
#define DEBUG
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <power-domain-uclass.h>
#include <asm/arch/power-domain.h>
#include <asm/arch/sci/sci.h>
diff --git a/drivers/power/domain/imx8m-power-domain.c b/drivers/power/domain/imx8m-power-domain.c
index fbfd177..5b6467c 100644
--- a/drivers/power/domain/imx8m-power-domain.c
+++ b/drivers/power/domain/imx8m-power-domain.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <power-domain-uclass.h>
#include <asm/io.h>
#include <asm/arch/power-domain.h>
diff --git a/drivers/power/domain/meson-ee-pwrc.c b/drivers/power/domain/meson-ee-pwrc.c
index aa11866..7082c80 100644
--- a/drivers/power/domain/meson-ee-pwrc.c
+++ b/drivers/power/domain/meson-ee-pwrc.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <power-domain-uclass.h>
#include <regmap.h>
#include <syscon.h>
diff --git a/drivers/power/domain/meson-gx-pwrc-vpu.c b/drivers/power/domain/meson-gx-pwrc-vpu.c
index 02f7354..12cdfcd 100644
--- a/drivers/power/domain/meson-gx-pwrc-vpu.c
+++ b/drivers/power/domain/meson-gx-pwrc-vpu.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <power-domain-uclass.h>
#include <regmap.h>
#include <syscon.h>
diff --git a/drivers/power/domain/mtk-power-domain.c b/drivers/power/domain/mtk-power-domain.c
index 789fc5a..3ff7ca1 100644
--- a/drivers/power/domain/mtk-power-domain.c
+++ b/drivers/power/domain/mtk-power-domain.c
@@ -7,6 +7,7 @@
#include <clk.h>
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <power-domain-uclass.h>
#include <regmap.h>
#include <syscon.h>
diff --git a/drivers/power/domain/power-domain-uclass.c b/drivers/power/domain/power-domain-uclass.c
index be0a802..d9c623b 100644
--- a/drivers/power/domain/power-domain-uclass.c
+++ b/drivers/power/domain/power-domain-uclass.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <power-domain.h>
#include <power-domain-uclass.h>
#include <dm/device-internal.h>
diff --git a/drivers/power/domain/sandbox-power-domain-test.c b/drivers/power/domain/sandbox-power-domain-test.c
index 148b6b1..2191a94 100644
--- a/drivers/power/domain/sandbox-power-domain-test.c
+++ b/drivers/power/domain/sandbox-power-domain-test.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <power-domain.h>
#include <asm/io.h>
#include <asm/power-domain.h>
diff --git a/drivers/power/domain/sandbox-power-domain.c b/drivers/power/domain/sandbox-power-domain.c
index a5ae235..3a834a9 100644
--- a/drivers/power/domain/sandbox-power-domain.c
+++ b/drivers/power/domain/sandbox-power-domain.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <power-domain-uclass.h>
#include <asm/io.h>
#include <asm/power-domain.h>
diff --git a/drivers/power/domain/tegra186-power-domain.c b/drivers/power/domain/tegra186-power-domain.c
index d2a25ca..e872441 100644
--- a/drivers/power/domain/tegra186-power-domain.c
+++ b/drivers/power/domain/tegra186-power-domain.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <misc.h>
#include <power-domain-uclass.h>
#include <asm/arch-tegra/bpmp_abi.h>
diff --git a/drivers/power/domain/ti-sci-power-domain.c b/drivers/power/domain/ti-sci-power-domain.c
index 3866db5..a586670 100644
--- a/drivers/power/domain/ti-sci-power-domain.c
+++ b/drivers/power/domain/ti-sci-power-domain.c
@@ -11,7 +11,9 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <malloc.h>
#include <power-domain-uclass.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
#include <linux/soc/ti/ti_sci_protocol.h>
#include <dt-bindings/soc/ti,sci_pm_domain.h>
diff --git a/drivers/power/pmic/fan53555.c b/drivers/power/pmic/fan53555.c
index 11304d2..a5f855c 100644
--- a/drivers/power/pmic/fan53555.c
+++ b/drivers/power/pmic/fan53555.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <dm/device-internal.h>
+#include <dm/device_compat.h>
#include <dm/lists.h>
#include <i2c.h>
#include <power/fan53555.h>
diff --git a/drivers/power/pmic/i2c_pmic_emul.c b/drivers/power/pmic/i2c_pmic_emul.c
index b58c830..86d7b89 100644
--- a/drivers/power/pmic/i2c_pmic_emul.c
+++ b/drivers/power/pmic/i2c_pmic_emul.c
@@ -8,6 +8,7 @@
#include <errno.h>
#include <dm.h>
#include <i2c.h>
+#include <malloc.h>
#include <power/pmic.h>
#include <power/sandbox_pmic.h>
diff --git a/drivers/power/pmic/stpmic1.c b/drivers/power/pmic/stpmic1.c
index 2297af4..2c85410 100644
--- a/drivers/power/pmic/stpmic1.c
+++ b/drivers/power/pmic/stpmic1.c
@@ -11,6 +11,7 @@
#include <sysreset.h>
#include <time.h>
#include <dm/device.h>
+#include <dm/device_compat.h>
#include <dm/lists.h>
#include <power/pmic.h>
#include <power/stpmic1.h>
diff --git a/drivers/power/regulator/pwm_regulator.c b/drivers/power/regulator/pwm_regulator.c
index cd05c9b..4030144 100644
--- a/drivers/power/regulator/pwm_regulator.c
+++ b/drivers/power/regulator/pwm_regulator.c
@@ -11,6 +11,7 @@
#include <dm.h>
#include <errno.h>
#include <pwm.h>
+#include <dm/device_compat.h>
#include <power/regulator.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/power/regulator/stm32-vrefbuf.c b/drivers/power/regulator/stm32-vrefbuf.c
index 645528e..08a10f0 100644
--- a/drivers/power/regulator/stm32-vrefbuf.c
+++ b/drivers/power/regulator/stm32-vrefbuf.c
@@ -10,6 +10,7 @@
#include <clk.h>
#include <dm.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#include <linux/iopoll.h>
#include <linux/kernel.h>
#include <power/regulator.h>
diff --git a/drivers/power/regulator/tps62360_regulator.c b/drivers/power/regulator/tps62360_regulator.c
index 2c076c0..ce54495 100644
--- a/drivers/power/regulator/tps62360_regulator.c
+++ b/drivers/power/regulator/tps62360_regulator.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <i2c.h>
+#include <dm/device_compat.h>
#include <power/regulator.h>
#define TPS62360_REG_SET0 0
diff --git a/drivers/ram/k3-am654-ddrss.c b/drivers/ram/k3-am654-ddrss.c
index 7015d8c..8cf7486 100644
--- a/drivers/ram/k3-am654-ddrss.c
+++ b/drivers/ram/k3-am654-ddrss.c
@@ -14,6 +14,7 @@
#include <power-domain.h>
#include <dm.h>
#include <asm/arch/sys_proto.h>
+#include <dm/device_compat.h>
#include <power/regulator.h>
#include "k3-am654-ddrss.h"
diff --git a/drivers/ram/k3-j721e/k3-j721e-ddrss.c b/drivers/ram/k3-j721e/k3-j721e-ddrss.c
index a9b7d40..352483c 100644
--- a/drivers/ram/k3-j721e/k3-j721e-ddrss.c
+++ b/drivers/ram/k3-j721e/k3-j721e-ddrss.c
@@ -13,6 +13,7 @@
#include <asm/io.h>
#include <power-domain.h>
#include <wait_bit.h>
+#include <dm/device_compat.h>
#include "lpddr4_obj_if.h"
#include "lpddr4_if.h"
diff --git a/drivers/ram/stm32_sdram.c b/drivers/ram/stm32_sdram.c
index f6cac8e..2d03333 100644
--- a/drivers/ram/stm32_sdram.c
+++ b/drivers/ram/stm32_sdram.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <ram.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#define MEM_MODE_MASK GENMASK(2, 0)
#define SWP_FMC_OFFSET 10
diff --git a/drivers/remoteproc/k3_system_controller.c b/drivers/remoteproc/k3_system_controller.c
index 44e56c7..8843029 100644
--- a/drivers/remoteproc/k3_system_controller.c
+++ b/drivers/remoteproc/k3_system_controller.c
@@ -11,6 +11,7 @@
#include <remoteproc.h>
#include <errno.h>
#include <mailbox.h>
+#include <dm/device_compat.h>
#include <linux/soc/ti/k3-sec-proxy.h>
#define K3_MSG_R5_TO_M3_M3FW 0x8105
diff --git a/drivers/remoteproc/rproc-elf-loader.c b/drivers/remoteproc/rproc-elf-loader.c
index bf44beb..f2e033a 100644
--- a/drivers/remoteproc/rproc-elf-loader.c
+++ b/drivers/remoteproc/rproc-elf-loader.c
@@ -7,7 +7,8 @@
#include <dm.h>
#include <elf.h>
#include <remoteproc.h>
-#include <linux/err.h>
+#include <dm/device_compat.h>
+#include <linux/compat.h>
/**
* struct resource_table - firmware resource table header
diff --git a/drivers/remoteproc/stm32_copro.c b/drivers/remoteproc/stm32_copro.c
index 80e8dff..e9dce0d 100644
--- a/drivers/remoteproc/stm32_copro.c
+++ b/drivers/remoteproc/stm32_copro.c
@@ -12,6 +12,7 @@
#include <reset.h>
#include <syscon.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
#define RCC_GCR_HOLD_BOOT 0
diff --git a/drivers/remoteproc/ti_k3_arm64_rproc.c b/drivers/remoteproc/ti_k3_arm64_rproc.c
index d048cf4..28c6ddb 100644
--- a/drivers/remoteproc/ti_k3_arm64_rproc.c
+++ b/drivers/remoteproc/ti_k3_arm64_rproc.c
@@ -15,6 +15,7 @@
#include <reset.h>
#include <asm/io.h>
#include <power-domain.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
#include <linux/soc/ti/ti_sci_protocol.h>
#include "ti_sci_proc.h"
diff --git a/drivers/remoteproc/ti_k3_dsp_rproc.c b/drivers/remoteproc/ti_k3_dsp_rproc.c
index 913aca3..09e050f 100644
--- a/drivers/remoteproc/ti_k3_dsp_rproc.c
+++ b/drivers/remoteproc/ti_k3_dsp_rproc.c
@@ -9,12 +9,14 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <remoteproc.h>
#include <errno.h>
#include <clk.h>
#include <reset.h>
#include <asm/io.h>
#include <power-domain.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
#include <linux/soc/ti/ti_sci_protocol.h>
#include "ti_sci_proc.h"
diff --git a/drivers/remoteproc/ti_k3_r5f_rproc.c b/drivers/remoteproc/ti_k3_r5f_rproc.c
index cecfb0e..ea56689 100644
--- a/drivers/remoteproc/ti_k3_r5f_rproc.c
+++ b/drivers/remoteproc/ti_k3_r5f_rproc.c
@@ -8,11 +8,13 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <remoteproc.h>
#include <errno.h>
#include <clk.h>
#include <reset.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
#include <linux/kernel.h>
#include <linux/soc/ti/ti_sci_protocol.h>
diff --git a/drivers/reset/reset-bcm6345.c b/drivers/reset/reset-bcm6345.c
index bbaaea9..c1f1e7f 100644
--- a/drivers/reset/reset-bcm6345.c
+++ b/drivers/reset/reset-bcm6345.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <malloc.h>
#include <reset-uclass.h>
#include <asm/io.h>
diff --git a/drivers/reset/reset-hisilicon.c b/drivers/reset/reset-hisilicon.c
index d449e3d..a678b8f 100644
--- a/drivers/reset/reset-hisilicon.c
+++ b/drivers/reset/reset-hisilicon.c
@@ -3,6 +3,7 @@
* Copyright (c) 2019, Linaro Limited
*/
+#include <malloc.h>
#include <asm/io.h>
#include <common.h>
#include <dm.h>
diff --git a/drivers/reset/reset-imx7.c b/drivers/reset/reset-imx7.c
index a2bad65..a61855e 100644
--- a/drivers/reset/reset-imx7.c
+++ b/drivers/reset/reset-imx7.c
@@ -3,6 +3,7 @@
* Copyright (c) 2017, Impinj, Inc.
*/
+#include <malloc.h>
#include <asm/io.h>
#include <common.h>
#include <dm.h>
diff --git a/drivers/reset/reset-mediatek.c b/drivers/reset/reset-mediatek.c
index 4684cbf..6d17f52 100644
--- a/drivers/reset/reset-mediatek.c
+++ b/drivers/reset/reset-mediatek.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <dm/lists.h>
#include <regmap.h>
#include <reset-uclass.h>
diff --git a/drivers/reset/reset-meson.c b/drivers/reset/reset-meson.c
index 9026e03..70f9635 100644
--- a/drivers/reset/reset-meson.c
+++ b/drivers/reset/reset-meson.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <reset-uclass.h>
#include <regmap.h>
diff --git a/drivers/reset/reset-mtmips.c b/drivers/reset/reset-mtmips.c
index 71254a9..677de0a 100644
--- a/drivers/reset/reset-mtmips.c
+++ b/drivers/reset/reset-mtmips.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <malloc.h>
#include <reset-uclass.h>
#include <linux/io.h>
diff --git a/drivers/reset/reset-rockchip.c b/drivers/reset/reset-rockchip.c
index 4fb9571..100afc8 100644
--- a/drivers/reset/reset-rockchip.c
+++ b/drivers/reset/reset-rockchip.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <reset-uclass.h>
#include <linux/io.h>
#include <asm/arch-rockchip/hardware.h>
diff --git a/drivers/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c
index 98524eb..3ad5e35 100644
--- a/drivers/reset/reset-socfpga.c
+++ b/drivers/reset/reset-socfpga.c
@@ -14,6 +14,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <dm/lists.h>
#include <dm/of_access.h>
#include <env.h>
diff --git a/drivers/reset/reset-sunxi.c b/drivers/reset/reset-sunxi.c
index 1c717b2..f21bf3b 100644
--- a/drivers/reset/reset-sunxi.c
+++ b/drivers/reset/reset-sunxi.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <malloc.h>
#include <reset-uclass.h>
#include <asm/io.h>
#include <dm/lists.h>
diff --git a/drivers/reset/reset-ti-sci.c b/drivers/reset/reset-ti-sci.c
index 99e3d9a..f5d82b5 100644
--- a/drivers/reset/reset-ti-sci.c
+++ b/drivers/reset/reset-ti-sci.c
@@ -11,7 +11,9 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <malloc.h>
#include <reset-uclass.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
#include <linux/soc/ti/ti_sci_protocol.h>
diff --git a/drivers/reset/reset-uclass.c b/drivers/reset/reset-uclass.c
index 8e6c0a4..8ec8e46 100644
--- a/drivers/reset/reset-uclass.c
+++ b/drivers/reset/reset-uclass.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <fdtdec.h>
+#include <malloc.h>
#include <reset.h>
#include <reset-uclass.h>
#include <dm/devres.h>
diff --git a/drivers/reset/reset-uniphier.c b/drivers/reset/reset-uniphier.c
index 97f7b0e..348f388 100644
--- a/drivers/reset/reset-uniphier.c
+++ b/drivers/reset/reset-uniphier.c
@@ -6,7 +6,9 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <reset-uclass.h>
+#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/io.h>
#include <linux/sizes.h>
diff --git a/drivers/reset/sandbox-reset-test.c b/drivers/reset/sandbox-reset-test.c
index 95ce2ca..ae79be0 100644
--- a/drivers/reset/sandbox-reset-test.c
+++ b/drivers/reset/sandbox-reset-test.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <reset.h>
#include <asm/io.h>
#include <asm/reset.h>
diff --git a/drivers/reset/sandbox-reset.c b/drivers/reset/sandbox-reset.c
index c03fce3..bdf53a3 100644
--- a/drivers/reset/sandbox-reset.c
+++ b/drivers/reset/sandbox-reset.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <reset-uclass.h>
#include <asm/io.h>
#include <asm/reset.h>
diff --git a/drivers/reset/sti-reset.c b/drivers/reset/sti-reset.c
index 614da9d..31b3e48 100644
--- a/drivers/reset/sti-reset.c
+++ b/drivers/reset/sti-reset.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <errno.h>
+#include <malloc.h>
#include <wait_bit.h>
#include <dm.h>
#include <reset-uclass.h>
diff --git a/drivers/reset/stm32-reset.c b/drivers/reset/stm32-reset.c
index 4d7745a..5dda522 100644
--- a/drivers/reset/stm32-reset.c
+++ b/drivers/reset/stm32-reset.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <malloc.h>
#include <reset-uclass.h>
#include <stm32_rcc.h>
#include <asm/io.h>
diff --git a/drivers/reset/tegra-car-reset.c b/drivers/reset/tegra-car-reset.c
index 886ea04..23c6fac 100644
--- a/drivers/reset/tegra-car-reset.c
+++ b/drivers/reset/tegra-car-reset.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <reset-uclass.h>
#include <asm/arch/clock.h>
#include <asm/arch-tegra/clk_rst.h>
diff --git a/drivers/reset/tegra186-reset.c b/drivers/reset/tegra186-reset.c
index 84ed77b..e85f42b 100644
--- a/drivers/reset/tegra186-reset.c
+++ b/drivers/reset/tegra186-reset.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <misc.h>
#include <reset-uclass.h>
#include <asm/arch-tegra/bpmp_abi.h>
diff --git a/drivers/rtc/ds3232.c b/drivers/rtc/ds3232.c
index 09a106a..e3b3579 100644
--- a/drivers/rtc/ds3232.c
+++ b/drivers/rtc/ds3232.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <i2c.h>
#include <rtc.h>
+#include <dm/device_compat.h>
/*
* RTC register addresses
diff --git a/drivers/rtc/rv3029.c b/drivers/rtc/rv3029.c
index 2367062..87c4320 100644
--- a/drivers/rtc/rv3029.c
+++ b/drivers/rtc/rv3029.c
@@ -13,6 +13,7 @@
#include <eeprom.h>
#include <i2c.h>
#include <rtc.h>
+#include <dm/device_compat.h>
#define RTC_RV3029_PAGE_LEN 7
diff --git a/drivers/rtc/stm32_rtc.c b/drivers/rtc/stm32_rtc.c
index 2674714..3e12f57 100644
--- a/drivers/rtc/stm32_rtc.c
+++ b/drivers/rtc/stm32_rtc.c
@@ -5,8 +5,10 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <malloc.h>
#include <rtc.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#include <linux/iopoll.h>
#define STM32_RTC_TR 0x00
diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c
index c450a4e..98d2090 100644
--- a/drivers/serial/atmel_usart.c
+++ b/drivers/serial/atmel_usart.c
@@ -9,6 +9,7 @@
#include <clk.h>
#include <dm.h>
#include <errno.h>
+#include <malloc.h>
#include <watchdog.h>
#include <serial.h>
#include <debug_uart.h>
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index 0f5f1fa..30f9b8c 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <env_internal.h>
#include <errno.h>
+#include <malloc.h>
#include <os.h>
#include <serial.h>
#include <stdio_dev.h>
diff --git a/drivers/serial/serial_bcm6345.c b/drivers/serial/serial_bcm6345.c
index 9ad8c77..5b963ce 100644
--- a/drivers/serial/serial_bcm6345.c
+++ b/drivers/serial/serial_bcm6345.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <debug_uart.h>
#include <errno.h>
+#include <malloc.h>
#include <serial.h>
#include <asm/io.h>
#include <asm/types.h>
diff --git a/drivers/serial/serial_lpuart.c b/drivers/serial/serial_lpuart.c
index ccb3ce6..d7907a2 100644
--- a/drivers/serial/serial_lpuart.c
+++ b/drivers/serial/serial_lpuart.c
@@ -11,6 +11,7 @@
#include <watchdog.h>
#include <asm/io.h>
#include <serial.h>
+#include <dm/device_compat.h>
#include <linux/compiler.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
diff --git a/drivers/serial/serial_msm.c b/drivers/serial/serial_msm.c
index c462394..0cc1aad 100644
--- a/drivers/serial/serial_msm.c
+++ b/drivers/serial/serial_msm.c
@@ -12,6 +12,7 @@
#include <clk.h>
#include <dm.h>
#include <errno.h>
+#include <malloc.h>
#include <serial.h>
#include <watchdog.h>
#include <asm/io.h>
diff --git a/drivers/serial/serial_pic32.c b/drivers/serial/serial_pic32.c
index 84600b1..bac506e 100644
--- a/drivers/serial/serial_pic32.c
+++ b/drivers/serial/serial_pic32.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <malloc.h>
#include <serial.h>
#include <wait_bit.h>
#include <mach/pic32.h>
diff --git a/drivers/serial/serial_stm32.c b/drivers/serial/serial_stm32.c
index 00a8e72..0160828 100644
--- a/drivers/serial/serial_stm32.c
+++ b/drivers/serial/serial_stm32.c
@@ -13,6 +13,7 @@
#include <asm/io.h>
#include <asm/arch/stm32.h>
#include "serial_stm32.h"
+#include <dm/device_compat.h>
static void _stm32_serial_setbrg(fdt_addr_t base,
struct stm32_uart_info *uart_info,
diff --git a/drivers/serial/serial_zynq.c b/drivers/serial/serial_zynq.c
index c073759..e4e4c39 100644
--- a/drivers/serial/serial_zynq.c
+++ b/drivers/serial/serial_zynq.c
@@ -12,6 +12,7 @@
#include <fdtdec.h>
#include <watchdog.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#include <linux/compiler.h>
#include <serial.h>
#include <linux/err.h>
diff --git a/drivers/smem/msm_smem.c b/drivers/smem/msm_smem.c
index 711ce62..5557fd2 100644
--- a/drivers/smem/msm_smem.c
+++ b/drivers/smem/msm_smem.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <errno.h>
#include <dm.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <dm/of_access.h>
#include <dm/of_addr.h>
diff --git a/drivers/soc/ti/k3-navss-ringacc.c b/drivers/soc/ti/k3-navss-ringacc.c
index 97c046b..8cbfe2b 100644
--- a/drivers/soc/ti/k3-navss-ringacc.c
+++ b/drivers/soc/ti/k3-navss-ringacc.c
@@ -12,6 +12,7 @@
#include <asm/dma-mapping.h>
#include <asm/bitops.h>
#include <dm.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <dm/read.h>
#include <dm/uclass.h>
diff --git a/drivers/sound/sound-uclass.c b/drivers/sound/sound-uclass.c
index bada0c2..d9b3a38 100644
--- a/drivers/sound/sound-uclass.c
+++ b/drivers/sound/sound-uclass.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <i2s.h>
+#include <malloc.h>
#include <sound.h>
#define SOUND_BITS_IN_BYTE 8
diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c
index 195ea5f..a09bf88 100644
--- a/drivers/spi/atmel-quadspi.c
+++ b/drivers/spi/atmel-quadspi.c
@@ -9,12 +9,14 @@
* Author: Piotr Bugalski <bugalski.piotr@gmail.com>
*/
+#include <malloc.h>
#include <asm/io.h>
#include <clk.h>
#include <common.h>
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/iopoll.h>
diff --git a/drivers/spi/bcm63xx_hsspi.c b/drivers/spi/bcm63xx_hsspi.c
index 529adfb..f88702d 100644
--- a/drivers/spi/bcm63xx_hsspi.c
+++ b/drivers/spi/bcm63xx_hsspi.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <malloc.h>
#include <spi.h>
#include <reset.h>
#include <wait_bit.h>
diff --git a/drivers/spi/bcm63xx_spi.c b/drivers/spi/bcm63xx_spi.c
index 69f88c9..719f53d 100644
--- a/drivers/spi/bcm63xx_spi.c
+++ b/drivers/spi/bcm63xx_spi.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <malloc.h>
#include <spi.h>
#include <reset.h>
#include <wait_bit.h>
diff --git a/drivers/spi/cadence_qspi.c b/drivers/spi/cadence_qspi.c
index 0b503dd..83b114f 100644
--- a/drivers/spi/cadence_qspi.c
+++ b/drivers/spi/cadence_qspi.c
@@ -13,6 +13,7 @@
#include <reset.h>
#include <spi.h>
#include <spi-mem.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/sizes.h>
diff --git a/drivers/spi/designware_spi.c b/drivers/spi/designware_spi.c
index 66ff8ee..2dc1673 100644
--- a/drivers/spi/designware_spi.c
+++ b/drivers/spi/designware_spi.c
@@ -18,6 +18,7 @@
#include <spi.h>
#include <fdtdec.h>
#include <reset.h>
+#include <dm/device_compat.h>
#include <linux/compat.h>
#include <linux/iopoll.h>
#include <asm/io.h>
diff --git a/drivers/spi/mvebu_a3700_spi.c b/drivers/spi/mvebu_a3700_spi.c
index 99ad505..1469771 100644
--- a/drivers/spi/mvebu_a3700_spi.c
+++ b/drivers/spi/mvebu_a3700_spi.c
@@ -12,6 +12,7 @@
#include <clk.h>
#include <wait_bit.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c
index d94aaf9..4d1317c 100644
--- a/drivers/spi/mxc_spi.c
+++ b/drivers/spi/mxc_spi.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <malloc.h>
#include <spi.h>
+#include <dm/device_compat.h>
#include <linux/errno.h>
#include <asm/io.h>
#include <asm/gpio.h>
diff --git a/drivers/spi/spi-mem-nodm.c b/drivers/spi/spi-mem-nodm.c
index 4447d44..83dde48 100644
--- a/drivers/spi/spi-mem-nodm.c
+++ b/drivers/spi/spi-mem-nodm.c
@@ -3,6 +3,7 @@
* Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
*/
+#include <malloc.h>
#include <spi.h>
#include <spi-mem.h>
diff --git a/drivers/spi/spi-mem.c b/drivers/spi/spi-mem.c
index b8cf8dd..e900c99 100644
--- a/drivers/spi/spi-mem.c
+++ b/drivers/spi/spi-mem.c
@@ -12,6 +12,7 @@
#include <linux/pm_runtime.h>
#include "internals.h"
#else
+#include <dm/device_compat.h>
#include <spi.h>
#include <spi-mem.h>
#endif
diff --git a/drivers/spi/spi-sunxi.c b/drivers/spi/spi-sunxi.c
index dbfeac7..c59fee1 100644
--- a/drivers/spi/spi-sunxi.c
+++ b/drivers/spi/spi-sunxi.c
@@ -26,6 +26,7 @@
#include <fdt_support.h>
#include <reset.h>
#include <wait_bit.h>
+#include <dm/device_compat.h>
#include <asm/bitops.h>
#include <asm/gpio.h>
diff --git a/drivers/spi/stm32_qspi.c b/drivers/spi/stm32_qspi.c
index 958c394..6857a87 100644
--- a/drivers/spi/stm32_qspi.c
+++ b/drivers/spi/stm32_qspi.c
@@ -11,6 +11,7 @@
#include <clk.h>
#include <reset.h>
#include <spi-mem.h>
+#include <dm/device_compat.h>
#include <linux/iopoll.h>
#include <linux/ioport.h>
#include <linux/sizes.h>
diff --git a/drivers/spi/stm32_spi.c b/drivers/spi/stm32_spi.c
index 75b6006..ebf2b98 100644
--- a/drivers/spi/stm32_spi.c
+++ b/drivers/spi/stm32_spi.c
@@ -8,8 +8,10 @@
#include <clk.h>
#include <dm.h>
#include <errno.h>
+#include <malloc.h>
#include <reset.h>
#include <spi.h>
+#include <dm/device_compat.h>
#include <asm/io.h>
#include <asm/gpio.h>
diff --git a/drivers/spi/uniphier_spi.c b/drivers/spi/uniphier_spi.c
index e47b969..153fbb2 100644
--- a/drivers/spi/uniphier_spi.c
+++ b/drivers/spi/uniphier_spi.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
#include <time.h>
+#include <dm/device_compat.h>
#include <linux/bitfield.h>
#include <linux/io.h>
#include <spi.h>
diff --git a/drivers/spi/zynqmp_gqspi.c b/drivers/spi/zynqmp_gqspi.c
index c05d46e..02b78df 100644
--- a/drivers/spi/zynqmp_gqspi.c
+++ b/drivers/spi/zynqmp_gqspi.c
@@ -16,6 +16,7 @@
#include <spi.h>
#include <ubi_uboot.h>
#include <wait_bit.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
#define GQSPI_GFIFO_STRT_MODE_MASK BIT(29)
diff --git a/drivers/spmi/spmi-msm.c b/drivers/spmi/spmi-msm.c
index 6f11146..ed93faf 100644
--- a/drivers/spmi/spmi-msm.c
+++ b/drivers/spmi/spmi-msm.c
@@ -12,6 +12,7 @@
#include <errno.h>
#include <fdtdec.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#include <spmi/spmi.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/sysreset/sysreset-ti-sci.c b/drivers/sysreset/sysreset-ti-sci.c
index 6caea3a..e7fcfcd 100644
--- a/drivers/sysreset/sysreset-ti-sci.c
+++ b/drivers/sysreset/sysreset-ti-sci.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <errno.h>
#include <sysreset.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
#include <linux/soc/ti/ti_sci_protocol.h>
diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
index a7b175e..9fb5e65 100644
--- a/drivers/tee/optee/core.c
+++ b/drivers/tee/optee/core.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <log.h>
+#include <malloc.h>
#include <tee.h>
#include <linux/arm-smccc.h>
#include <linux/err.h>
diff --git a/drivers/tee/optee/rpmb.c b/drivers/tee/optee/rpmb.c
index cf1ce77..0804fc9 100644
--- a/drivers/tee/optee/rpmb.c
+++ b/drivers/tee/optee/rpmb.c
@@ -8,6 +8,7 @@
#include <log.h>
#include <tee.h>
#include <mmc.h>
+#include <dm/device_compat.h>
#include "optee_msg.h"
#include "optee_private.h"
diff --git a/drivers/tee/optee/supplicant.c b/drivers/tee/optee/supplicant.c
index c5726ec..ae042b9 100644
--- a/drivers/tee/optee/supplicant.c
+++ b/drivers/tee/optee/supplicant.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <log.h>
+#include <malloc.h>
#include <tee.h>
#include <linux/types.h>
diff --git a/drivers/tee/tee-uclass.c b/drivers/tee/tee-uclass.c
index abb88c0..1fb3c16 100644
--- a/drivers/tee/tee-uclass.c
+++ b/drivers/tee/tee-uclass.c
@@ -5,9 +5,10 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
+#include <tee.h>
#include <dm/device-internal.h>
#include <dm/uclass-internal.h>
-#include <tee.h>
/**
* struct tee_uclass_priv - information of a TEE, stored by the uclass
diff --git a/drivers/timer/dw-apb-timer.c b/drivers/timer/dw-apb-timer.c
index fad22be..35271b2 100644
--- a/drivers/timer/dw-apb-timer.c
+++ b/drivers/timer/dw-apb-timer.c
@@ -8,8 +8,10 @@
#include <common.h>
#include <dm.h>
#include <clk.h>
+#include <malloc.h>
#include <reset.h>
#include <timer.h>
+#include <dm/device_compat.h>
#include <asm/io.h>
#include <asm/arch/timer.h>
diff --git a/drivers/timer/ostm_timer.c b/drivers/timer/ostm_timer.c
index f0e2509..48a5055 100644
--- a/drivers/timer/ostm_timer.c
+++ b/drivers/timer/ostm_timer.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <malloc.h>
#include <asm/io.h>
#include <dm.h>
#include <clk.h>
diff --git a/drivers/timer/stm32_timer.c b/drivers/timer/stm32_timer.c
index 7631510..76d99a2 100644
--- a/drivers/timer/stm32_timer.c
+++ b/drivers/timer/stm32_timer.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <fdtdec.h>
#include <timer.h>
+#include <dm/device_compat.h>
#include <asm/io.h>
diff --git a/drivers/ufs/cdns-platform.c b/drivers/ufs/cdns-platform.c
index 5bd0c1e..41ee6a6 100644
--- a/drivers/ufs/cdns-platform.c
+++ b/drivers/ufs/cdns-platform.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <dm.h>
#include <ufs.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
#include "ufs.h"
diff --git a/drivers/ufs/ti-j721e-ufs.c b/drivers/ufs/ti-j721e-ufs.c
index 6e4d0cd..4990fba 100644
--- a/drivers/ufs/ti-j721e-ufs.c
+++ b/drivers/ufs/ti-j721e-ufs.c
@@ -7,6 +7,7 @@
#include <clk.h>
#include <common.h>
#include <dm.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
#define UFS_SS_CTRL 0x4
diff --git a/drivers/ufs/ufs.c b/drivers/ufs/ufs.c
index 512c63a..c9346c2 100644
--- a/drivers/ufs/ufs.c
+++ b/drivers/ufs/ufs.c
@@ -11,6 +11,7 @@
#include <charset.h>
#include <common.h>
#include <dm.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <dm/lists.h>
#include <dm/device-internal.h>
diff --git a/drivers/usb/cdns3/cdns3-ti.c b/drivers/usb/cdns3/cdns3-ti.c
index 2fa0104..652cd5c 100644
--- a/drivers/usb/cdns3/cdns3-ti.c
+++ b/drivers/usb/cdns3/cdns3-ti.c
@@ -9,6 +9,7 @@
#include <asm-generic/io.h>
#include <clk.h>
#include <dm.h>
+#include <dm/device_compat.h>
#include <linux/io.h>
#include <linux/usb/otg.h>
#include <malloc.h>
diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c
index 6f5e5af..f947e69 100644
--- a/drivers/usb/cdns3/core.c
+++ b/drivers/usb/cdns3/core.c
@@ -14,6 +14,7 @@
#include <common.h>
#include <dm.h>
#include <dm/device-internal.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <dm/lists.h>
#include <linux/kernel.h>
diff --git a/drivers/usb/cdns3/drd.c b/drivers/usb/cdns3/drd.c
index 13eb489..47874fe 100644
--- a/drivers/usb/cdns3/drd.c
+++ b/drivers/usb/cdns3/drd.c
@@ -11,6 +11,7 @@
*
*/
#include <dm.h>
+#include <dm/device_compat.h>
#include <linux/delay.h>
#include <linux/iopoll.h>
#include <linux/kernel.h>
diff --git a/drivers/usb/cdns3/ep0.c b/drivers/usb/cdns3/ep0.c
index f35a924..1957a3b 100644
--- a/drivers/usb/cdns3/ep0.c
+++ b/drivers/usb/cdns3/ep0.c
@@ -11,6 +11,7 @@
*/
#include <cpu_func.h>
+#include <dm/device_compat.h>
#include <linux/usb/composite.h>
#include <linux/iopoll.h>
diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c
index e095760..22e90a5 100644
--- a/drivers/usb/cdns3/gadget.c
+++ b/drivers/usb/cdns3/gadget.c
@@ -57,6 +57,7 @@
*/
#include <dm.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/err.h>
#include <linux/usb/gadget.h>
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index cbf21d3..c506652 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -18,6 +18,7 @@
#include <malloc.h>
#include <dwc3-uboot.h>
#include <asm/dma-mapping.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/err.h>
#include <linux/ioport.h>
diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
index 7ffec12..9596bf1 100644
--- a/drivers/usb/dwc3/dwc3-omap.c
+++ b/drivers/usb/dwc3/dwc3-omap.c
@@ -18,6 +18,7 @@
#include <asm/io.h>
#include <dm.h>
#include <dwc3-omap-uboot.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/usb/dwc3-omap.h>
#include <linux/ioport.h>
diff --git a/drivers/usb/dwc3/dwc3-uniphier.c b/drivers/usb/dwc3/dwc3-uniphier.c
index 6e9c521..88317b1 100644
--- a/drivers/usb/dwc3/dwc3-uniphier.c
+++ b/drivers/usb/dwc3/dwc3-uniphier.c
@@ -7,6 +7,7 @@
*/
#include <dm.h>
+#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/errno.h>
#include <linux/io.h>
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
index 0c8c11d..4af5894 100644
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -14,6 +14,7 @@
*/
#include <common.h>
#include <cpu_func.h>
+#include <dm/device_compat.h>
#include <linux/kernel.h>
#include <linux/list.h>
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 677607a..1502d67 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -17,6 +17,7 @@
#include <cpu_func.h>
#include <malloc.h>
#include <asm/dma-mapping.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/bug.h>
#include <linux/list.h>
diff --git a/drivers/usb/dwc3/ti_usb_phy.c b/drivers/usb/dwc3/ti_usb_phy.c
index a908682..6b0166a 100644
--- a/drivers/usb/dwc3/ti_usb_phy.c
+++ b/drivers/usb/dwc3/ti_usb_phy.c
@@ -19,6 +19,7 @@
#include <common.h>
#include <malloc.h>
#include <ti-usb-phy-uboot.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/ioport.h>
#include <asm/io.h>
diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c
index b834a1c..496abf3 100644
--- a/drivers/usb/gadget/dwc2_udc_otg.c
+++ b/drivers/usb/gadget/dwc2_udc_otg.c
@@ -23,6 +23,7 @@
#include <generic-phy.h>
#include <malloc.h>
#include <reset.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/errno.h>
diff --git a/drivers/usb/gadget/storage_common.c b/drivers/usb/gadget/storage_common.c
index 4bbd030..f40779b 100644
--- a/drivers/usb/gadget/storage_common.c
+++ b/drivers/usb/gadget/storage_common.c
@@ -269,6 +269,7 @@ struct device_attribute { int i; };
#define ETOOSMALL 525
#include <usb_mass_storage.h>
+#include <dm/device_compat.h>
/*-------------------------------------------------------------------------*/
diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc-core.c
index 52384b9..a33ab5c 100644
--- a/drivers/usb/gadget/udc/udc-core.c
+++ b/drivers/usb/gadget/udc/udc-core.c
@@ -13,6 +13,7 @@
* usb_
*/
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/compat.h>
#include <malloc.h>
diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
index b9c56f7..e4efaf1 100644
--- a/drivers/usb/host/dwc2.c
+++ b/drivers/usb/host/dwc2.c
@@ -15,6 +15,7 @@
#include <usbroothubdes.h>
#include <wait_bit.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#include <power/regulator.h>
#include <reset.h>
diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c
index 6900848..67eec0e 100644
--- a/drivers/usb/host/ehci-atmel.c
+++ b/drivers/usb/host/ehci-atmel.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <malloc.h>
#include <usb.h>
#include <asm/io.h>
#include <asm/arch/clk.h>
diff --git a/drivers/usb/host/ehci-generic.c b/drivers/usb/host/ehci-generic.c
index 80ac876..0643681 100644
--- a/drivers/usb/host/ehci-generic.c
+++ b/drivers/usb/host/ehci-generic.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <clk.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <dm/ofnode.h>
#include <generic-phy.h>
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index ef20c3c..1cc0205 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -17,6 +17,7 @@
#include <malloc.h>
#include <memalign.h>
#include <watchdog.h>
+#include <dm/device_compat.h>
#include <linux/compiler.h>
#include "ehci.h"
diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c
index 29a7020..6920182 100644
--- a/drivers/usb/host/ohci-da8xx.c
+++ b/drivers/usb/host/ohci-da8xx.c
@@ -4,9 +4,11 @@
*/
#include <common.h>
+#include <malloc.h>
#include <asm/io.h>
#include <clk.h>
#include <dm.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <dm/ofnode.h>
#include <generic-phy.h>
diff --git a/drivers/usb/host/ohci-generic.c b/drivers/usb/host/ohci-generic.c
index 7b6ec51..04d5fdb 100644
--- a/drivers/usb/host/ohci-generic.c
+++ b/drivers/usb/host/ohci-generic.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <dm/ofnode.h>
#include <generic-phy.h>
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index a37696d..8fc9d21 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <usb.h>
#include <asm/io.h>
+#include <dm/device_compat.h>
#include <linux/iopoll.h>
#include <power/regulator.h>
diff --git a/drivers/usb/host/xhci-rcar.c b/drivers/usb/host/xhci-rcar.c
index c4d8811..d86584b 100644
--- a/drivers/usb/host/xhci-rcar.c
+++ b/drivers/usb/host/xhci-rcar.c
@@ -9,8 +9,10 @@
#include <clk.h>
#include <dm.h>
#include <fdtdec.h>
+#include <malloc.h>
#include <usb.h>
#include <wait_bit.h>
+#include <dm/device_compat.h>
#include <usb/xhci.h>
#include "xhci-rcar-r8a779x_usb3_v3.h"
diff --git a/drivers/usb/musb-new/am35x.c b/drivers/usb/musb-new/am35x.c
index 58cde22..6e5be90 100644
--- a/drivers/usb/musb-new/am35x.c
+++ b/drivers/usb/musb-new/am35x.c
@@ -12,6 +12,7 @@
*/
#ifndef __UBOOT__
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/init.h>
#include <linux/module.h>
diff --git a/drivers/usb/musb-new/da8xx.c b/drivers/usb/musb-new/da8xx.c
index 899b30d..2ddcf33 100644
--- a/drivers/usb/musb-new/da8xx.c
+++ b/drivers/usb/musb-new/da8xx.c
@@ -16,6 +16,7 @@
#include <common.h>
#include <dm.h>
#include <dm/device-internal.h>
+#include <dm/device_compat.h>
#include <dm/lists.h>
#include <asm/arch/hardware.h>
#include <asm/arch/da8xx-usb.h>
diff --git a/drivers/usb/musb-new/musb_core.c b/drivers/usb/musb-new/musb_core.c
index cc6e0a7..f678aa4 100644
--- a/drivers/usb/musb-new/musb_core.c
+++ b/drivers/usb/musb-new/musb_core.c
@@ -65,6 +65,7 @@
*/
#ifndef __UBOOT__
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/module.h>
#include <linux/kernel.h>
diff --git a/drivers/usb/musb-new/musb_dsps.c b/drivers/usb/musb-new/musb_dsps.c
index d342eeb..eb59088 100644
--- a/drivers/usb/musb-new/musb_dsps.c
+++ b/drivers/usb/musb-new/musb_dsps.c
@@ -15,6 +15,7 @@
*/
#ifndef __UBOOT__
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/init.h>
#include <linux/io.h>
diff --git a/drivers/usb/musb-new/musb_gadget.c b/drivers/usb/musb-new/musb_gadget.c
index 74b6457..35d2123 100644
--- a/drivers/usb/musb-new/musb_gadget.c
+++ b/drivers/usb/musb-new/musb_gadget.c
@@ -9,6 +9,7 @@
*/
#ifndef __UBOOT__
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/kernel.h>
#include <linux/list.h>
diff --git a/drivers/usb/musb-new/musb_gadget_ep0.c b/drivers/usb/musb-new/musb_gadget_ep0.c
index 3ef8fe1..79e8222 100644
--- a/drivers/usb/musb-new/musb_gadget_ep0.c
+++ b/drivers/usb/musb-new/musb_gadget_ep0.c
@@ -9,6 +9,7 @@
*/
#ifndef __UBOOT__
+#include <dm/device_compat.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/timer.h>
diff --git a/drivers/usb/musb-new/musb_host.c b/drivers/usb/musb-new/musb_host.c
index 55ad8ea..b98f0ed 100644
--- a/drivers/usb/musb-new/musb_host.c
+++ b/drivers/usb/musb-new/musb_host.c
@@ -9,6 +9,7 @@
*/
#ifndef __UBOOT__
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/module.h>
#include <linux/kernel.h>
diff --git a/drivers/usb/musb-new/musb_uboot.c b/drivers/usb/musb-new/musb_uboot.c
index f4d0e1f..72f14b9 100644
--- a/drivers/usb/musb-new/musb_uboot.c
+++ b/drivers/usb/musb-new/musb_uboot.c
@@ -1,5 +1,6 @@
#include <common.h>
#include <console.h>
+#include <malloc.h>
#include <watchdog.h>
#include <linux/err.h>
#include <linux/errno.h>
diff --git a/drivers/usb/musb-new/omap2430.c b/drivers/usb/musb-new/omap2430.c
index 8a45b05..0d34dcf 100644
--- a/drivers/usb/musb-new/omap2430.c
+++ b/drivers/usb/musb-new/omap2430.c
@@ -12,6 +12,7 @@
#include <dm.h>
#include <serial.h>
#include <dm/device-internal.h>
+#include <dm/device_compat.h>
#include <dm/lists.h>
#include <linux/err.h>
#include <linux/usb/otg.h>
diff --git a/drivers/usb/musb-new/pic32.c b/drivers/usb/musb-new/pic32.c
index 3a19900..c7867fe 100644
--- a/drivers/usb/musb-new/pic32.c
+++ b/drivers/usb/musb-new/pic32.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <dm/device_compat.h>
#include <linux/usb/musb.h>
#include "linux-compat.h"
#include "musb_core.h"
diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
index 45eecfe..98bf736 100644
--- a/drivers/usb/musb-new/sunxi.c
+++ b/drivers/usb/musb-new/sunxi.c
@@ -19,12 +19,14 @@
#include <clk.h>
#include <dm.h>
#include <generic-phy.h>
+#include <malloc.h>
#include <phy-sun4i-usb.h>
#include <reset.h>
#include <asm/arch/cpu.h>
#include <asm/arch/clock.h>
#include <asm/arch/gpio.h>
#include <asm-generic/gpio.h>
+#include <dm/device_compat.h>
#include <dm/lists.h>
#include <dm/root.h>
#include <linux/usb/musb.h>
diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c
index 20ca273..00759f3 100644
--- a/drivers/usb/musb-new/ti-musb.c
+++ b/drivers/usb/musb-new/ti-musb.c
@@ -9,6 +9,7 @@
#include <command.h>
#include <console.h>
#include <dm.h>
+#include <malloc.h>
#include <linux/usb/otg.h>
#include <dm/device-internal.h>
#include <dm/lists.h>
diff --git a/drivers/usb/phy/omap_usb_phy.c b/drivers/usb/phy/omap_usb_phy.c
index 897e6f1..9209942 100644
--- a/drivers/usb/phy/omap_usb_phy.c
+++ b/drivers/usb/phy/omap_usb_phy.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <usb.h>
+#include <dm/device_compat.h>
#include <linux/errno.h>
#include <asm/omap_common.h>
#include <asm/arch/cpu.h>
diff --git a/drivers/video/atmel_hlcdfb.c b/drivers/video/atmel_hlcdfb.c
index 734bc12..62accce 100644
--- a/drivers/video/atmel_hlcdfb.c
+++ b/drivers/video/atmel_hlcdfb.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <malloc.h>
#include <asm/io.h>
#include <asm/arch/gpio.h>
#include <asm/arch/clk.h>
diff --git a/drivers/video/console_truetype.c b/drivers/video/console_truetype.c
index 0a725c5..6d7661d 100644
--- a/drivers/video/console_truetype.c
+++ b/drivers/video/console_truetype.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <video.h>
#include <video_console.h>
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index 285633b..5fb6886 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -13,6 +13,7 @@
*/
#include <common.h>
+#include <malloc.h>
#include <memalign.h>
#include <video_fb.h>
#include <linux/list.h>
diff --git a/drivers/video/dw_mipi_dsi.c b/drivers/video/dw_mipi_dsi.c
index 83d7c7b..5dd75e7 100644
--- a/drivers/video/dw_mipi_dsi.c
+++ b/drivers/video/dw_mipi_dsi.c
@@ -19,6 +19,7 @@
#include <asm/io.h>
#include <asm/arch/gpio.h>
#include <dm/device-internal.h>
+#include <dm/device_compat.h>
#include <linux/iopoll.h>
#include <video_bridge.h>
diff --git a/drivers/video/hitachi_tx18d42vm_lcd.c b/drivers/video/hitachi_tx18d42vm_lcd.c
index 1629f55..a57abd2 100644
--- a/drivers/video/hitachi_tx18d42vm_lcd.c
+++ b/drivers/video/hitachi_tx18d42vm_lcd.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <malloc.h>
#include <asm/gpio.h>
#include <errno.h>
diff --git a/drivers/video/mali_dp.c b/drivers/video/mali_dp.c
index 71151a8..87a75a9 100644
--- a/drivers/video/mali_dp.c
+++ b/drivers/video/mali_dp.c
@@ -6,6 +6,7 @@
*/
#define DEBUG
#include <common.h>
+#include <malloc.h>
#include <video.h>
#include <dm.h>
#ifdef CONFIG_DISPLAY
@@ -16,6 +17,7 @@
#include <os.h>
#include <fdt_support.h>
#include <clk.h>
+#include <dm/device_compat.h>
#include <linux/sizes.h>
#define MALIDP_CORE_ID 0x0018
diff --git a/drivers/video/mvebu_lcd.c b/drivers/video/mvebu_lcd.c
index dc62545..3ff5b28 100644
--- a/drivers/video/mvebu_lcd.c
+++ b/drivers/video/mvebu_lcd.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
#include <video.h>
+#include <dm/device_compat.h>
#include <linux/mbus.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index c529810..6f80fba 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <env.h>
+#include <dm/device_compat.h>
#include <linux/errno.h>
#include <malloc.h>
#include <video.h>
diff --git a/drivers/video/orisetech_otm8009a.c b/drivers/video/orisetech_otm8009a.c
index 89d9cfd..650ed07 100644
--- a/drivers/video/orisetech_otm8009a.c
+++ b/drivers/video/orisetech_otm8009a.c
@@ -13,6 +13,7 @@
#include <mipi_dsi.h>
#include <panel.h>
#include <asm/gpio.h>
+#include <dm/device_compat.h>
#include <power/regulator.h>
#define OTM8009A_BACKLIGHT_DEFAULT 240
diff --git a/drivers/video/pwm_backlight.c b/drivers/video/pwm_backlight.c
index ad20bf2..742579a 100644
--- a/drivers/video/pwm_backlight.c
+++ b/drivers/video/pwm_backlight.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <dm.h>
#include <backlight.h>
+#include <malloc.h>
#include <pwm.h>
#include <asm/gpio.h>
#include <power/regulator.h>
diff --git a/drivers/video/raydium-rm68200.c b/drivers/video/raydium-rm68200.c
index 91555e2..853dbc5 100644
--- a/drivers/video/raydium-rm68200.c
+++ b/drivers/video/raydium-rm68200.c
@@ -13,6 +13,7 @@
#include <mipi_dsi.h>
#include <panel.h>
#include <asm/gpio.h>
+#include <dm/device_compat.h>
#include <power/regulator.h>
/*** Manufacturer Command Set ***/
diff --git a/drivers/video/rockchip/rk3288_hdmi.c b/drivers/video/rockchip/rk3288_hdmi.c
index 3d25ce9..51eb415 100644
--- a/drivers/video/rockchip/rk3288_hdmi.c
+++ b/drivers/video/rockchip/rk3288_hdmi.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <dw_hdmi.h>
#include <edid.h>
+#include <malloc.h>
#include <regmap.h>
#include <syscon.h>
#include <asm/gpio.h>
diff --git a/drivers/video/rockchip/rk_edp.c b/drivers/video/rockchip/rk_edp.c
index 4330725..8703df0 100644
--- a/drivers/video/rockchip/rk_edp.c
+++ b/drivers/video/rockchip/rk_edp.c
@@ -9,6 +9,7 @@
#include <display.h>
#include <dm.h>
#include <edid.h>
+#include <malloc.h>
#include <panel.h>
#include <regmap.h>
#include <syscon.h>
diff --git a/drivers/video/sandbox_osd.c b/drivers/video/sandbox_osd.c
index dd84489..7e72232 100644
--- a/drivers/video/sandbox_osd.c
+++ b/drivers/video/sandbox_osd.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <display.h>
#include <dm.h>
+#include <malloc.h>
#include <video_osd.h>
#include "sandbox_osd.h"
diff --git a/drivers/video/scf0403_lcd.c b/drivers/video/scf0403_lcd.c
index 58564e8..60075a6 100644
--- a/drivers/video/scf0403_lcd.c
+++ b/drivers/video/scf0403_lcd.c
@@ -14,6 +14,7 @@
*/
#include <common.h>
+#include <malloc.h>
#include <asm/gpio.h>
#include <spi.h>
diff --git a/drivers/video/ssd2828.c b/drivers/video/ssd2828.c
index 4d40dca..83566bc 100644
--- a/drivers/video/ssd2828.c
+++ b/drivers/video/ssd2828.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <malloc.h>
#include <mipi_display.h>
#include <asm/arch/gpio.h>
#include <asm/gpio.h>
diff --git a/drivers/video/stm32/stm32_dsi.c b/drivers/video/stm32/stm32_dsi.c
index 12895a8..ded03b1 100644
--- a/drivers/video/stm32/stm32_dsi.c
+++ b/drivers/video/stm32/stm32_dsi.c
@@ -20,6 +20,7 @@
#include <asm/io.h>
#include <asm/arch/gpio.h>
#include <dm/device-internal.h>
+#include <dm/device_compat.h>
#include <dm/lists.h>
#include <linux/iopoll.h>
#include <power/regulator.h>
diff --git a/drivers/video/stm32/stm32_ltdc.c b/drivers/video/stm32/stm32_ltdc.c
index 59ff692..be7e9bf 100644
--- a/drivers/video/stm32/stm32_ltdc.c
+++ b/drivers/video/stm32/stm32_ltdc.c
@@ -16,6 +16,7 @@
#include <asm/io.h>
#include <asm/arch/gpio.h>
#include <dm/device-internal.h>
+#include <dm/device_compat.h>
struct stm32_ltdc_priv {
void __iomem *regs;
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index 12057c8..3d658e6 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <cpu_func.h>
#include <dm.h>
+#include <malloc.h>
#include <mapmem.h>
#include <stdio_dev.h>
#include <video.h>
diff --git a/drivers/virtio/virtio-uclass.c b/drivers/virtio/virtio-uclass.c
index 436faa4..23f281c 100644
--- a/drivers/virtio/virtio-uclass.c
+++ b/drivers/virtio/virtio-uclass.c
@@ -17,6 +17,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <virtio_types.h>
#include <virtio.h>
#include <dm/lists.h>
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 0eeb350..45c48a9 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -12,6 +12,7 @@
#include <virtio_types.h>
#include <virtio.h>
#include <virtio_ring.h>
+#include <linux/compat.h>
int virtqueue_add(struct virtqueue *vq, struct virtio_sg *sgs[],
unsigned int out_sgs, unsigned int in_sgs)
diff --git a/drivers/w1-eeprom/ds2502.c b/drivers/w1-eeprom/ds2502.c
index 76ca460..19ee4b1 100644
--- a/drivers/w1-eeprom/ds2502.c
+++ b/drivers/w1-eeprom/ds2502.c
@@ -22,6 +22,7 @@
#include <common.h>
#include <dm.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
#include <w1-eeprom.h>
#include <w1.h>
diff --git a/drivers/w1/mxc_w1.c b/drivers/w1/mxc_w1.c
index 9279ba3..08715c6 100644
--- a/drivers/w1/mxc_w1.c
+++ b/drivers/w1/mxc_w1.c
@@ -20,6 +20,7 @@
#include <asm/arch/clock.h>
#include <common.h>
#include <dm.h>
+#include <dm/device_compat.h>
#include <linux/io.h>
#include <w1.h>
diff --git a/drivers/watchdog/armada-37xx-wdt.c b/drivers/watchdog/armada-37xx-wdt.c
index 91cd8a6..5da8e56 100644
--- a/drivers/watchdog/armada-37xx-wdt.c
+++ b/drivers/watchdog/armada-37xx-wdt.c
@@ -11,6 +11,7 @@
#include <asm/io.h>
#include <asm/arch/cpu.h>
#include <asm/arch/soc.h>
+#include <dm/device_compat.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/watchdog/cdns_wdt.c b/drivers/watchdog/cdns_wdt.c
index 13952e1..775f06a 100644
--- a/drivers/watchdog/cdns_wdt.c
+++ b/drivers/watchdog/cdns_wdt.c
@@ -11,6 +11,7 @@
#include <wdt.h>
#include <clk.h>
#include <div64.h>
+#include <dm/device_compat.h>
#include <linux/err.h>
#include <linux/io.h>
diff --git a/fs/ext4/ext4_write.c b/fs/ext4/ext4_write.c
index 3368bd8..67aeba1 100644
--- a/fs/ext4/ext4_write.c
+++ b/fs/ext4/ext4_write.c
@@ -22,6 +22,7 @@
#include <common.h>
+#include <malloc.h>
#include <memalign.h>
#include <linux/stat.h>
#include <div64.h>
diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c
index 37b31d9..1c616a2 100644
--- a/fs/ext4/ext4fs.c
+++ b/fs/ext4/ext4fs.c
@@ -25,6 +25,7 @@
#include <ext4fs.h>
#include "ext4_common.h"
#include <div64.h>
+#include <malloc.h>
int ext4fs_symlinknest;
struct ext_filesystem ext_fs;
diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c
index 729cf39..320a8a7 100644
--- a/fs/fat/fat_write.c
+++ b/fs/fat/fat_write.c
@@ -9,6 +9,7 @@
#include <command.h>
#include <config.h>
#include <fat.h>
+#include <malloc.h>
#include <asm/byteorder.h>
#include <part.h>
#include <linux/ctype.h>
diff --git a/fs/sandbox/sandboxfs.c b/fs/sandbox/sandboxfs.c
index 1e25361..af47224 100644
--- a/fs/sandbox/sandboxfs.c
+++ b/fs/sandbox/sandboxfs.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <fs.h>
+#include <malloc.h>
#include <os.h>
int sandbox_fs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info)
diff --git a/fs/ubifs/lprops.c b/fs/ubifs/lprops.c
index 5473d33..a7c45dd 100644
--- a/fs/ubifs/lprops.c
+++ b/fs/ubifs/lprops.c
@@ -17,6 +17,7 @@
*/
#ifdef __UBOOT__
+#include <malloc.h>
#include <linux/err.h>
#endif
#include "ubifs.h"
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index 3884515..e097d28 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -14,6 +14,7 @@
#include <common.h>
#include <env.h>
#include <gzip.h>
+#include <malloc.h>
#include <memalign.h>
#include "ubifs.h"
#include <dm/devres.h>
diff --git a/fs/yaffs2/yaffs_nandif.c b/fs/yaffs2/yaffs_nandif.c
index 79b00ab..ee5a172 100644
--- a/fs/yaffs2/yaffs_nandif.c
+++ b/fs/yaffs2/yaffs_nandif.c
@@ -13,6 +13,7 @@
#include "yportenv.h"
#include "yaffs_guts.h"
+#include <malloc.h>
#include "yaffs_nandif.h"
diff --git a/fs/yaffs2/yaffs_uboot_glue.c b/fs/yaffs2/yaffs_uboot_glue.c
index 2a70e4a..7a15a02 100644
--- a/fs/yaffs2/yaffs_uboot_glue.c
+++ b/fs/yaffs2/yaffs_uboot_glue.c
@@ -21,6 +21,7 @@
#include <common.h>
#include <div64.h>
+#include <malloc.h>
#include <config.h>
#include "nand.h"
diff --git a/include/dm/device.h b/include/dm/device.h
index 2d8b716..544da27 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -803,75 +803,4 @@ static inline bool device_is_on_pci_bus(const struct udevice *dev)
*/
int dm_scan_fdt_dev(struct udevice *dev);
-/*
- * REVISIT:
- * remove the following after resolving conflicts with <linux/compat.h>
- */
-#ifdef dev_dbg
-#undef dev_dbg
-#endif
-#ifdef dev_vdbg
-#undef dev_vdbg
-#endif
-#ifdef dev_info
-#undef dev_info
-#endif
-#ifdef dev_err
-#undef dev_err
-#endif
-#ifdef dev_warn
-#undef dev_warn
-#endif
-
-/*
- * REVISIT:
- * print device name like Linux
- */
-#define dev_printk(dev, fmt, ...) \
-({ \
- printk(fmt, ##__VA_ARGS__); \
-})
-
-#define __dev_printk(level, dev, fmt, ...) \
-({ \
- if (level < CONFIG_VAL(LOGLEVEL)) \
- dev_printk(dev, fmt, ##__VA_ARGS__); \
-})
-
-#define dev_emerg(dev, fmt, ...) \
- __dev_printk(0, dev, fmt, ##__VA_ARGS__)
-#define dev_alert(dev, fmt, ...) \
- __dev_printk(1, dev, fmt, ##__VA_ARGS__)
-#define dev_crit(dev, fmt, ...) \
- __dev_printk(2, dev, fmt, ##__VA_ARGS__)
-#define dev_err(dev, fmt, ...) \
- __dev_printk(3, dev, fmt, ##__VA_ARGS__)
-#define dev_warn(dev, fmt, ...) \
- __dev_printk(4, dev, fmt, ##__VA_ARGS__)
-#define dev_notice(dev, fmt, ...) \
- __dev_printk(5, dev, fmt, ##__VA_ARGS__)
-#define dev_info(dev, fmt, ...) \
- __dev_printk(6, dev, fmt, ##__VA_ARGS__)
-
-#ifdef DEBUG
-#define dev_dbg(dev, fmt, ...) \
- __dev_printk(7, dev, fmt, ##__VA_ARGS__)
-#else
-#define dev_dbg(dev, fmt, ...) \
-({ \
- if (0) \
- __dev_printk(7, dev, fmt, ##__VA_ARGS__); \
-})
-#endif
-
-#ifdef VERBOSE_DEBUG
-#define dev_vdbg dev_dbg
-#else
-#define dev_vdbg(dev, fmt, ...) \
-({ \
- if (0) \
- __dev_printk(7, dev, fmt, ##__VA_ARGS__); \
-})
-#endif
-
#endif
diff --git a/include/dm/device_compat.h b/include/dm/device_compat.h
new file mode 100644
index 0000000..3d8cd09
--- /dev/null
+++ b/include/dm/device_compat.h
@@ -0,0 +1,86 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (c) 2013 Google, Inc
+ *
+ * (C) Copyright 2012
+ * Pavel Herrmann <morpheus.ibis@gmail.com>
+ * Marek Vasut <marex@denx.de>
+ */
+
+#ifndef _DM_DEVICE_COMPAT_H
+#define _DM_DEVICE_COMPAT_H
+
+#include <linux/compat.h>
+
+/*
+ * REVISIT:
+ * remove the following after resolving conflicts with <linux/compat.h>
+ */
+#ifdef dev_dbg
+#undef dev_dbg
+#endif
+#ifdef dev_vdbg
+#undef dev_vdbg
+#endif
+#ifdef dev_info
+#undef dev_info
+#endif
+#ifdef dev_err
+#undef dev_err
+#endif
+#ifdef dev_warn
+#undef dev_warn
+#endif
+
+/*
+ * REVISIT:
+ * print device name like Linux
+ */
+#define dev_printk(dev, fmt, ...) \
+({ \
+ printk(fmt, ##__VA_ARGS__); \
+})
+
+#define __dev_printk(level, dev, fmt, ...) \
+({ \
+ if (level < CONFIG_VAL(LOGLEVEL)) \
+ dev_printk(dev, fmt, ##__VA_ARGS__); \
+})
+
+#define dev_emerg(dev, fmt, ...) \
+ __dev_printk(0, dev, fmt, ##__VA_ARGS__)
+#define dev_alert(dev, fmt, ...) \
+ __dev_printk(1, dev, fmt, ##__VA_ARGS__)
+#define dev_crit(dev, fmt, ...) \
+ __dev_printk(2, dev, fmt, ##__VA_ARGS__)
+#define dev_err(dev, fmt, ...) \
+ __dev_printk(3, dev, fmt, ##__VA_ARGS__)
+#define dev_warn(dev, fmt, ...) \
+ __dev_printk(4, dev, fmt, ##__VA_ARGS__)
+#define dev_notice(dev, fmt, ...) \
+ __dev_printk(5, dev, fmt, ##__VA_ARGS__)
+#define dev_info(dev, fmt, ...) \
+ __dev_printk(6, dev, fmt, ##__VA_ARGS__)
+
+#ifdef DEBUG
+#define dev_dbg(dev, fmt, ...) \
+ __dev_printk(7, dev, fmt, ##__VA_ARGS__)
+#else
+#define dev_dbg(dev, fmt, ...) \
+({ \
+ if (0) \
+ __dev_printk(7, dev, fmt, ##__VA_ARGS__); \
+})
+#endif
+
+#ifdef VERBOSE_DEBUG
+#define dev_vdbg dev_dbg
+#else
+#define dev_vdbg(dev, fmt, ...) \
+({ \
+ if (0) \
+ __dev_printk(7, dev, fmt, ##__VA_ARGS__); \
+})
+#endif
+
+#endif
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 0ef6e68..8a20743 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -13,6 +13,7 @@
#include <linux/bitops.h>
#include <linux/err.h>
#include <clk-uclass.h>
+#include <linux/err.h>
static inline void clk_dm(ulong id, struct clk *clk)
{
diff --git a/lib/bch.c b/lib/bch.c
index 86709cc..8945d8d 100644
--- a/lib/bch.c
+++ b/lib/bch.c
@@ -55,6 +55,7 @@
#ifndef USE_HOSTCC
#include <common.h>
+#include <malloc.h>
#include <ubi_uboot.h>
#include <dm/devres.h>
diff --git a/lib/binman.c b/lib/binman.c
index 1774bdf..6cf6dcf 100644
--- a/lib/binman.c
+++ b/lib/binman.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <binman.h>
#include <dm.h>
+#include <malloc.h>
struct binman_info {
ofnode image;
diff --git a/lib/bzip2/bzlib.c b/lib/bzip2/bzlib.c
index 9262e40..377b269 100644
--- a/lib/bzip2/bzlib.c
+++ b/lib/bzip2/bzlib.c
@@ -1,5 +1,6 @@
#include <config.h>
#include <common.h>
+#include <malloc.h>
#include <watchdog.h>
/*
diff --git a/lib/crypto/rsa_helper.c b/lib/crypto/rsa_helper.c
index aca627a..cc0c0d6 100644
--- a/lib/crypto/rsa_helper.c
+++ b/lib/crypto/rsa_helper.c
@@ -6,6 +6,7 @@
* Authors: Tadeusz Struk <tadeusz.struk@intel.com>
*/
#ifndef __UBOOT__
+#include <linux/compat.h>
#include <linux/kernel.h>
#include <linux/export.h>
#endif
diff --git a/lib/efi/efi.c b/lib/efi/efi.c
index 7cba57b..0c16a5f 100644
--- a/lib/efi/efi.c
+++ b/lib/efi/efi.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <debug_uart.h>
#include <errno.h>
+#include <malloc.h>
#include <linux/err.h>
#include <linux/types.h>
#include <efi.h>
diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c
index af5a878..7c64077 100644
--- a/lib/efi/efi_app.c
+++ b/lib/efi/efi_app.c
@@ -13,6 +13,7 @@
#include <debug_uart.h>
#include <dm.h>
#include <errno.h>
+#include <malloc.h>
#include <linux/err.h>
#include <linux/types.h>
#include <efi.h>
diff --git a/lib/efi/efi_stub.c b/lib/efi/efi_stub.c
index 6dd93ff..7d650d5 100644
--- a/lib/efi/efi_stub.c
+++ b/lib/efi/efi_stub.c
@@ -14,6 +14,7 @@
#include <efi.h>
#include <efi_api.h>
#include <errno.h>
+#include <malloc.h>
#include <ns16550.h>
#include <asm/cpu.h>
#include <asm/io.h>
diff --git a/lib/efi_driver/efi_block_device.c b/lib/efi_driver/efi_block_device.c
index cf02341..33e66fc 100644
--- a/lib/efi_driver/efi_block_device.c
+++ b/lib/efi_driver/efi_block_device.c
@@ -29,6 +29,7 @@
*/
#include <efi_driver.h>
+#include <malloc.h>
#include <dm/device-internal.h>
#include <dm/root.h>
diff --git a/lib/efi_driver/efi_uclass.c b/lib/efi_driver/efi_uclass.c
index 25b27ec..f8badad 100644
--- a/lib/efi_driver/efi_uclass.c
+++ b/lib/efi_driver/efi_uclass.c
@@ -18,6 +18,7 @@
*/
#include <efi_driver.h>
+#include <malloc.h>
/**
* check_node_type() - check node type
diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c
index 8494044..ac0dec1 100644
--- a/lib/efi_loader/efi_console.c
+++ b/lib/efi_loader/efi_console.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <charset.h>
+#include <malloc.h>
#include <time.h>
#include <dm/device.h>
#include <efi_loader.h>
diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c
index df0485c..4b3c843 100644
--- a/lib/efi_loader/efi_runtime.c
+++ b/lib/efi_loader/efi_runtime.c
@@ -11,6 +11,7 @@
#include <dm.h>
#include <elf.h>
#include <efi_loader.h>
+#include <malloc.h>
#include <rtc.h>
#include <u-boot/crc.h>
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 7fbb4c7..eb11fc8 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <hang.h>
#include <init.h>
+#include <malloc.h>
#include <dm/of_extra.h>
#include <env.h>
#include <errno.h>
diff --git a/lib/libavb/avb_cmdline.c b/lib/libavb/avb_cmdline.c
index 684c512..dd859d3 100644
--- a/lib/libavb/avb_cmdline.c
+++ b/lib/libavb/avb_cmdline.c
@@ -7,6 +7,7 @@
#include "avb_sha.h"
#include "avb_util.h"
#include "avb_version.h"
+#include <malloc.h>
#define NUM_GUIDS 3
diff --git a/lib/libavb/avb_descriptor.c b/lib/libavb/avb_descriptor.c
index 9f03b97..86b8d1b 100644
--- a/lib/libavb/avb_descriptor.c
+++ b/lib/libavb/avb_descriptor.c
@@ -6,6 +6,7 @@
#include "avb_descriptor.h"
#include "avb_util.h"
#include "avb_vbmeta_image.h"
+#include <malloc.h>
bool avb_descriptor_validate_and_byteswap(const AvbDescriptor* src,
AvbDescriptor* dest) {
diff --git a/lib/libavb/avb_rsa.c b/lib/libavb/avb_rsa.c
index bbf1562..d7bf890 100644
--- a/lib/libavb/avb_rsa.c
+++ b/lib/libavb/avb_rsa.c
@@ -12,6 +12,7 @@
#include "avb_sha.h"
#include "avb_util.h"
#include "avb_vbmeta_image.h"
+#include <malloc.h>
typedef struct IAvbKey {
unsigned int len; /* Length of n[] in number of uint32_t */
diff --git a/lib/libavb/avb_slot_verify.c b/lib/libavb/avb_slot_verify.c
index c0defdf..58baf52 100644
--- a/lib/libavb/avb_slot_verify.c
+++ b/lib/libavb/avb_slot_verify.c
@@ -14,6 +14,7 @@
#include "avb_util.h"
#include "avb_vbmeta_image.h"
#include "avb_version.h"
+#include <malloc.h>
/* Maximum number of partitions that can be loaded with avb_slot_verify(). */
#define MAX_NUMBER_OF_LOADED_PARTITIONS 32
diff --git a/lib/libavb/avb_sysdeps_posix.c b/lib/libavb/avb_sysdeps_posix.c
index 0bb0cc1..6ffdb0b 100644
--- a/lib/libavb/avb_sysdeps_posix.c
+++ b/lib/libavb/avb_sysdeps_posix.c
@@ -4,6 +4,7 @@
*/
#include <hang.h>
+#include <malloc.h>
#include <stdarg.h>
#include <stdlib.h>
diff --git a/lib/libavb/avb_util.c b/lib/libavb/avb_util.c
index 405d625..94773b7 100644
--- a/lib/libavb/avb_util.c
+++ b/lib/libavb/avb_util.c
@@ -4,6 +4,7 @@
*/
#include "avb_util.h"
+#include <malloc.h>
#include <stdarg.h>
diff --git a/lib/linux_compat.c b/lib/linux_compat.c
index 3f440de..89a6fd6 100644
--- a/lib/linux_compat.c
+++ b/lib/linux_compat.c
@@ -1,5 +1,6 @@
#include <common.h>
+#include <malloc.h>
#include <memalign.h>
#include <linux/compat.h>
diff --git a/lib/lmb.c b/lib/lmb.c
index b3b84e4..07b9308 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <lmb.h>
+#include <malloc.h>
#define LMB_ALLOC_ANYWHERE 0
diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c
index 5b5905a..6400ef6 100644
--- a/lib/rsa/rsa-sign.c
+++ b/lib/rsa/rsa-sign.c
@@ -4,6 +4,7 @@
*/
#include "mkimage.h"
+#include <malloc.h>
#include <stdio.h>
#include <string.h>
#include <image.h>
diff --git a/lib/rsa/rsa-verify.c b/lib/rsa/rsa-verify.c
index 82dc513..326a5e4 100644
--- a/lib/rsa/rsa-verify.c
+++ b/lib/rsa/rsa-verify.c
@@ -6,6 +6,7 @@
#ifndef USE_HOSTCC
#include <common.h>
#include <fdtdec.h>
+#include <malloc.h>
#include <asm/types.h>
#include <asm/byteorder.h>
#include <linux/errno.h>
diff --git a/lib/zstd/decompress.c b/lib/zstd/decompress.c
index ac5ab52..ae3be3f 100644
--- a/lib/zstd/decompress.c
+++ b/lib/zstd/decompress.c
@@ -23,6 +23,7 @@
#include "huf.h"
#include "mem.h" /* low level memory routines */
#include "zstd_internal.h"
+#include <malloc.h>
#include <linux/kernel.h>
#include <linux/compat.h>
#include <linux/string.h> /* memcpy, memmove, memset */
diff --git a/lib/zstd/zstd_common.c b/lib/zstd/zstd_common.c
index 9a217e1..6b2c79e 100644
--- a/lib/zstd/zstd_common.c
+++ b/lib/zstd/zstd_common.c
@@ -9,6 +9,7 @@
***************************************/
#include "error_private.h"
#include "zstd_internal.h" /* declaration of ZSTD_isError, ZSTD_getErrorName, ZSTD_getErrorCode, ZSTD_getErrorString, ZSTD_versionNumber */
+#include <malloc.h>
#include <linux/kernel.h>
/*=**************************************************************
diff --git a/net/mdio-uclass.c b/net/mdio-uclass.c
index f75e4df..8e78721 100644
--- a/net/mdio-uclass.c
+++ b/net/mdio-uclass.c
@@ -6,9 +6,12 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <miiphy.h>
#include <dm/device-internal.h>
+#include <dm/device_compat.h>
#include <dm/uclass-internal.h>
+#include <linux/compat.h>
/* DT node properties for MAC-PHY interface */
#define PHY_MODE_STR_CNT 2
diff --git a/post/post.c b/post/post.c
index f27138d..696a60f 100644
--- a/post/post.c
+++ b/post/post.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <env.h>
+#include <malloc.h>
#include <stdio_dev.h>
#include <time.h>
#include <watchdog.h>
diff --git a/test/dm/clk.c b/test/dm/clk.c
index 31335a5..003b789 100644
--- a/test/dm/clk.c
+++ b/test/dm/clk.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <malloc.h>
#include <asm/clk.h>
#include <dm/test.h>
#include <dm/device-internal.h>
diff --git a/test/dm/dma.c b/test/dm/dma.c
index b56d177..12cba57 100644
--- a/test/dm/dma.c
+++ b/test/dm/dma.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <dm/test.h>
#include <dma.h>
#include <test/ut.h>
diff --git a/test/dm/gpio.c b/test/dm/gpio.c
index bb4b20c..349123a 100644
--- a/test/dm/gpio.c
+++ b/test/dm/gpio.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <fdtdec.h>
#include <dm.h>
+#include <malloc.h>
#include <dm/root.h>
#include <dm/test.h>
#include <dm/util.h>
diff --git a/test/dm/mailbox.c b/test/dm/mailbox.c
index 4562d2a..e6c521b 100644
--- a/test/dm/mailbox.c
+++ b/test/dm/mailbox.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <dm/test.h>
#include <asm/mbox.h>
#include <test/ut.h>
diff --git a/test/dm/power-domain.c b/test/dm/power-domain.c
index 4831821..8baf5d0 100644
--- a/test/dm/power-domain.c
+++ b/test/dm/power-domain.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <dm/test.h>
#include <asm/power-domain.h>
#include <test/ut.h>
diff --git a/test/dm/reset.c b/test/dm/reset.c
index c61daed..8370820 100644
--- a/test/dm/reset.c
+++ b/test/dm/reset.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <reset.h>
#include <dm/test.h>
#include <asm/reset.h>
diff --git a/test/dm/spmi.c b/test/dm/spmi.c
index e6a9108..668b7e1 100644
--- a/test/dm/spmi.c
+++ b/test/dm/spmi.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <fdtdec.h>
#include <dm.h>
+#include <malloc.h>
#include <dm/device.h>
#include <dm/root.h>
#include <dm/test.h>
diff --git a/test/dm/tee.c b/test/dm/tee.c
index 22f05a4..d40f13d 100644
--- a/test/dm/tee.c
+++ b/test/dm/tee.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <malloc.h>
#include <dm/test.h>
#include <sandboxtee.h>
#include <tee.h>
diff --git a/test/dm/video.c b/test/dm/video.c
index 3151ebb..f72979f 100644
--- a/test/dm/video.c
+++ b/test/dm/video.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <bzlib.h>
#include <dm.h>
+#include <malloc.h>
#include <mapmem.h>
#include <os.h>
#include <video.h>
diff --git a/test/lib/lmb.c b/test/lib/lmb.c
index ec68227..1336b54 100644
--- a/test/lib/lmb.c
+++ b/test/lib/lmb.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <lmb.h>
+#include <malloc.h>
#include <dm/test.h>
#include <test/ut.h>
diff --git a/test/unicode_ut.c b/test/unicode_ut.c
index 47532a6..4d99c20 100644
--- a/test/unicode_ut.c
+++ b/test/unicode_ut.c
@@ -9,6 +9,7 @@
#include <charset.h>
#include <command.h>
#include <errno.h>
+#include <malloc.h>
#include <test/test.h>
#include <test/suites.h>
#include <test/ut.h>