sandbox: Move to SDL2
Subsystems (92)
cover sandbox: Move to SDL2
This series handles moving sandbox to the latest version of SDL, SDL2. It provides a few more features, better performance and has been around for long enough that it is present in distributions in the last several years.
Unfortunately it requires considerable rework of how memory allocation is handled in sandbox.
At present sandbox is built such that it uses U-Boot's malloc() instead of the C library's malloc. This mostly works but it is fragile, since any use of libraries can cause strange behaviour. For example SDL ends up calling U-Boot's malloc/free and this can confuse valgrind and even cause a crash in some cases.
The simplest solution seems to be to set a prefix for the allocation functions so that U-Boot's functions can co-exist with the C library's. This requires a little bit of fiddling but it guarantees that things work correctly in all circumstances.
We have got away with this for a long time partly due to the way that SDL1.2 operates on init. But with SDL2 this does not seem to be possible.
As a result of this series, malloc() is #defined to dlmalloc() within U-Boot (for sandbox only). The use of 'free' as a function in U-Boot is thus best avoided, since it is #defined to dlfree. The series updates some APIs to deal with this.
Simon Glass (33):
sandbox: Sort the help options
video: Support truetype fonts on a 32-bit display
video: sandbox: Enable all colour depths
mailbox: Rename free() to rfree()
power-domain: Rename free() to rfree()
reset: Rename free() to rfree()
gpio: Rename free() to rfree()
clk: Rename free() to rfree()
dma: Rename free() to rfree()
mtd: Rename free() to rfree()
sandbox: Rename 'free' variable
sandbox: Use a prefix for all allocation functions
exports: Add the malloc.h header
string: Allow arch override of strndup() also
sandbox: Rename strdup() functions
sandbox: Drop use of special os_malloc() where possible
sandbox: Drop os_realloc()
sandbox: Ensure that long-options array is terminated
sandbox: Add a new header for the system malloc()
sound: Add a new stop_play() method
sandbox: sound: Handle errors better in sound_beep()
sandbox: Add comments to the sdl struct
sandbox: sdl: Improve error handling
sandbox: sdl: Support waiting for audio to complete
gitlab: Disable SDL when building sandbox
sandbox: sdl: Move to use SDL2
sandbox: sdl: Add an option to double the screen size
sandbox: Support changing the LCD colour depth
dm: core: Require users of devres to include the header
dm: core: Create a new header file for 'compat' features
dm: core: Drop the inclusion of linux/compat.h in dm.h
sandbox: Complete migration away from os_malloc()
video: Drop the Nimbus font
.gitlab-ci.yml | 5 +- .travis.yml | 2 +- arch/arm/mach-aspeed/ast2500/clk_ast2500.c | 1 + arch/arm/mach-imx/cmd_nandbcb.c | 2 + arch/arm/mach-imx/imx8/image.c | 1 + arch/arm/mach-meson/board-info.c | 1 + arch/arm/mach-meson/sm.c | 1 + arch/arm/mach-mvebu/mbus.c | 1 + arch/arm/mach-rockchip/px30/clk_px30.c | 1 + arch/arm/mach-rockchip/rk3036/clk_rk3036.c | 1 + arch/arm/mach-rockchip/rk3128/clk_rk3128.c | 1 + arch/arm/mach-rockchip/rk3188/clk_rk3188.c | 1 + arch/arm/mach-rockchip/rk3188/rk3188.c | 1 + arch/arm/mach-rockchip/rk322x/clk_rk322x.c | 1 + arch/arm/mach-rockchip/rk3288/clk_rk3288.c | 1 + arch/arm/mach-rockchip/rk3288/rk3288.c | 2 + arch/arm/mach-rockchip/rk3308/clk_rk3308.c | 1 + arch/arm/mach-rockchip/rk3308/rk3308.c | 1 + arch/arm/mach-rockchip/rk3328/clk_rk3328.c | 1 + arch/arm/mach-rockchip/rk3368/clk_rk3368.c | 1 + arch/arm/mach-rockchip/rk3399/clk_rk3399.c | 1 + arch/arm/mach-rockchip/rv1108/clk_rv1108.c | 1 + arch/arm/mach-socfpga/clock_manager_agilex.c | 1 + arch/arm/mach-socfpga/clock_manager_arria10.c | 1 + arch/arm/mach-stm32mp/pwr_regulator.c | 2 + arch/arm/mach-tegra/cboot.c | 1 + arch/arm/mach-zynq/clk.c | 1 + arch/arm/mach-zynq/timer.c | 1 + arch/mips/mach-mtmips/cpu.c | 1 + arch/mips/mach-pic32/cpu.c | 1 + arch/riscv/lib/andes_plic.c | 1 + arch/riscv/lib/andes_plmt.c | 1 + arch/riscv/lib/sifive_clint.c | 1 + arch/sandbox/config.mk | 2 +- arch/sandbox/cpu/cpu.c | 1 + arch/sandbox/cpu/eth-raw-os.c | 6 +- arch/sandbox/cpu/os.c | 48 +-- arch/sandbox/cpu/sdl.c | 338 +++++++++++------- arch/sandbox/cpu/start.c | 62 +++- arch/sandbox/cpu/state.c | 23 +- arch/sandbox/dts/sandbox.dtsi | 1 + arch/sandbox/include/asm/malloc.h | 26 ++ arch/sandbox/include/asm/sdl.h | 9 +- arch/sandbox/include/asm/state.h | 1 + arch/sandbox/include/asm/test.h | 7 + arch/x86/cpu/apollolake/fsp_s.c | 1 + arch/x86/cpu/apollolake/itss.c | 1 + arch/x86/cpu/apollolake/spl.c | 1 + arch/x86/cpu/apollolake/uart.c | 1 + arch/x86/cpu/qemu/e820.c | 1 + arch/x86/cpu/qfw_cpu.c | 1 + arch/x86/lib/coreboot_table.c | 1 + arch/x86/lib/fsp1/fsp_common.c | 1 + arch/x86/lib/mrccache.c | 1 + arch/x86/lib/tables.c | 1 + board/compulab/common/common.c | 1 + board/corscience/tricorder/tricorder.c | 1 + board/gardena/smart-gateway-mt7688/board.c | 1 + board/ge/common/vpd_reader.c | 1 + board/google/veyron/veyron.c | 1 + board/hisilicon/poplar/poplar.c | 2 +- board/isee/igep003x/board.c | 1 + board/isee/igep00x0/igep00x0.c | 1 + board/menlo/m53menlo/m53menlo.c | 1 + board/microchip/pic32mzda/pic32mzda.c | 1 + board/overo/overo.c | 1 + board/siemens/common/board.c | 1 + board/siemens/pxm2/board.c | 1 + board/siemens/rut/board.c | 1 + board/st/stm32mp1/stm32mp1.c | 2 + board/synopsys/hsdk/clk-lib.c | 1 + board/technexion/tao3530/tao3530.c | 1 + board/ti/am335x/board.c | 1 + board/ti/am57xx/board.c | 1 + board/timll/devkit8000/devkit8000.c | 1 + cmd/bootefi.c | 1 + cmd/gpio.c | 2 + cmd/gpt.c | 1 + cmd/host.c | 1 + cmd/mtd.c | 2 + cmd/rng.c | 1 + cmd/tpm-common.c | 1 + cmd/ubi.c | 2 + cmd/usb_mass_storage.c | 1 + cmd/ximg.c | 1 + common/android_ab.c | 1 + common/autoboot.c | 1 + common/exports.c | 1 + common/image-fdt.c | 1 + common/image.c | 1 + common/usb.c | 1 + common/usb_hub.c | 1 + configs/sandbox64_defconfig | 1 - configs/sandbox_defconfig | 1 - configs/sandbox_flattree_defconfig | 1 - configs/sandbox_spl_defconfig | 1 - doc/README.video | 2 +- doc/arch/sandbox.rst | 2 +- doc/device-tree-bindings/video/sandbox-fb.txt | 6 +- drivers/adc/rockchip-saradc.c | 1 + drivers/adc/stm32-adc-core.c | 1 + drivers/adc/stm32-adc.c | 1 + drivers/axi/sandbox_store.c | 1 + drivers/block/blk-uclass.c | 2 + drivers/block/sandbox.c | 1 + drivers/clk/altera/clk-arria10.c | 3 + drivers/clk/aspeed/clk_ast2500.c | 1 + drivers/clk/at91/clk-generated.c | 2 + drivers/clk/at91/clk-h32mx.c | 1 + drivers/clk/at91/clk-peripheral.c | 1 + drivers/clk/at91/clk-usb.c | 1 + drivers/clk/clk-cdce9xx.c | 1 + drivers/clk/clk-composite.c | 2 + drivers/clk/clk-divider.c | 2 + drivers/clk/clk-fixed-factor.c | 2 + drivers/clk/clk-gate.c | 2 + drivers/clk/clk-mux.c | 2 + drivers/clk/clk-ti-sci.c | 5 +- drivers/clk/clk-uclass.c | 9 +- drivers/clk/clk_fixed_factor.c | 1 + drivers/clk/clk_sandbox.c | 3 +- drivers/clk/clk_sandbox_ccf.c | 3 + drivers/clk/clk_sandbox_test.c | 3 + drivers/clk/clk_versal.c | 2 + drivers/clk/clk_vexpress_osc.c | 1 + drivers/clk/clk_zynq.c | 1 + drivers/clk/clk_zynqmp.c | 3 + drivers/clk/imx/clk-composite-8m.c | 2 + drivers/clk/imx/clk-gate2.c | 2 + drivers/clk/imx/clk-imx8.c | 1 + drivers/clk/imx/clk-pfd.c | 2 + drivers/clk/imx/clk-pll14xx.c | 2 + drivers/clk/imx/clk-pllv3.c | 2 + drivers/clk/meson/axg.c | 1 + drivers/clk/meson/g12a.c | 1 + drivers/clk/meson/gxbb.c | 1 + drivers/clk/mvebu/armada-37xx-periph.c | 1 + drivers/clk/mvebu/armada-37xx-tbg.c | 1 + drivers/clk/rockchip/clk_px30.c | 1 + drivers/clk/rockchip/clk_rk3036.c | 1 + drivers/clk/rockchip/clk_rk3128.c | 1 + drivers/clk/rockchip/clk_rk3188.c | 2 + drivers/clk/rockchip/clk_rk322x.c | 1 + drivers/clk/rockchip/clk_rk3288.c | 2 + drivers/clk/rockchip/clk_rk3308.c | 1 + drivers/clk/rockchip/clk_rk3328.c | 1 + drivers/clk/rockchip/clk_rk3368.c | 1 + drivers/clk/rockchip/clk_rk3399.c | 1 + drivers/clk/rockchip/clk_rv1108.c | 1 + drivers/clk/sifive/fu540-prci.c | 1 + drivers/clk/tegra/tegra-car-clk.c | 3 +- drivers/clk/uniphier/clk-uniphier-core.c | 1 + drivers/core/devres.c | 2 + drivers/core/of_access.c | 1 + drivers/core/ofnode.c | 1 + drivers/core/syscon-uclass.c | 1 + drivers/ddr/altera/sdram_gen5.c | 1 + drivers/ddr/altera/sdram_soc64.c | 1 + drivers/dfu/dfu_mtd.c | 1 + drivers/dma/bcm6348-iudma.c | 1 + drivers/dma/dma-uclass.c | 5 +- drivers/dma/sandbox-dma-test.c | 3 +- drivers/dma/ti/k3-udma.c | 5 +- drivers/firmware/ti_sci.c | 3 + drivers/fpga/fpga.c | 1 + drivers/gpio/74x164_gpio.c | 1 + drivers/gpio/adi_gpio2.c | 1 + drivers/gpio/at91_gpio.c | 1 + drivers/gpio/atmel_pio4.c | 1 + drivers/gpio/da8xx_gpio.c | 1 + drivers/gpio/dwapb_gpio.c | 2 + drivers/gpio/gpio-rcar.c | 4 +- drivers/gpio/gpio-uclass.c | 4 +- drivers/gpio/kona_gpio.c | 1 + drivers/gpio/mpc83xx_gpio.c | 1 + drivers/gpio/mscc_sgpio.c | 2 + drivers/gpio/mvgpio.c | 1 + drivers/gpio/mxs_gpio.c | 1 + drivers/gpio/pca953x_gpio.c | 1 + drivers/gpio/pca9698.c | 1 + drivers/gpio/sh_pfc.c | 1 + drivers/gpio/spear_gpio.c | 1 + drivers/gpio/stm32_gpio.c | 1 + drivers/hwspinlock/hwspinlock-uclass.c | 2 + drivers/hwspinlock/stm32_hwspinlock.c | 1 + drivers/i2c/ast_i2c.c | 1 + drivers/i2c/at91_i2c.c | 1 + drivers/i2c/designware_i2c.c | 3 + drivers/i2c/i2c-uniphier-f.c | 1 + drivers/i2c/i2c-uniphier.c | 1 + drivers/i2c/imx_lpi2c.c | 1 + drivers/i2c/meson_i2c.c | 1 + drivers/i2c/muxes/i2c-arb-gpio-challenge.c | 1 + drivers/i2c/muxes/i2c-mux-gpio.c | 2 + drivers/i2c/muxes/i2c-mux-uclass.c | 1 + drivers/i2c/muxes/pca954x.c | 1 + drivers/i2c/mxc_i2c.c | 1 + drivers/i2c/rcar_i2c.c | 1 + drivers/i2c/stm32f7_i2c.c | 1 + drivers/i2c/tegra_i2c.c | 1 + drivers/i2c/xilinx_xiic.c | 1 + drivers/led/led_gpio.c | 1 + drivers/mailbox/k3-sec-proxy.c | 4 +- drivers/mailbox/mailbox-uclass.c | 5 +- drivers/mailbox/sandbox-mbox-test.c | 1 + drivers/mailbox/sandbox-mbox.c | 3 +- drivers/mailbox/stm32-ipcc.c | 4 +- drivers/mailbox/tegra-hsp.c | 3 +- drivers/mailbox/zynqmp-ipi.c | 1 + drivers/misc/cros_ec_sandbox.c | 8 +- drivers/misc/imx8/scu_api.c | 1 + drivers/misc/k3_avs.c | 1 + drivers/misc/microchip_flexcom.c | 1 + drivers/misc/p2sb-uclass.c | 1 + drivers/misc/stm32_rcc.c | 1 + drivers/misc/tegra186_bpmp.c | 2 + drivers/misc/vexpress_config.c | 1 + drivers/mmc/am654_sdhci.c | 2 + drivers/mmc/arm_pl180_mmci.c | 1 + drivers/mmc/aspeed_sdhci.c | 1 + drivers/mmc/bcm2835_sdhost.c | 1 + drivers/mmc/fsl_esdhc.c | 1 + drivers/mmc/fsl_esdhc_imx.c | 2 + drivers/mmc/jz_mmc.c | 1 + drivers/mmc/mmc-uclass.c | 2 + drivers/mmc/msm_sdhci.c | 1 + drivers/mmc/mtk-sd.c | 1 + drivers/mmc/omap_hsmmc.c | 2 + drivers/mmc/renesas-sdhi.c | 2 + drivers/mmc/rockchip_sdhci.c | 1 + drivers/mmc/sdhci-cadence.c | 1 + drivers/mmc/sh_mmcif.c | 1 + drivers/mmc/sh_sdhi.c | 1 + drivers/mmc/snps_dw_mmc.c | 1 + drivers/mmc/socfpga_dw_mmc.c | 1 + drivers/mmc/stm32_sdmmc2.c | 1 + drivers/mmc/tegra_mmc.c | 1 + drivers/mmc/tmio-common.c | 1 + drivers/mmc/uniphier-sd.c | 2 + drivers/mmc/zynq_sdhci.c | 2 + drivers/mtd/hbmc-am654.c | 1 + drivers/mtd/mtd_uboot.c | 2 + drivers/mtd/mtdconcat.c | 1 + drivers/mtd/mtdcore.c | 5 +- drivers/mtd/mtdpart.c | 1 + drivers/mtd/nand/bbt.c | 1 + drivers/mtd/nand/core.c | 1 + drivers/mtd/nand/raw/atmel_nand.c | 2 + drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c | 1 + drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c | 1 + drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c | 1 + drivers/mtd/nand/raw/brcmnand/brcmnand.c | 3 + .../mtd/nand/raw/brcmnand/brcmnand_compat.c | 2 + drivers/mtd/nand/raw/denali.c | 6 +- drivers/mtd/nand/raw/denali_dt.c | 1 + drivers/mtd/nand/raw/fsl_elbc_nand.c | 1 + drivers/mtd/nand/raw/fsl_ifc_nand.c | 1 + drivers/mtd/nand/raw/mxs_nand_spl.c | 1 + drivers/mtd/nand/raw/nand_base.c | 1 + drivers/mtd/nand/raw/nand_bbt.c | 1 + drivers/mtd/nand/raw/nand_bch.c | 1 + drivers/mtd/nand/raw/nand_timings.c | 1 + drivers/mtd/nand/raw/nand_util.c | 1 + drivers/mtd/nand/raw/pxa3xx_nand.c | 3 + drivers/mtd/nand/raw/stm32_fmc2_nand.c | 1 + drivers/mtd/nand/raw/sunxi_nand.c | 4 + drivers/mtd/nand/raw/tegra_nand.c | 1 + drivers/mtd/nand/raw/vf610_nfc.c | 1 + drivers/mtd/nand/spi/core.c | 4 +- drivers/mtd/nand/spi/gigadevice.c | 3 +- drivers/mtd/nand/spi/macronix.c | 3 +- drivers/mtd/nand/spi/micron.c | 3 +- drivers/mtd/nand/spi/winbond.c | 3 +- drivers/mtd/onenand/onenand_base.c | 1 + drivers/mtd/renesas_rpc_hf.c | 2 + drivers/mtd/spi/sf-uclass.c | 1 + drivers/mtd/spi/spi-nor-core.c | 2 + drivers/mtd/spi/spi-nor-tiny.c | 1 + drivers/mtd/ubi/attach.c | 1 + drivers/mtd/ubi/build.c | 1 + drivers/mtd/ubi/debug.c | 2 + drivers/mtd/ubi/eba.c | 1 + drivers/mtd/ubi/fastmap.c | 2 + drivers/mtd/ubi/io.c | 1 + drivers/mtd/ubi/kapi.c | 1 + drivers/mtd/ubi/misc.c | 1 + drivers/mtd/ubi/upd.c | 1 + drivers/mtd/ubi/vmt.c | 1 + drivers/mtd/ubi/vtbl.c | 1 + drivers/mtd/ubi/wl.c | 1 + drivers/net/bcm6348-eth.c | 1 + drivers/net/bcm6368-eth.c | 2 + drivers/net/designware.c | 2 + drivers/net/dwc_eth_qos.c | 1 + drivers/net/dwmac_socfpga.c | 2 + drivers/net/e1000.c | 1 + drivers/net/e1000_spi.c | 1 + drivers/net/fsl-mc/dpio/qbman_portal.c | 1 + drivers/net/fsl-mc/mc.c | 1 + drivers/net/fsl_enetc.c | 1 + drivers/net/ftgmac100.c | 2 + drivers/net/higmacv300.c | 1 + drivers/net/mscc_eswitch/jr2_switch.c | 1 + drivers/net/mscc_eswitch/luton_switch.c | 1 + drivers/net/mscc_eswitch/ocelot_switch.c | 1 + drivers/net/mscc_eswitch/serval_switch.c | 1 + drivers/net/mscc_eswitch/servalt_switch.c | 1 + drivers/net/mtk_eth.c | 1 + drivers/net/mvneta.c | 2 + drivers/net/mvpp2.c | 3 + drivers/net/pch_gbe.c | 1 + drivers/net/pfe_eth/pfe_driver.c | 1 + drivers/net/pfe_eth/pfe_eth.c | 1 + drivers/net/pfe_eth/pfe_firmware.c | 1 + drivers/net/pfe_eth/pfe_mdio.c | 1 + drivers/net/phy/dp83867.c | 1 + drivers/net/phy/fixed.c | 1 + drivers/net/pic32_eth.c | 1 + drivers/net/sandbox-raw-bus.c | 1 + drivers/net/sni_ave.c | 7 +- drivers/net/sun8i_emac.c | 1 + drivers/net/sunxi_emac.c | 1 + drivers/net/ti/am65-cpsw-nuss.c | 2 + drivers/net/ti/cpsw-common.c | 1 + drivers/net/ti/cpsw.c | 1 + drivers/net/ti/cpsw_mdio.c | 1 + drivers/net/zynq_gem.c | 2 + drivers/nvme/nvme.c | 2 + drivers/pci/pci-aardvark.c | 1 + drivers/pci/pci-uclass.c | 1 + drivers/pci/pci_mvebu.c | 1 + drivers/pci/pcie_dw_ti.c | 2 + drivers/pci/pcie_fsl.c | 1 + drivers/pci/pcie_imx.c | 1 + drivers/pci/pcie_intel_fpga.c | 1 + drivers/pci/pcie_mediatek.c | 2 + drivers/phy/allwinner/phy-sun4i-usb.c | 2 + drivers/phy/bcm6318-usbh-phy.c | 1 + drivers/phy/bcm6348-usbh-phy.c | 1 + drivers/phy/bcm6358-usbh-phy.c | 1 + drivers/phy/bcm6368-usbh-phy.c | 1 + drivers/phy/marvell/comphy_core.c | 2 + drivers/phy/meson-g12a-usb2.c | 1 + drivers/phy/meson-g12a-usb3-pcie.c | 1 + drivers/phy/meson-gxl-usb2.c | 1 + drivers/phy/meson-gxl-usb3.c | 1 + drivers/phy/omap-usb2-phy.c | 1 + drivers/phy/phy-mtk-tphy.c | 3 + drivers/phy/phy-rcar-gen2.c | 2 + drivers/phy/phy-rcar-gen3.c | 1 + drivers/phy/phy-stm32-usbphyc.c | 1 + drivers/phy/phy-ti-am654.c | 2 + drivers/phy/ti-pipe3-phy.c | 1 + drivers/pinctrl/broadcom/pinctrl-bcm6838.c | 1 + drivers/pinctrl/intel/pinctrl.c | 2 + drivers/pinctrl/meson/pinctrl-meson.c | 2 + drivers/pinctrl/mscc/mscc-common.c | 2 + .../pinctrl/mtmips/pinctrl-mtmips-common.c | 1 + drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 3 + drivers/pinctrl/nxp/pinctrl-imx.c | 3 + drivers/pinctrl/nxp/pinctrl-mxs.c | 2 + drivers/pinctrl/pinctrl-generic.c | 1 + drivers/pinctrl/pinctrl-single.c | 1 + drivers/pinctrl/pinctrl-stmfx.c | 1 + drivers/pinctrl/pinctrl-uclass.c | 2 + drivers/pinctrl/pinctrl_stm32.c | 3 + drivers/pinctrl/renesas/pfc.c | 2 + .../pinctrl/uniphier/pinctrl-uniphier-core.c | 1 + drivers/power/domain/bcm6328-power-domain.c | 3 +- .../power/domain/imx8-power-domain-legacy.c | 3 +- drivers/power/domain/imx8-power-domain.c | 3 +- drivers/power/domain/imx8m-power-domain.c | 3 +- drivers/power/domain/meson-ee-pwrc.c | 4 +- drivers/power/domain/meson-gx-pwrc-vpu.c | 4 +- drivers/power/domain/mtk-power-domain.c | 4 +- drivers/power/domain/power-domain-uclass.c | 3 +- .../power/domain/sandbox-power-domain-test.c | 1 + drivers/power/domain/sandbox-power-domain.c | 3 +- drivers/power/domain/tegra186-power-domain.c | 3 +- drivers/power/domain/ti-sci-power-domain.c | 5 +- drivers/power/pmic/fan53555.c | 1 + drivers/power/pmic/i2c_pmic_emul.c | 1 + drivers/power/pmic/stpmic1.c | 1 + drivers/power/regulator/pbias_regulator.c | 1 + drivers/power/regulator/pwm_regulator.c | 1 + drivers/power/regulator/stm32-vrefbuf.c | 1 + drivers/power/regulator/tps62360_regulator.c | 1 + drivers/ram/k3-am654-ddrss.c | 1 + drivers/ram/k3-j721e/k3-j721e-ddrss.c | 1 + drivers/ram/rockchip/dmc-rk3368.c | 1 + drivers/ram/stm32_sdram.c | 1 + drivers/remoteproc/k3_system_controller.c | 1 + drivers/remoteproc/rproc-elf-loader.c | 2 + drivers/remoteproc/stm32_copro.c | 2 + drivers/remoteproc/ti_k3_arm64_rproc.c | 2 + drivers/remoteproc/ti_k3_dsp_rproc.c | 3 + drivers/remoteproc/ti_k3_r5f_rproc.c | 3 + drivers/reset/reset-bcm6345.c | 3 +- drivers/reset/reset-hisilicon.c | 3 +- drivers/reset/reset-hsdk.c | 2 +- drivers/reset/reset-imx7.c | 3 +- drivers/reset/reset-mediatek.c | 4 +- drivers/reset/reset-meson.c | 3 +- drivers/reset/reset-mtmips.c | 3 +- drivers/reset/reset-rockchip.c | 3 +- drivers/reset/reset-socfpga.c | 3 +- drivers/reset/reset-sunxi.c | 3 +- drivers/reset/reset-ti-sci.c | 5 +- drivers/reset/reset-uclass.c | 4 +- drivers/reset/reset-uniphier.c | 4 +- drivers/reset/sandbox-reset-test.c | 1 + drivers/reset/sandbox-reset.c | 3 +- drivers/reset/sti-reset.c | 3 +- drivers/reset/stm32-reset.c | 3 +- drivers/reset/tegra-car-reset.c | 3 +- drivers/reset/tegra186-reset.c | 3 +- drivers/rtc/ds3232.c | 1 + drivers/rtc/rv3029.c | 1 + drivers/rtc/stm32_rtc.c | 2 + drivers/serial/atmel_usart.c | 1 + drivers/serial/ns16550.c | 1 + drivers/serial/serial-uclass.c | 1 + drivers/serial/serial_bcm6345.c | 1 + drivers/serial/serial_lpuart.c | 1 + drivers/serial/serial_msm.c | 1 + drivers/serial/serial_mtk.c | 3 +- drivers/serial/serial_omap.c | 1 + drivers/serial/serial_pic32.c | 1 + drivers/serial/serial_sifive.c | 1 + drivers/serial/serial_stm32.c | 1 + drivers/serial/serial_zynq.c | 2 + drivers/smem/msm_smem.c | 3 + drivers/soc/ti/k3-navss-ringacc.c | 3 + drivers/sound/sandbox.c | 21 +- drivers/sound/sound-uclass.c | 17 +- drivers/spi/atmel-quadspi.c | 3 + drivers/spi/bcm63xx_hsspi.c | 1 + drivers/spi/bcm63xx_spi.c | 1 + drivers/spi/cadence_qspi.c | 2 + drivers/spi/designware_spi.c | 1 + drivers/spi/mvebu_a3700_spi.c | 1 + drivers/spi/mxc_spi.c | 1 + drivers/spi/spi-mem-nodm.c | 1 + drivers/spi/spi-mem.c | 2 + drivers/spi/spi-sunxi.c | 1 + drivers/spi/stm32_qspi.c | 1 + drivers/spi/stm32_spi.c | 2 + drivers/spi/ti_qspi.c | 1 + drivers/spi/uniphier_spi.c | 1 + drivers/spi/zynqmp_gqspi.c | 2 + drivers/spmi/spmi-msm.c | 1 + drivers/sysreset/sysreset-ti-sci.c | 2 + drivers/sysreset/sysreset_syscon.c | 1 + drivers/tee/optee/core.c | 2 + drivers/tee/optee/rpmb.c | 1 + drivers/tee/optee/supplicant.c | 1 + drivers/tee/tee-uclass.c | 3 +- drivers/timer/ast_timer.c | 1 + drivers/timer/cadence-ttc.c | 1 + drivers/timer/dw-apb-timer.c | 2 + drivers/timer/ostm_timer.c | 1 + drivers/timer/stm32_timer.c | 1 + drivers/timer/timer-uclass.c | 1 + drivers/ufs/cdns-platform.c | 2 + drivers/ufs/ti-j721e-ufs.c | 2 + drivers/ufs/ufs.c | 2 + drivers/usb/cdns3/cdns3-ti.c | 1 + drivers/usb/cdns3/core.c | 2 + drivers/usb/cdns3/drd.c | 1 + drivers/usb/cdns3/ep0.c | 1 + drivers/usb/cdns3/gadget.c | 3 + drivers/usb/cdns3/host.c | 1 + drivers/usb/dwc3/core.c | 3 + drivers/usb/dwc3/dwc3-omap.c | 2 + drivers/usb/dwc3/dwc3-uniphier.c | 1 + drivers/usb/dwc3/ep0.c | 1 + drivers/usb/dwc3/gadget.c | 2 + drivers/usb/dwc3/ti_usb_phy.c | 2 + drivers/usb/gadget/at91_udc.c | 2 + drivers/usb/gadget/composite.c | 1 + drivers/usb/gadget/dwc2_udc_otg.c | 2 + drivers/usb/gadget/f_mass_storage.c | 1 + drivers/usb/gadget/pxa25x_udc.c | 1 + drivers/usb/gadget/storage_common.c | 1 + drivers/usb/gadget/udc/udc-core.c | 2 + drivers/usb/host/dwc2.c | 1 + drivers/usb/host/ehci-atmel.c | 1 + drivers/usb/host/ehci-generic.c | 2 + drivers/usb/host/ehci-hcd.c | 1 + drivers/usb/host/ohci-da8xx.c | 3 + drivers/usb/host/ohci-generic.c | 2 + drivers/usb/host/r8a66597-hcd.c | 1 + drivers/usb/host/xhci-rcar.c | 2 + drivers/usb/musb-new/am35x.c | 2 + drivers/usb/musb-new/da8xx.c | 1 + drivers/usb/musb-new/musb_core.c | 2 + drivers/usb/musb-new/musb_dsps.c | 2 + drivers/usb/musb-new/musb_gadget.c | 2 + drivers/usb/musb-new/musb_gadget_ep0.c | 1 + drivers/usb/musb-new/musb_host.c | 2 + drivers/usb/musb-new/musb_uboot.c | 2 + drivers/usb/musb-new/omap2430.c | 2 + drivers/usb/musb-new/pic32.c | 1 + drivers/usb/musb-new/sunxi.c | 2 + drivers/usb/musb-new/ti-musb.c | 1 + drivers/usb/phy/omap_usb_phy.c | 1 + drivers/video/Kconfig | 4 +- drivers/video/atmel_hlcdfb.c | 1 + drivers/video/console_truetype.c | 28 +- drivers/video/da8xx-fb.c | 1 + drivers/video/dw_mipi_dsi.c | 1 + drivers/video/exynos/exynos_mipi_dsi.c | 1 + drivers/video/fonts/Kconfig | 20 +- drivers/video/fonts/Makefile | 2 +- drivers/video/fonts/nimbus_sans_l_regular.ttf | Bin 61660 -> 0 bytes drivers/video/fonts/roboto_regular.ttf | Bin 0 -> 162876 bytes drivers/video/hitachi_tx18d42vm_lcd.c | 1 + drivers/video/mali_dp.c | 2 + drivers/video/mipi_dsi.c | 1 + drivers/video/mvebu_lcd.c | 1 + drivers/video/mxsfb.c | 1 + drivers/video/orisetech_otm8009a.c | 1 + drivers/video/pwm_backlight.c | 1 + drivers/video/raydium-rm68200.c | 1 + drivers/video/rockchip/rk3288_hdmi.c | 1 + drivers/video/rockchip/rk3288_mipi.c | 1 + drivers/video/rockchip/rk3399_mipi.c | 1 + drivers/video/rockchip/rk_edp.c | 1 + drivers/video/rockchip/rk_vop.c | 1 + drivers/video/sandbox_osd.c | 1 + drivers/video/sandbox_sdl.c | 13 +- drivers/video/scf0403_lcd.c | 1 + drivers/video/ssd2828.c | 1 + drivers/video/stm32/stm32_dsi.c | 1 + drivers/video/stm32/stm32_ltdc.c | 1 + drivers/video/tegra124/sor.c | 1 + drivers/video/video-uclass.c | 1 + drivers/virtio/virtio-uclass.c | 1 + drivers/virtio/virtio_mmio.c | 1 + drivers/virtio/virtio_pci_legacy.c | 1 + drivers/virtio/virtio_pci_modern.c | 1 + drivers/virtio/virtio_ring.c | 1 + drivers/virtio/virtio_sandbox.c | 1 + drivers/w1-eeprom/ds2502.c | 1 + drivers/w1/mxc_w1.c | 1 + drivers/watchdog/armada-37xx-wdt.c | 1 + drivers/watchdog/ast_wdt.c | 1 + drivers/watchdog/cdns_wdt.c | 2 + drivers/watchdog/sp805_wdt.c | 1 + drivers/watchdog/xilinx_tb_wdt.c | 1 + fs/ext4/ext4_write.c | 1 + fs/ext4/ext4fs.c | 1 + fs/fat/fat_write.c | 1 + fs/sandbox/sandboxfs.c | 1 + fs/ubifs/debug.c | 1 + fs/ubifs/gc.c | 1 + fs/ubifs/io.c | 1 + fs/ubifs/log.c | 1 + fs/ubifs/lprops.c | 1 + fs/ubifs/lpt.c | 1 + fs/ubifs/lpt_commit.c | 1 + fs/ubifs/master.c | 1 + fs/ubifs/orphan.c | 1 + fs/ubifs/recovery.c | 1 + fs/ubifs/replay.c | 1 + fs/ubifs/sb.c | 1 + fs/ubifs/scan.c | 1 + fs/ubifs/super.c | 1 + fs/ubifs/tnc.c | 1 + fs/ubifs/tnc_misc.c | 1 + fs/ubifs/ubifs.c | 2 + fs/yaffs2/yaffs_allocator.c | 1 + fs/yaffs2/yaffs_checkptrw.c | 1 + fs/yaffs2/yaffs_guts.c | 1 + fs/yaffs2/yaffs_nandif.c | 1 + fs/yaffs2/yaffs_summary.c | 1 + fs/yaffs2/yaffs_uboot_glue.c | 1 + fs/yaffs2/yaffs_yaffs1.c | 1 + fs/yaffs2/yaffs_yaffs2.c | 1 + fs/yaffs2/yaffsfs.c | 1 + include/asm-generic/gpio.h | 2 +- include/clk-uclass.h | 4 +- include/dm/device.h | 74 ---- include/dm/device_compat.h | 86 +++++ include/dm/devres.h | 4 + include/dma-uclass.h | 4 +- include/linux/clk-provider.h | 1 + include/linux/compat.h | 3 + include/linux/mtd/mtd.h | 4 +- include/linux/string.h | 7 +- include/mailbox-uclass.h | 4 +- include/malloc.h | 24 +- include/os.h | 22 +- include/phy.h | 1 + include/power-domain-uclass.h | 4 +- include/reset-uclass.h | 4 +- include/sound.h | 12 + lib/bch.c | 2 + lib/binman.c | 1 + lib/bzip2/bzlib.c | 1 + lib/crypto/asymmetric_type.c | 2 + lib/crypto/pkcs7_parser.c | 1 + lib/crypto/public_key.c | 2 + lib/crypto/rsa_helper.c | 1 + lib/crypto/x509_cert_parser.c | 1 + lib/crypto/x509_public_key.c | 2 + lib/efi/efi.c | 1 + lib/efi/efi_app.c | 1 + lib/efi/efi_stub.c | 1 + lib/efi_driver/efi_block_device.c | 1 + lib/efi_driver/efi_uclass.c | 1 + lib/efi_loader/efi_console.c | 1 + lib/efi_loader/efi_runtime.c | 1 + lib/fdtdec.c | 1 + lib/libavb/avb_cmdline.c | 1 + lib/libavb/avb_descriptor.c | 1 + lib/libavb/avb_rsa.c | 1 + lib/libavb/avb_slot_verify.c | 1 + lib/libavb/avb_sysdeps_posix.c | 1 + lib/libavb/avb_util.c | 1 + lib/linux_compat.c | 1 + lib/list_sort.c | 1 + lib/lmb.c | 1 + lib/rsa/rsa-sign.c | 1 + lib/rsa/rsa-verify.c | 1 + lib/string.c | 2 +- lib/zstd/decompress.c | 1 + lib/zstd/zstd_common.c | 1 + net/mdio-uclass.c | 3 + post/post.c | 1 + test/dm/clk.c | 1 + test/dm/devres.c | 1 + test/dm/dma.c | 1 + test/dm/gpio.c | 1 + test/dm/mailbox.c | 1 + test/dm/power-domain.c | 1 + test/dm/regmap.c | 1 + test/dm/reset.c | 1 + test/dm/sound.c | 1 + test/dm/spmi.c | 1 + test/dm/syscon.c | 1 + test/dm/tee.c | 1 + test/dm/test-fdt.c | 1 + test/dm/video.c | 1 + test/lib/lmb.c | 1 + test/unicode_ut.c | 1 + 646 files changed, 1411 insertions(+), 399 deletions(-) create mode 100644 arch/sandbox/include/asm/malloc.h delete mode 100644 drivers/video/fonts/nimbus_sans_l_regular.ttf create mode 100644 drivers/video/fonts/roboto_regular.ttf create mode 100644 include/dm/device_compat.h
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 1/33 sandbox: Sort the help options
At present options are presented in essentially random order. It is easier to browse them if they are sorted into alphabetical order. Adjust the help function to handle this.
---
arch/sandbox/cpu/start.c | 46 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-)
arch/sandbox/cpu/start.c +45 -1
@@ -9,13 +9,45 @@#include <os.h> #include <cli.h> #include <malloc.h> +#include <sort.h> #include <asm/getopt.h> #include <asm/io.h> #include <asm/sections.h> #include <asm/state.h> +#include <linux/ctype.h> DECLARE_GLOBAL_DATA_PTR ; +/* Compare two options so that they can be sorted into alphabetical order */ +static int h_compare_opt (const void *p1,const void *p2) +{ +const struct sandbox_cmdline_option *opt1 = p1; +const struct sandbox_cmdline_option *opt2 = p2; +const char *str1, *str2; +char flag1[2 ], flag2[2 ]; + + opt1 = *(struct sandbox_cmdline_option **)p1; + opt2 = *(struct sandbox_cmdline_option **)p2; + flag1[1 ] ='\0' ; + flag2[1 ] ='\0' ; + + *flag1 = opt1->flag_short <0x100 ? opt1->flag_short :'\0' ; + *flag2 = opt2->flag_short <0x100 ? opt2->flag_short :'\0' ; + + str1 = *flag1 ? flag1 : opt1->flag; + str2 = *flag2 ? flag2 : opt2->flag; + +/* +* Force lower-case flags to come before upper-case ones. We only +* support upper-case for short flags. +*/ +if (isalpha (*str1) &&isalpha (*str2) && +tolower (*str1) ==tolower (*str2)) +return isupper (*str1) -isupper (*str2); + +return strcasecmp (str1, str2); +} +int sandbox_early_getopt_check (void ) {struct sandbox_state *state =state_get_current ();
@@ -23,6 +55,8 @@ int sandbox_early_getopt_check(void)size_t num_options =__u_boot_sandbox_option_count ();size_t i;int max_arg_len, max_noarg_len; +struct sandbox_cmdline_option **sorted_opt; +int size;/* parse_err will be a string of the faulting option */ if (!state->parse_err)
@@ -45,8 +79,18 @@ int sandbox_early_getopt_check(void) max_arg_len =max ((int )strlen (sb_opt[i]->flag), max_arg_len); max_noarg_len = max_arg_len +7 ; +/* Sort the options */ + size =sizeof (*sorted_opt) * num_options; + sorted_opt =malloc (size); +if (!sorted_opt) { +printf ("No memory to sort options\n" ); +os_exit (1 ); + } +memcpy (sorted_opt, sb_opt, size); +qsort (sorted_opt, num_options,sizeof (*sorted_opt), h_compare_opt); +for (i =0 ; i < num_options; ++i) { -struct sandbox_cmdline_option *opt = sb_opt[i]; +struct sandbox_cmdline_option *opt = sorted_opt[i];/* first output the short flag if it has one */ if (opt->flag_short >=0x100 )
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 2/33 video: Support truetype fonts on a 32-bit display
In reply to Simon GlassAt present only a 16bpp display is supported for Truetype fonts. Add support for 32bpp also since this is quite common.
---
drivers/video/console_truetype.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
drivers/video/console_truetype.c +21 -0
@@ -286,6 +286,27 @@ static int console_truetype_putc_xy(struct udevice *dev, uint x, uint y, }break ; } +#endif +#ifdef CONFIG_VIDEO_BPP32 +case VIDEO_BPP32 : { +u32 *dst = (u32 *)line + xoff; +int i; + +for (i =0 ; i < width; i++) { +int val = *bits; +int out; + +if (vid_priv->colour_bg) + val =255 - val; + out = val | val <<8 | val <<16 ; +if (vid_priv->colour_fg) + *dst++ |= out; +else + *dst++ &= out; + bits++; + } +break ; + }#endif default :free (data);
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 2/33 video: Support truetype fonts on a 32-bit display
Hi Simon,
Quoted 4 lines · On Sun, 12 Jan 2020 12:05:53 -0700 Simon Glass sjg at chromium.org wrote:
At present only a 16bpp display is supported for Truetype fonts. Add support for 32bpp also since this is quite common.
Signed-off-by Simon Glass <[email protected]>
--
Anatolij
PATCH 3/33 video: sandbox: Enable all colour depths
In reply to Simon GlassFor sandbox we want to have the maximum possible build coverage, so enable all colour depths for video.
---
configs/sandbox64_defconfig | 1 - configs/sandbox_defconfig | 1 - configs/sandbox_flattree_defconfig | 1 - configs/sandbox_spl_defconfig | 1 - drivers/video/Kconfig | 4 +++- 5 files changed, 3 insertions(+), 5 deletions(-)
configs/sandbox64_defconfig +0 -1
@@ -189,7 +189,6 @@ CONFIG_USB_EMUL=y CONFIG_USB_KEYBOARD=y CONFIG_USB_KEYBOARD_FN_KEYS=y CONFIG_DM_VIDEO=y -CONFIG_VIDEO_BPP16=y CONFIG_CONSOLE_ROTATION=y CONFIG_CONSOLE_TRUETYPE=y CONFIG_CONSOLE_TRUETYPE_CANTORAONE=y
configs/sandbox_defconfig +0 -1
@@ -210,7 +210,6 @@ CONFIG_USB_EMUL=y CONFIG_USB_KEYBOARD=y CONFIG_USB_KEYBOARD_FN_KEYS=y CONFIG_DM_VIDEO=y -CONFIG_VIDEO_BPP16=y CONFIG_CONSOLE_ROTATION=y CONFIG_CONSOLE_TRUETYPE=y CONFIG_CONSOLE_TRUETYPE_CANTORAONE=y
configs/sandbox_flattree_defconfig +0 -1
@@ -169,7 +169,6 @@ CONFIG_USB_EMUL=y CONFIG_USB_KEYBOARD=y CONFIG_USB_KEYBOARD_FN_KEYS=y CONFIG_DM_VIDEO=y -CONFIG_VIDEO_BPP16=y CONFIG_CONSOLE_ROTATION=y CONFIG_CONSOLE_TRUETYPE=y CONFIG_CONSOLE_TRUETYPE_CANTORAONE=y
configs/sandbox_spl_defconfig +0 -1
@@ -188,7 +188,6 @@ CONFIG_USB_EMUL=y CONFIG_USB_KEYBOARD=y CONFIG_USB_KEYBOARD_FN_KEYS=y CONFIG_DM_VIDEO=y -CONFIG_VIDEO_BPP16=y CONFIG_CONSOLE_ROTATION=y CONFIG_CONSOLE_TRUETYPE=y CONFIG_CONSOLE_TRUETYPE_CANTORAONE=y
drivers/video/Kconfig +3 -1
@@ -38,6 +38,7 @@ config BACKLIGHT_GPIO config VIDEO_BPP8 bool "Support 8-bit-per-pixel displays" depends on DM_VIDEO + default y if SANDBOX || X86 help Support drawing text and bitmaps onto a 8-bit-per-pixel display. Enabling this will include code to support this display. Without
@@ -47,6 +48,7 @@ config VIDEO_BPP8 config VIDEO_BPP16 bool "Support 16-bit-per-pixel displays" depends on DM_VIDEO + default y if SANDBOX || X86 help Support drawing text and bitmaps onto a 16-bit-per-pixel display. Enabling this will include code to support this display. Without
@@ -56,7 +58,7 @@ config VIDEO_BPP16 config VIDEO_BPP32 bool "Support 32-bit-per-pixel displays" depends on DM_VIDEO - default y if X86 + default y if SANDBOX || X86 help Support drawing text and bitmaps onto a 32-bit-per-pixel display. Enabling this will include code to support this display. Without
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 3/33 video: sandbox: Enable all colour depths
Quoted 4 lines · On Sun, 12 Jan 2020 12:05:54 -0700 Simon Glass sjg at chromium.org wrote:
For sandbox we want to have the maximum possible build coverage, so enable all colour depths for video.
Signed-off-by Simon Glass <[email protected]>
--
Anatolij
PATCH 4/33 mailbox: Rename free() to rfree()
In reply to Simon GlassThis function name conflicts with our desire to #define free() to something else on sandbox. Since it deals with resources, rename it to rfree().
---
drivers/mailbox/k3-sec-proxy.c | 2 +- drivers/mailbox/mailbox-uclass.c | 4 ++-- drivers/mailbox/sandbox-mbox.c | 2 +- drivers/mailbox/stm32-ipcc.c | 2 +- drivers/mailbox/tegra-hsp.c | 2 +- include/mailbox-uclass.h | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-)
drivers/mailbox/k3-sec-proxy.c +1 -1
@@ -291,7 +291,7 @@ static int k3_sec_proxy_recv(struct mbox_chan *chan, void *data)struct mbox_ops k3_sec_proxy_mbox_ops = { .of_xlate = k3_sec_proxy_of_xlate, .request = k3_sec_proxy_request, - .free = k3_sec_proxy_free, + .rfree = k3_sec_proxy_free, .send = k3_sec_proxy_send, .recv = k3_sec_proxy_recv, };
drivers/mailbox/mailbox-uclass.c +2 -2
@@ -105,8 +105,8 @@ int mbox_free(struct mbox_chan *chan)debug ("%s(chan=%p)\n" , __func__, chan); -if (ops->free) -return ops->free (chan); +if (ops->rfree) +return ops->rfree (chan);return 0 ; }
drivers/mailbox/sandbox-mbox.c +1 -1
@@ -87,7 +87,7 @@ static const struct udevice_id sandbox_mbox_ids[] = {struct mbox_ops sandbox_mbox_mbox_ops = { .request = sandbox_mbox_request, - .free = sandbox_mbox_free, + .rfree = sandbox_mbox_free, .send = sandbox_mbox_send, .recv = sandbox_mbox_recv, };
drivers/mailbox/stm32-ipcc.c +1 -1
@@ -152,7 +152,7 @@ static const struct udevice_id stm32_ipcc_ids[] = {struct mbox_ops stm32_ipcc_mbox_ops = { .request = stm32_ipcc_request, - .free = stm32_ipcc_free, + .rfree = stm32_ipcc_free, .send = stm32_ipcc_send, .recv = stm32_ipcc_recv, };
drivers/mailbox/tegra-hsp.c +1 -1
@@ -175,7 +175,7 @@ static const struct udevice_id tegra_hsp_ids[] = {struct mbox_ops tegra_hsp_mbox_ops = { .of_xlate = tegra_hsp_of_xlate, .request = tegra_hsp_request, - .free = tegra_hsp_free, + .rfree = tegra_hsp_free, .send = tegra_hsp_send, .recv = tegra_hsp_recv, };
include/mailbox-uclass.h +2 -2
@@ -49,14 +49,14 @@ struct mbox_ops {*/ int (*request)(struct mbox_chan *chan);/** -* free - Free a previously requested channel. +* rfree - Free a previously requested channel. * * This is the implementation of the client mbox_free() API. * * @chan: The channel to free. * @return 0 if OK, or a negative error code. */ -int (*free)(struct mbox_chan *chan); +int (*rfree)(struct mbox_chan *chan);/** * send - Send a message over a mailbox channel *
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 5/33 power-domain: Rename free() to rfree()
In reply to Simon GlassThis function name conflicts with our desire to #define free() to something else on sandbox. Since it deals with resources, rename it to rfree().
---
drivers/power/domain/bcm6328-power-domain.c | 2 +- drivers/power/domain/imx8-power-domain-legacy.c | 2 +- drivers/power/domain/imx8-power-domain.c | 2 +- drivers/power/domain/imx8m-power-domain.c | 2 +- drivers/power/domain/meson-ee-pwrc.c | 2 +- drivers/power/domain/meson-gx-pwrc-vpu.c | 2 +- drivers/power/domain/mtk-power-domain.c | 2 +- drivers/power/domain/power-domain-uclass.c | 2 +- drivers/power/domain/sandbox-power-domain.c | 2 +- drivers/power/domain/tegra186-power-domain.c | 2 +- drivers/power/domain/ti-sci-power-domain.c | 2 +- include/power-domain-uclass.h | 4 ++-- 12 files changed, 13 insertions(+), 13 deletions(-)
drivers/power/domain/bcm6328-power-domain.c +1 -1
@@ -62,7 +62,7 @@ static const struct udevice_id bcm6328_power_domain_ids[] = { };struct power_domain_ops bcm6328_power_domain_ops = { - .free = bcm6328_power_domain_free, + .rfree = bcm6328_power_domain_free, .off = bcm6328_power_domain_off, .on = bcm6328_power_domain_on, .request = bcm6328_power_domain_request,
drivers/power/domain/imx8-power-domain-legacy.c +1 -1
@@ -296,7 +296,7 @@ static const struct udevice_id imx8_power_domain_ids[] = {struct power_domain_ops imx8_power_domain_ops = { .request = imx8_power_domain_request, - .free = imx8_power_domain_free, + .rfree = imx8_power_domain_free, .on = imx8_power_domain_on, .off = imx8_power_domain_off, .of_xlate = imx8_power_domain_of_xlate,
drivers/power/domain/imx8-power-domain.c +1 -1
@@ -73,7 +73,7 @@ static const struct udevice_id imx8_power_domain_ids[] = {struct power_domain_ops imx8_power_domain_ops_v2 = { .request = imx8_power_domain_request, - .free = imx8_power_domain_free, + .rfree = imx8_power_domain_free, .on = imx8_power_domain_on, .off = imx8_power_domain_off, };
drivers/power/domain/imx8m-power-domain.c +1 -1
@@ -121,7 +121,7 @@ static const struct udevice_id imx8m_power_domain_ids[] = {struct power_domain_ops imx8m_power_domain_ops = { .request = imx8m_power_domain_request, - .free = imx8m_power_domain_free, + .rfree = imx8m_power_domain_free, .on = imx8m_power_domain_on, .off = imx8m_power_domain_off, .of_xlate = imx8m_power_domain_of_xlate,
drivers/power/domain/meson-ee-pwrc.c +1 -1
@@ -352,7 +352,7 @@ static int meson_ee_pwrc_of_xlate(struct power_domain *power_domain, }struct power_domain_ops meson_ee_pwrc_ops = { - .free = meson_ee_pwrc_free, + .rfree = meson_ee_pwrc_free, .off = meson_ee_pwrc_off, .on = meson_ee_pwrc_on, .request = meson_ee_pwrc_request,
drivers/power/domain/meson-gx-pwrc-vpu.c +1 -1
@@ -269,7 +269,7 @@ static int meson_pwrc_vpu_of_xlate(struct power_domain *power_domain, }struct power_domain_ops meson_gx_pwrc_vpu_ops = { - .free = meson_pwrc_vpu_free, + .rfree = meson_pwrc_vpu_free, .off = meson_pwrc_vpu_off, .on = meson_pwrc_vpu_on, .request = meson_pwrc_vpu_request,
drivers/power/domain/mtk-power-domain.c +1 -1
@@ -390,7 +390,7 @@ static const struct udevice_id mtk_power_domain_ids[] = { };struct power_domain_ops mtk_power_domain_ops = { - .free = scpsys_power_free, + .rfree = scpsys_power_free, .off = scpsys_power_off, .on = scpsys_power_on, .request = scpsys_power_request,
drivers/power/domain/power-domain-uclass.c +1 -1
@@ -87,7 +87,7 @@ int power_domain_free(struct power_domain *power_domain)debug ("%s(power_domain=%p)\n" , __func__, power_domain); -return ops->free (power_domain); +return ops->rfree (power_domain); }int power_domain_on (struct power_domain *power_domain)
drivers/power/domain/sandbox-power-domain.c +1 -1
@@ -75,7 +75,7 @@ static const struct udevice_id sandbox_power_domain_ids[] = {struct power_domain_ops sandbox_power_domain_ops = { .request = sandbox_power_domain_request, - .free = sandbox_power_domain_free, + .rfree = sandbox_power_domain_free, .on = sandbox_power_domain_on, .off = sandbox_power_domain_off, };
drivers/power/domain/tegra186-power-domain.c +1 -1
@@ -71,7 +71,7 @@ static int tegra186_power_domain_off(struct power_domain *power_domain)struct power_domain_ops tegra186_power_domain_ops = { .request = tegra186_power_domain_request, - .free = tegra186_power_domain_free, + .rfree = tegra186_power_domain_free, .on = tegra186_power_domain_on, .off = tegra186_power_domain_off, };
drivers/power/domain/ti-sci-power-domain.c +1 -1
@@ -120,7 +120,7 @@ static const struct udevice_id ti_sci_power_domain_of_match[] = {static struct power_domain_ops ti_sci_power_domain_ops = { .request = ti_sci_power_domain_request, - .free = ti_sci_power_domain_free, + .rfree = ti_sci_power_domain_free, .on = ti_sci_power_domain_on, .off = ti_sci_power_domain_off, .of_xlate = ti_sci_power_domain_of_xlate,
include/power-domain-uclass.h +2 -2
@@ -54,14 +54,14 @@ struct power_domain_ops {*/ int (*request)(struct power_domain *power_domain);/** -* free - Free a previously requested power domain. +* rfree - Free a previously requested power domain. * * This is the implementation of the client power_domain_free() API. * * @power_domain: The power domain to free. * @return 0 if OK, or a negative error code. */ -int (*free)(struct power_domain *power_domain); +int (*rfree)(struct power_domain *power_domain);/** * on - Power on a power domain. *
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 5/33 power-domain: Rename free() to rfree()
Quoted 5 lines · On Sun, 12 Jan 2020 12:05:56 -0700 Simon Glass sjg at chromium.org wrote:
This function name conflicts with our desire to #define
free()to something else on sandbox. Since it deals with resources, rename it torfree().Signed-off-by Simon Glass <[email protected]>
--
Anatolij
PATCH 6/33 reset: Rename free() to rfree()
In reply to Simon GlassThis function name conflicts with our desire to #define free() to something else on sandbox. Since it deals with resources, rename it to rfree().
---
drivers/reset/reset-bcm6345.c | 2 +- drivers/reset/reset-hisilicon.c | 2 +- drivers/reset/reset-hsdk.c | 2 +- drivers/reset/reset-imx7.c | 2 +- drivers/reset/reset-mediatek.c | 2 +- drivers/reset/reset-meson.c | 2 +- drivers/reset/reset-mtmips.c | 2 +- drivers/reset/reset-rockchip.c | 2 +- drivers/reset/reset-socfpga.c | 2 +- drivers/reset/reset-sunxi.c | 2 +- drivers/reset/reset-ti-sci.c | 2 +- drivers/reset/reset-uclass.c | 2 +- drivers/reset/reset-uniphier.c | 2 +- drivers/reset/sandbox-reset.c | 2 +- drivers/reset/sti-reset.c | 2 +- drivers/reset/stm32-reset.c | 2 +- drivers/reset/tegra-car-reset.c | 2 +- drivers/reset/tegra186-reset.c | 2 +- include/reset-uclass.h | 4 ++-- 19 files changed, 20 insertions(+), 20 deletions(-)
drivers/reset/reset-bcm6345.c +1 -1
@@ -52,7 +52,7 @@ static int bcm6345_reset_request(struct reset_ctl *rst) }struct reset_ops bcm6345_reset_reset_ops = { - .free = bcm6345_reset_free, + .rfree = bcm6345_reset_free, .request = bcm6345_reset_request, .rst_assert = bcm6345_reset_assert, .rst_deassert = bcm6345_reset_deassert,
drivers/reset/reset-hisilicon.c +1 -1
@@ -72,7 +72,7 @@ static int hisi_reset_of_xlate(struct reset_ctl *rst,static const struct reset_ops hisi_reset_reset_ops = { .of_xlate = hisi_reset_of_xlate, .request = hisi_reset_request, - .free = hisi_reset_free, + .rfree = hisi_reset_free, .rst_assert = hisi_reset_assert, .rst_deassert = hisi_reset_deassert, };
drivers/reset/reset-hsdk.c +1 -1
@@ -81,7 +81,7 @@ static int hsdk_reset_noop(struct reset_ctl *rst_ctl)static const struct reset_ops hsdk_reset_ops = { .request = hsdk_reset_noop, - .free = hsdk_reset_noop, + .rfree = hsdk_reset_noop, .rst_assert = hsdk_reset_noop, .rst_deassert = hsdk_reset_reset, };
drivers/reset/reset-imx7.c +1 -1
@@ -272,7 +272,7 @@ static int imx7_reset_request(struct reset_ctl *rst)static const struct reset_ops imx7_reset_reset_ops = { .request = imx7_reset_request, - .free = imx7_reset_free, + .rfree = imx7_reset_free, .rst_assert = imx7_reset_assert, .rst_deassert = imx7_reset_deassert, };
drivers/reset/reset-mediatek.c +1 -1
@@ -55,7 +55,7 @@ static int mediatek_reset_deassert(struct reset_ctl *reset_ctl)struct reset_ops mediatek_reset_ops = { .request = mediatek_reset_request, - .free = mediatek_reset_free, + .rfree = mediatek_reset_free, .rst_assert = mediatek_reset_assert, .rst_deassert = mediatek_reset_deassert, };
drivers/reset/reset-meson.c +1 -1
@@ -62,7 +62,7 @@ static int meson_reset_deassert(struct reset_ctl *reset_ctl)struct reset_ops meson_reset_ops = { .request = meson_reset_request, - .free = meson_reset_free, + .rfree = meson_reset_free, .rst_assert = meson_reset_assert, .rst_deassert = meson_reset_deassert, };
drivers/reset/reset-mtmips.c +1 -1
@@ -45,7 +45,7 @@ static int mtmips_reset_deassert(struct reset_ctl *reset_ctl)static const struct reset_ops mtmips_reset_ops = { .request = mtmips_reset_request, - .free = mtmips_reset_free, + .rfree = mtmips_reset_free, .rst_assert = mtmips_reset_assert, .rst_deassert = mtmips_reset_deassert, };
drivers/reset/reset-rockchip.c +1 -1
@@ -76,7 +76,7 @@ static int rockchip_reset_deassert(struct reset_ctl *reset_ctl)struct reset_ops rockchip_reset_ops = { .request = rockchip_reset_request, - .free = rockchip_reset_free, + .rfree = rockchip_reset_free, .rst_assert = rockchip_reset_assert, .rst_deassert = rockchip_reset_deassert, };
drivers/reset/reset-socfpga.c +1 -1
@@ -101,7 +101,7 @@ static int socfpga_reset_free(struct reset_ctl *reset_ctl)static const struct reset_ops socfpga_reset_ops = { .request = socfpga_reset_request, - .free = socfpga_reset_free, + .rfree = socfpga_reset_free, .rst_assert = socfpga_reset_assert, .rst_deassert = socfpga_reset_deassert, };
drivers/reset/reset-sunxi.c +1 -1
@@ -81,7 +81,7 @@ static int sunxi_reset_deassert(struct reset_ctl *reset_ctl)struct reset_ops sunxi_reset_ops = { .request = sunxi_reset_request, - .free = sunxi_reset_free, + .rfree = sunxi_reset_free, .rst_assert = sunxi_reset_assert, .rst_deassert = sunxi_reset_deassert, };
drivers/reset/reset-ti-sci.c +1 -1
@@ -190,7 +190,7 @@ static const struct udevice_id ti_sci_reset_of_match[] = {static struct reset_ops ti_sci_reset_ops = { .of_xlate = ti_sci_reset_of_xlate, .request = ti_sci_reset_request, - .free = ti_sci_reset_free, + .rfree = ti_sci_reset_free, .rst_assert = ti_sci_reset_assert, .rst_deassert = ti_sci_reset_deassert, .rst_status = ti_sci_reset_status,
drivers/reset/reset-uclass.c +1 -1
@@ -164,7 +164,7 @@ int reset_free(struct reset_ctl *reset_ctl)debug ("%s(reset_ctl=%p)\n" , __func__, reset_ctl); -return ops->free (reset_ctl); +return ops->rfree (reset_ctl); }int reset_assert (struct reset_ctl *reset_ctl)
drivers/reset/reset-uniphier.c +1 -1
@@ -234,7 +234,7 @@ static int uniphier_reset_deassert(struct reset_ctl *reset_ctl)static const struct reset_ops uniphier_reset_ops = { .request = uniphier_reset_request, - .free = uniphier_reset_free, + .rfree = uniphier_reset_free, .rst_assert = uniphier_reset_assert, .rst_deassert = uniphier_reset_deassert, };
drivers/reset/sandbox-reset.c +1 -1
@@ -79,7 +79,7 @@ static const struct udevice_id sandbox_reset_ids[] = {struct reset_ops sandbox_reset_reset_ops = { .request = sandbox_reset_request, - .free = sandbox_reset_free, + .rfree = sandbox_reset_free, .rst_assert = sandbox_reset_assert, .rst_deassert = sandbox_reset_deassert, };
drivers/reset/sti-reset.c +1 -1
@@ -298,7 +298,7 @@ static int sti_reset_deassert(struct reset_ctl *reset_ctl)struct reset_ops sti_reset_ops = { .request = sti_reset_request, - .free = sti_reset_free, + .rfree = sti_reset_free, .rst_assert = sti_reset_assert, .rst_deassert = sti_reset_deassert, };
drivers/reset/stm32-reset.c +1 -1
@@ -64,7 +64,7 @@ static int stm32_reset_deassert(struct reset_ctl *reset_ctl)static const struct reset_ops stm32_reset_ops = { .request = stm32_reset_request, - .free = stm32_reset_free, + .rfree = stm32_reset_free, .rst_assert = stm32_reset_assert, .rst_deassert = stm32_reset_deassert, };
drivers/reset/tegra-car-reset.c +1 -1
@@ -51,7 +51,7 @@ static int tegra_car_reset_deassert(struct reset_ctl *reset_ctl)struct reset_ops tegra_car_reset_ops = { .request = tegra_car_reset_request, - .free = tegra_car_reset_free, + .rfree = tegra_car_reset_free, .rst_assert = tegra_car_reset_assert, .rst_deassert = tegra_car_reset_deassert, };
drivers/reset/tegra186-reset.c +1 -1
@@ -60,7 +60,7 @@ static int tegra186_reset_deassert(struct reset_ctl *reset_ctl)struct reset_ops tegra186_reset_ops = { .request = tegra186_reset_request, - .free = tegra186_reset_free, + .rfree = tegra186_reset_free, .rst_assert = tegra186_reset_assert, .rst_deassert = tegra186_reset_deassert, };
include/reset-uclass.h +2 -2
@@ -51,14 +51,14 @@ struct reset_ops {*/ int (*request)(struct reset_ctl *reset_ctl);/** -* free - Free a previously requested reset control. +* rfree - Free a previously requested reset control. * * This is the implementation of the client reset_free() API. * * @reset_ctl: The reset control to free. * @return 0 if OK, or a negative error code. */ -int (*free)(struct reset_ctl *reset_ctl); +int (*rfree)(struct reset_ctl *reset_ctl);/** * rst_assert - Assert a reset signal. *
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 7/33 gpio: Rename free() to rfree()
In reply to Simon GlassThis function name conflicts with our desire to #define free() to something else on sandbox. Since it deals with resources, rename it to rfree().
---
drivers/gpio/gpio-rcar.c | 2 +- drivers/gpio/gpio-uclass.c | 4 ++-- include/asm-generic/gpio.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpio/gpio-rcar.c +1 -1
@@ -128,7 +128,7 @@ static int rcar_gpio_free(struct udevice *dev, unsigned offset)static const struct dm_gpio_ops rcar_gpio_ops = { .request = rcar_gpio_request, - .free = rcar_gpio_free, + .rfree = rcar_gpio_free, .direction_input = rcar_gpio_direction_input, .direction_output = rcar_gpio_direction_output, .get_value = rcar_gpio_get_value,
drivers/gpio/gpio-uclass.c +2 -2
@@ -364,8 +364,8 @@ int _dm_gpio_free(struct udevice *dev, uint offset) uc_priv =dev_get_uclass_priv (dev);if (!uc_priv->name[offset])return -ENXIO ; -if (gpio_get_ops (dev)->free) { - ret =gpio_get_ops (dev)->free (dev, offset); +if (gpio_get_ops (dev)->rfree) { + ret =gpio_get_ops (dev)->rfree (dev, offset);if (ret)return ret; }
include/asm-generic/gpio.h +1 -1
@@ -248,7 +248,7 @@ int gpio_xlate_offs_flags(struct udevice *dev, struct gpio_desc *desc,*/ struct dm_gpio_ops {int (*request)(struct udevice *dev,unsigned offset,const char *label); -int (*free)(struct udevice *dev,unsigned offset); +int (*rfree)(struct udevice *dev,unsigned int offset);int (*direction_input)(struct udevice *dev,unsigned offset);int (*direction_output)(struct udevice *dev,unsigned offset,int value);
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 8/33 clk: Rename free() to rfree()
In reply to Simon GlassThis function name conflicts with our desire to #define free() to something else on sandbox. Since it deals with resources, rename it to rfree().
---
drivers/clk/clk-ti-sci.c | 2 +- drivers/clk/clk-uclass.c | 4 ++-- drivers/clk/clk_sandbox.c | 2 +- drivers/clk/tegra/tegra-car-clk.c | 2 +- include/clk-uclass.h | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-)
drivers/clk/clk-ti-sci.c +1 -1
@@ -204,7 +204,7 @@ static const struct udevice_id ti_sci_clk_of_match[] = {static struct clk_ops ti_sci_clk_ops = { .of_xlate = ti_sci_clk_of_xlate, .request = ti_sci_clk_request, - .free = ti_sci_clk_free, + .rfree = ti_sci_clk_free, .get_rate = ti_sci_clk_get_rate, .set_rate = ti_sci_clk_set_rate, .set_parent = ti_sci_clk_set_parent,
drivers/clk/clk-uclass.c +2 -2
@@ -395,10 +395,10 @@ int clk_free(struct clk *clk)return 0 ; ops =clk_dev_ops (clk->dev); -if (!ops->free) +if (!ops->rfree)return 0 ; -return ops->free (clk); +return ops->rfree (clk); }ulong clk_get_rate (struct clk *clk)
drivers/clk/clk_sandbox.c +1 -1
@@ -107,7 +107,7 @@ static struct clk_ops sandbox_clk_ops = { .enable = sandbox_clk_enable, .disable = sandbox_clk_disable, .request = sandbox_clk_request, - .free = sandbox_clk_free, + .rfree = sandbox_clk_free, };static int sandbox_clk_probe (struct udevice *dev)
drivers/clk/tegra/tegra-car-clk.c +1 -1
@@ -80,7 +80,7 @@ static int tegra_car_clk_disable(struct clk *clk)static struct clk_ops tegra_car_clk_ops = { .request = tegra_car_clk_request, - .free = tegra_car_clk_free, + .rfree = tegra_car_clk_free, .get_rate = tegra_car_clk_get_rate, .set_rate = tegra_car_clk_set_rate, .enable = tegra_car_clk_enable,
include/clk-uclass.h +2 -2
@@ -53,14 +53,14 @@ struct clk_ops {*/ int (*request)(struct clk *clock);/** -* free - Free a previously requested clock. +* rfree - Free a previously requested clock. * * This is the implementation of the client clk_free() API. * * @clock: The clock to free. * @return 0 if OK, or a negative error code. */ -int (*free)(struct clk *clock); +int (*rfree)(struct clk *clock);/** * get_rate() - Get current clock rate. *
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 9/33 dma: Rename free() to rfree()
In reply to Simon GlassThis function name conflicts with our desire to #define free() to something else on sandbox. Since it deals with resources, rename it to rfree().
---
drivers/dma/dma-uclass.c | 4 ++-- drivers/dma/sandbox-dma-test.c | 2 +- drivers/dma/ti/k3-udma.c | 2 +- include/dma-uclass.h | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-)
drivers/dma/dma-uclass.c +2 -2
@@ -122,10 +122,10 @@ int dma_free(struct dma *dma)debug ("%s(dma=%p)\n" , __func__, dma); -if (!ops->free) +if (!ops->rfree)return 0 ; -return ops->free (dma); +return ops->rfree (dma); }int dma_enable (struct dma *dma)
drivers/dma/sandbox-dma-test.c +1 -1
@@ -229,7 +229,7 @@ static const struct dma_ops sandbox_dma_ops = { .transfer = sandbox_dma_transfer, .of_xlate = sandbox_dma_of_xlate, .request = sandbox_dma_request, - .free = sandbox_dma_free, + .rfree = sandbox_dma_free, .enable = sandbox_dma_enable, .disable = sandbox_dma_disable, .send = sandbox_dma_send,
drivers/dma/ti/k3-udma.c +1 -1
@@ -1720,7 +1720,7 @@ static const struct dma_ops udma_ops = { .transfer = udma_transfer, .of_xlate = udma_of_xlate, .request = udma_request, - .free = udma_free, + .rfree = udma_free, .enable = udma_enable, .disable = udma_disable, .send = udma_send,
include/dma-uclass.h +2 -2
@@ -58,14 +58,14 @@ struct dma_ops {*/ int (*request)(struct dma *dma);/** -* free - Free a previously requested dma. +* rfree - Free a previously requested dma. * * This is the implementation of the client dma_free() API. * * @dma: The DMA to free. * @return 0 if OK, or a negative error code. */ -int (*free)(struct dma *dma); +int (*rfree)(struct dma *dma);/** * enable() - Enable a DMA Channel. *
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 9/33 dma: Rename free() to rfree()
Hi Simon,
Quoted 35 lines · Simon Glass
This function name conflicts with our desire to #define
free()to something else on sandbox. Since it deals with resources, rename it torfree().Signed-off-by Simon Glass <[email protected]>---
drivers/dma/dma-uclass.c | 4 ++-- drivers/dma/sandbox-dma-test.c | 2 +- drivers/dma/ti/k3-udma.c | 2 +- include/dma-uclass.h | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-)drivers/dma/dma-uclass.c +2
-2@@ -122,10 +122,10 @@ int dma_free(struct dma *dma)debug ("%s(dma=%p)\n" , __func__, dma); -if (!ops->free) +if (!ops->rfree)return 0 ; -return ops->free (dma); +return ops->rfree (dma); }int dma_enable (struct dma *dma)drivers/dma/sandbox-dma-test.c +0
-0
drivers/dma/sandbox-dma-test.c static const struct dma_ops sandbox_dma_ops = { · line 232
Quoted 5 lines
drivers/dma/sandbox-dma-test.c +1
-1@@ -229,7 +229,7 @@ static const struct dma_ops sandbox_dma_ops = { .transfer = sandbox_dma_transfer, .of_xlate = sandbox_dma_of_xlate, .request = sandbox_dma_request, - .free = sandbox_dma_free, + .rfree = sandbox_dma_free,
Please also change the name of the implementing callback function:
s/sandbox_dma_free/sandbox_dma_rfree
drivers/dma/ti/k3-udma.c static const struct dma_ops udma_ops = { · line 1723
Quoted 13 lines
drivers/dma/sandbox-dma-test.c +0
-0.enable = sandbox_dma_enable, .disable = sandbox_dma_disable, .send = sandbox_dma_send,drivers/dma/ti/k3-udma.c +1
-1@@ -1720,7 +1720,7 @@ static const struct dma_ops udma_ops = { .transfer = udma_transfer, .of_xlate = udma_of_xlate, .request = udma_request, - .free = udma_free, + .rfree = udma_free,
Same here.
Quoted 15 lines
drivers/dma/ti/k3-udma.c +0
-0.enable = udma_enable, .disable = udma_disable, .send = udma_send,include/dma-uclass.h +1
-1@@ -58,14 +58,14 @@ struct dma_ops {*/ int (*request)(struct dma *dma);/** -* free - Free a previously requested dma. +* rfree - Free a previously requested dma. *
include/dma-uclass.h struct dma_ops { · line 71
Quoted 10 lines
include/dma-uclass.h +1
-1* This is the implementation of the client dma_free() API. * * @dma: The DMA to free. * @return 0 if OK, or a negative error code. */ -int (*free)(struct dma *dma); +int (*rfree)(struct dma *dma);/** * enable() - Enable a DMA Channel. *
- Péter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
PATCH 10/33 mtd: Rename free() to rfree()
In reply to Simon GlassThis function name conflicts with our desire to #define free() to something else on sandbox. Since it deals with resources, rename it to rfree().
---
drivers/mtd/mtdcore.c | 4 ++-- drivers/mtd/nand/raw/denali.c | 2 +- drivers/mtd/nand/spi/core.c | 2 +- drivers/mtd/nand/spi/gigadevice.c | 2 +- drivers/mtd/nand/spi/macronix.c | 2 +- drivers/mtd/nand/spi/micron.c | 2 +- drivers/mtd/nand/spi/winbond.c | 2 +- include/linux/mtd/mtd.h | 4 ++-- 8 files changed, 10 insertions(+), 10 deletions(-)
drivers/mtd/mtdcore.c +2 -2
@@ -1179,10 +1179,10 @@ int mtd_ooblayout_free(struct mtd_info *mtd, int section,if (!mtd || section <0 )return -EINVAL ; -if (!mtd->ooblayout || !mtd->ooblayout->free) +if (!mtd->ooblayout || !mtd->ooblayout->rfree)return -ENOTSUPP ; -return mtd->ooblayout->free (mtd, section, oobfree); +return mtd->ooblayout->rfree (mtd, section, oobfree); }EXPORT_SYMBOL_GPL (mtd_ooblayout_free);
drivers/mtd/nand/raw/denali.c +1 -1
@@ -1178,7 +1178,7 @@ static int denali_ooblayout_free(struct mtd_info *mtd, int section,static const struct mtd_ooblayout_ops denali_ooblayout_ops = { .ecc = denali_ooblayout_ecc, - .free = denali_ooblayout_free, + .rfree = denali_ooblayout_free, };static int denali_multidev_fixup (struct denali_nand_info *denali)
drivers/mtd/nand/spi/core.c +1 -1
@@ -1021,7 +1021,7 @@ static int spinand_noecc_ooblayout_free(struct mtd_info *mtd, int section,static const struct mtd_ooblayout_ops spinand_noecc_ooblayout = { .ecc = spinand_noecc_ooblayout_ecc, - .free = spinand_noecc_ooblayout_free, + .rfree = spinand_noecc_ooblayout_free, };static int spinand_init (struct spinand_device *spinand)
drivers/mtd/nand/spi/gigadevice.c +1 -1
@@ -103,7 +103,7 @@ static int gd5fxgq4xexxg_ecc_get_status(struct spinand_device *spinand,static const struct mtd_ooblayout_ops gd5fxgq4xexxg_ooblayout = { .ecc = gd5fxgq4xexxg_ooblayout_ecc, - .free = gd5fxgq4xexxg_ooblayout_free, + .rfree = gd5fxgq4xexxg_ooblayout_free, };static const struct spinand_info gigadevice_spinand_table[] = {
drivers/mtd/nand/spi/macronix.c +1 -1
@@ -47,7 +47,7 @@ static int mx35lfxge4ab_ooblayout_free(struct mtd_info *mtd, int section,static const struct mtd_ooblayout_ops mx35lfxge4ab_ooblayout = { .ecc = mx35lfxge4ab_ooblayout_ecc, - .free = mx35lfxge4ab_ooblayout_free, + .rfree = mx35lfxge4ab_ooblayout_free, };static int mx35lf1ge4ab_get_eccsr (struct spinand_device *spinand,u8 *eccsr)
drivers/mtd/nand/spi/micron.c +1 -1
@@ -63,7 +63,7 @@ static int mt29f2g01abagd_ooblayout_free(struct mtd_info *mtd, int section,static const struct mtd_ooblayout_ops mt29f2g01abagd_ooblayout = { .ecc = mt29f2g01abagd_ooblayout_ecc, - .free = mt29f2g01abagd_ooblayout_free, + .rfree = mt29f2g01abagd_ooblayout_free, }; static int mt29f2g01abagd_ecc_get_status(struct spinand_device *spinand,
drivers/mtd/nand/spi/winbond.c +1 -1
@@ -59,7 +59,7 @@ static int w25m02gv_ooblayout_free(struct mtd_info *mtd, int section,static const struct mtd_ooblayout_ops w25m02gv_ooblayout = { .ecc = w25m02gv_ooblayout_ecc, - .free = w25m02gv_ooblayout_free, + .rfree = w25m02gv_ooblayout_free, }; static int w25m02gv_select_target(struct spinand_device *spinand,
include/linux/mtd/mtd.h +2 -2
@@ -129,8 +129,8 @@ struct mtd_oob_region {struct mtd_ooblayout_ops {int (*ecc)(struct mtd_info *mtd,int section,struct mtd_oob_region *oobecc); -int (*free)(struct mtd_info *mtd,int section, -struct mtd_oob_region *oobfree); +int (*rfree)(struct mtd_info *mtd,int section, +struct mtd_oob_region *oobfree); };/*
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 10/33 mtd: Rename free() to rfree()
Quoted 6 lines · Simon Glass
This function name conflicts with our desire to #define
free()to something else on sandbox. Since it deals with resources, rename it torfree().Signed-off-by Simon Glass <[email protected]>
I noticed this commit was merged recently.
Now 'free' is a reserved keyword
you cannot use in U-Boot.
Commit cc92c3c thru cf23c7c are horrible.
Commit cfda60f should have used
'static inline' instead of #define.
I cannot believe it.
Quoted 125 lines
---
drivers/mtd/mtdcore.c | 4 ++-- drivers/mtd/nand/raw/denali.c | 2 +- drivers/mtd/nand/spi/core.c | 2 +- drivers/mtd/nand/spi/gigadevice.c | 2 +- drivers/mtd/nand/spi/macronix.c | 2 +- drivers/mtd/nand/spi/micron.c | 2 +- drivers/mtd/nand/spi/winbond.c | 2 +- include/linux/mtd/mtd.h | 4 ++-- 8 files changed, 10 insertions(+), 10 deletions(-)drivers/mtd/mtdcore.c +2
-2@@ -1179,10 +1179,10 @@ int mtd_ooblayout_free(struct mtd_info *mtd, int section,if (!mtd || section <0 )return -EINVAL ; -if (!mtd->ooblayout || !mtd->ooblayout->free) +if (!mtd->ooblayout || !mtd->ooblayout->rfree)return -ENOTSUPP ; -return mtd->ooblayout->free (mtd, section, oobfree); +return mtd->ooblayout->rfree (mtd, section, oobfree); }EXPORT_SYMBOL_GPL (mtd_ooblayout_free);drivers/mtd/nand/raw/denali.c +1
-1@@ -1178,7 +1178,7 @@ static int denali_ooblayout_free(struct mtd_info *mtd, int section,static const struct mtd_ooblayout_ops denali_ooblayout_ops = { .ecc = denali_ooblayout_ecc, - .free = denali_ooblayout_free, + .rfree = denali_ooblayout_free, };static int denali_multidev_fixup (struct denali_nand_info *denali)drivers/mtd/nand/spi/core.c +1
-1@@ -1021,7 +1021,7 @@ static int spinand_noecc_ooblayout_free(struct mtd_info *mtd, int section,static const struct mtd_ooblayout_ops spinand_noecc_ooblayout = { .ecc = spinand_noecc_ooblayout_ecc, - .free = spinand_noecc_ooblayout_free, + .rfree = spinand_noecc_ooblayout_free, };static int spinand_init (struct spinand_device *spinand)drivers/mtd/nand/spi/gigadevice.c +1
-1@@ -103,7 +103,7 @@ static int gd5fxgq4xexxg_ecc_get_status(struct spinand_device *spinand,static const struct mtd_ooblayout_ops gd5fxgq4xexxg_ooblayout = { .ecc = gd5fxgq4xexxg_ooblayout_ecc, - .free = gd5fxgq4xexxg_ooblayout_free, + .rfree = gd5fxgq4xexxg_ooblayout_free, };static const struct spinand_info gigadevice_spinand_table[] = {drivers/mtd/nand/spi/macronix.c +1
-1@@ -47,7 +47,7 @@ static int mx35lfxge4ab_ooblayout_free(struct mtd_info *mtd, int section,static const struct mtd_ooblayout_ops mx35lfxge4ab_ooblayout = { .ecc = mx35lfxge4ab_ooblayout_ecc, - .free = mx35lfxge4ab_ooblayout_free, + .rfree = mx35lfxge4ab_ooblayout_free, };static int mx35lf1ge4ab_get_eccsr (struct spinand_device *spinand,u8 *eccsr)drivers/mtd/nand/spi/micron.c +1
-1@@ -63,7 +63,7 @@ static int mt29f2g01abagd_ooblayout_free(struct mtd_info *mtd, int section,static const struct mtd_ooblayout_ops mt29f2g01abagd_ooblayout = { .ecc = mt29f2g01abagd_ooblayout_ecc, - .free = mt29f2g01abagd_ooblayout_free, + .rfree = mt29f2g01abagd_ooblayout_free, }; static int mt29f2g01abagd_ecc_get_status(struct spinand_device *spinand,drivers/mtd/nand/spi/winbond.c +1
-1@@ -59,7 +59,7 @@ static int w25m02gv_ooblayout_free(struct mtd_info *mtd, int section,static const struct mtd_ooblayout_ops w25m02gv_ooblayout = { .ecc = w25m02gv_ooblayout_ecc, - .free = w25m02gv_ooblayout_free, + .rfree = w25m02gv_ooblayout_free, }; static int w25m02gv_select_target(struct spinand_device *spinand,include/linux/mtd/mtd.h +2
-3@@ -129,8 +129,8 @@ struct mtd_oob_region {struct mtd_ooblayout_ops {int (*ecc)(struct mtd_info *mtd,int section,struct mtd_oob_region *oobecc); -int (*free)(struct mtd_info *mtd,int section, -struct mtd_oob_region *oobfree); +int (*rfree)(struct mtd_info *mtd,int section, +struct mtd_oob_region *oobfree); };/* -- 2.25.0.rc1.283.g88dfdc4193-goog
Signature · 2 lines
Best Regards Masahiro Yamada
PATCH 10/33 mtd: Rename free() to rfree()
Hi Masahiro,
Quoted 16 lines · Masahiro Yamada
Quoted 6 lines · Simon Glass
This function name conflicts with our desire to #define
free()to something else on sandbox. Since it deals with resources, rename it torfree().Signed-off-by Simon Glass <[email protected]>I noticed this commit was merged recently.
Now 'free' is a reserved keyword
you cannot use in U-Boot.
Quoted 7 lines
Commit cc92c3c thru cf23c7c are horrible.
Commit cfda60f should have used
'static inline' instead of #define.I cannot believe it.
Are you sure you understand the problem I was trying to solve? I am using dlmalloc's existing means of adding a prefix, but I'm sure we could change it to another way.
If we define malloc() as dlmalloc() in dlmalloc.c, then we could add a declaration in dlmalloc.h that uses static inline to convert calls to malloc() to call dlmalloc(). Then anything that doesn't include malloc.h would still call the C library malloc(). Is that what you are thinking?
I did look at using a link script instead but it is pretty messy.
What do you mean by 'free' being a reserved keyword? Where? So is 'rfree' a good substitute or do you suggest something else?
Regards,
Simon
PATCH 10/33 mtd: Rename free() to rfree()
Quoted 32 lines · Simon Glass
Hi Masahiro,
Quoted 16 lines · Masahiro Yamada
Quoted 6 lines · Simon Glass
This function name conflicts with our desire to #define
free()to something else on sandbox. Since it deals with resources, rename it torfree().Signed-off-by Simon Glass <[email protected]>I noticed this commit was merged recently.
Now 'free' is a reserved keyword
you cannot use in U-Boot.Quoted 7 lines
Commit cc92c3c thru cf23c7c are horrible.
Commit cfda60f should have used
'static inline' instead of #define.I cannot believe it.
Are you sure you understand the problem I was trying to solve? I am using dlmalloc's existing means of adding a prefix, but I'm sure we could change it to another way.
Quoted 5 lines
If we define
malloc()asdlmalloc()indlmalloc.c, then we could add a declaration indlmalloc.hthat uses static inline to convert calls tomalloc()to calldlmalloc(). Then anything that doesn't includemalloc.hwould still call the C librarymalloc(). Is that what you are thinking?
There is no "malloc()" in dlmalloc.c. It is called "mALLOc()" and by defining USE_DL_PREFIX, you already have converted that to be linked as "dlmalloc()".
I think there should be no difference in who calls what when converting your defines to static inline functions.
And yes, I also dislike the other patches that remove all occurrences of 'free'. I think without knowing the backgrounds of your patches, that just looks strange.
Regards,
Simon
Quoted 8 lines
I did look at using a link script instead but it is pretty messy.
What do you mean by 'free' being a reserved keyword? Where? So is 'rfree' a good substitute or do you suggest something else?
Regards,
Simon
PATCH 10/33 mtd: Rename free() to rfree()
Hi Simon,
Quoted 43 lines · Simon Goldschmidt
Quoted 32 lines · Simon Glass
Hi Masahiro,
Quoted 16 lines · Masahiro Yamada
Quoted 6 lines · Simon Glass
This function name conflicts with our desire to #define
free()to something else on sandbox. Since it deals with resources, rename it torfree().Signed-off-by Simon Glass <[email protected]>I noticed this commit was merged recently.
Now 'free' is a reserved keyword
you cannot use in U-Boot.Quoted 7 lines
Commit cc92c3c thru cf23c7c are horrible.
Commit cfda60f should have used
'static inline' instead of #define.I cannot believe it.
Are you sure you understand the problem I was trying to solve? I am using dlmalloc's existing means of adding a prefix, but I'm sure we could change it to another way.
Quoted 5 lines
If we define
malloc()asdlmalloc()indlmalloc.c, then we could add a declaration indlmalloc.hthat uses static inline to convert calls tomalloc()to calldlmalloc(). Then anything that doesn't includemalloc.hwould still call the C librarymalloc(). Is that what you are thinking?There is no "
malloc()" indlmalloc.c. It is called "mALLOc()" and by definingUSE_DL_PREFIX, you already have converted that to be linked as "dlmalloc()".
Quoted 6 lines
I think there should be no difference in who calls what when converting your defines to static inline functions.
And yes, I also dislike the other patches that remove all occurrences of 'free'. I think without knowing the backgrounds of your patches, that just looks strange.
OK I think that will work. I was trying to use what is there already, but it is a bit ugly.
Regards,
Simon
PATCH 11/33 sandbox: Rename 'free' variable
In reply to Simon GlassThis name conflicts with our desire to #define free() to something else on sandbox. Rename it.
---
arch/sandbox/cpu/state.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/sandbox/cpu/state.c +3 -3
@@ -16,14 +16,14 @@ static struct sandbox_state *state; /* Pointer to current state record */static int state_ensure_space (int extra_size) {void *blob = state->state_fdt; -int used, size, free; +int used, size, free_bytes;void *buf;int ret; used =fdt_off_dt_strings (blob) +fdt_size_dt_strings (blob); size =fdt_totalsize (blob); - free = size - used; -if (free > extra_size) + free_bytes = size - used; +if (free_bytes > extra_size)return 0 ; size = used + extra_size;
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 12/33 sandbox: Use a prefix for all allocation functions
In reply to Simon GlassIn order to allow use of both U-Boot's malloc() and the C library's version, set a prefix for the allocation functions so that they can co-exist.
This is only done for sandbox. For other archs everything remains the same.
---
include/malloc.h | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-)
include/malloc.h +22 -2
@@ -788,8 +788,13 @@ struct mallinfo {*/ -/* #define USE_DL_PREFIX */ - +/* +* Rename the U-Boot alloc functions so that sandbox can still use the system +* ones +*/ +#ifdef CONFIG_SANDBOX +#define USE_DL_PREFIX +#endif /*
@@ -892,6 +897,21 @@ void malloc_simple_info(void);# define pvALLOc dlpvalloc# define mALLINFo dlmallinfo# define mALLOPt dlmallopt + +/* Ensure that U-Boot actually uses these too */ +#define calloc dlcalloc +#define free (ptr) dlfree(ptr) +#define malloc (x) dlmalloc(x) +#define memalign dlmemalign +#define realloc dlrealloc +#define valloc dlvalloc +#define pvalloc dlpvalloc +#define mallinfo () dlmallinfo() +#define mallopt dlmallopt +#define malloc_trim dlmalloc_trim +#define malloc_usable_size dlmalloc_usable_size +#define malloc_stats dlmalloc_stats +# else /* USE_DL_PREFIX */ # define cALLOc calloc# define fREe free
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 13/33 exports: Add the malloc.h header
In reply to Simon GlassThis file should include the malloc.h header since it references malloc(). Fix it.
---
common/exports.c | 1 + 1 file changed, 1 insertion(+)
common/exports.c +1 -0
@@ -1,5 +1,6 @@#include <common.h> #include <exports.h> +#include <malloc.h> #include <spi.h> #include <i2c.h>
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 14/33 string: Allow arch override of strndup() also
In reply to Simon GlassAt present architectures can override strdup() but not strndup(). Use the same option for both.
---
include/linux/string.h | 2 +- lib/string.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
include/linux/string.h +1 -1
@@ -93,8 +93,8 @@ size_t strcspn(const char *s, const char *reject);#ifndef __HAVE_ARCH_STRDUPextern char *strdup (const char *); -#endif extern char *strndup (const char *,size_t ); +#endif #ifndef __HAVE_ARCH_STRSWABextern char *strswab (const char *);#endif
lib/string.c +1 -1
@@ -324,7 +324,6 @@ char * strdup(const char *s)strcpy (new, s);return new; } -#endif char *strndup (const char *s,size_t n) {
@@ -348,6 +347,7 @@ char * strndup(const char *s, size_t n) return new; } +#endif #ifndef __HAVE_ARCH_STRSPN/**
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 15/33 sandbox: Rename strdup() functions
In reply to Simon GlassThese functions include calls to a memory-allocation routine and so need to use the system routine when called from a library.
To preserve access to these functions for libraries that need it, such as SDL, rename these functions within U-Boot.
---
include/linux/string.h | 5 +++++ 1 file changed, 5 insertions(+)
include/linux/string.h +5 -0
@@ -91,6 +91,11 @@ extern __kernel_size_t strnlen(const char *,__kernel_size_t);size_t strcspn (const char *s,const char *reject);#endif +#ifdef CONFIG_SANDBOX +# define strdup sandbox_strdup +# define strndup sandbox_strndup +#endif +#ifndef __HAVE_ARCH_STRDUPextern char *strdup (const char *);extern char *strndup (const char *,size_t );
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 16/33 sandbox: Drop use of special os_malloc() where possible
In reply to Simon GlassSome sandbox files are not built with U-Boot headers, so with the renamed malloc functions there is now no need to use the special os_... allocation functions to access the system routines. Instead we can just call them directly.
Update the affected files accordingly.
---
arch/sandbox/cpu/eth-raw-os.c | 6 +++--- arch/sandbox/cpu/os.c | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-)
arch/sandbox/cpu/eth-raw-os.c +3 -3
@@ -74,7 +74,7 @@ static int _raw_packet_start(struct eth_sandbox_raw_priv *priv,/* Prepare device struct */ priv->local_bind_sd =-1 ; - priv->device =os_malloc (sizeof (struct sockaddr_ll )); + priv->device =malloc (sizeof (struct sockaddr_ll ));if (priv->device ==NULL )return -ENOMEM ; device = priv->device;
@@ -147,7 +147,7 @@ static int _local_inet_start(struct eth_sandbox_raw_priv *priv)/* Prepare device struct */ priv->local_bind_sd =-1 ; priv->local_bind_udp_port =0 ; - priv->device =os_malloc (sizeof (struct sockaddr_in )); + priv->device =malloc (sizeof (struct sockaddr_in ));if (priv->device ==NULL )return -ENOMEM ; device = priv->device;
@@ -282,7 +282,7 @@ int sandbox_eth_raw_os_recv(void *packet, int *length,void sandbox_eth_raw_os_stop (struct eth_sandbox_raw_priv *priv) { -os_free (priv->device); +free (priv->device); priv->device =NULL ;close (priv->sd); priv->sd =-1 ;
arch/sandbox/cpu/os.c +12 -12
@@ -137,7 +137,7 @@ int os_read_file(const char *fname, void **bufp, int *sizep)printf ("Cannot seek to start of file '%s'\n" , fname); goto err; } - *bufp =os_malloc (size); + *bufp =malloc (size);if (!*bufp) {printf ("Not enough memory to read file '%s'\n" , fname); ret = -ENOMEM ;
@@ -306,8 +306,8 @@ int os_parse_args(struct sandbox_state *state, int argc, char *argv[]) state->argv = argv;/* dynamically construct the arguments to the system getopt_long */ - short_opts =os_malloc (sizeof (*short_opts) * num_options *2 +1 ); - long_opts =os_malloc (sizeof (*long_opts) * num_options); + short_opts =malloc (sizeof (*short_opts) * num_options *2 +1 ); + long_opts =malloc (sizeof (*long_opts) * num_options);if (!short_opts || !long_opts)return 1 ;
@@ -385,7 +385,7 @@ void os_dirent_free(struct os_dirent_node *node)while (node) { next = node->next; -os_free (node); +free (node); node = next; } }
@@ -410,7 +410,7 @@ int os_dirent_ls(const char *dirname, struct os_dirent_node **headp)/* Create a buffer upfront, with typically sufficient size */ dirlen =strlen (dirname) +2 ; len = dirlen +256 ; - fname =os_malloc (len); + fname =malloc (len);if (!fname) { ret = -ENOMEM ; goto done;
@@ -423,7 +423,7 @@ int os_dirent_ls(const char *dirname, struct os_dirent_node **headp) ret = errno;break ; } - next =os_malloc (sizeof (*node) +strlen (entry->d_name) +1 ); + next =malloc (sizeof (*node) +strlen (entry->d_name) +1 );if (!next) {os_dirent_free (head); ret = -ENOMEM ;
@@ -432,10 +432,10 @@ int os_dirent_ls(const char *dirname, struct os_dirent_node **headp)if (dirlen +strlen (entry->d_name) > len) { len = dirlen +strlen (entry->d_name); old_fname = fname; - fname =os_realloc (fname, len); + fname =realloc (fname, len);if (!fname) { -os_free (old_fname); -os_free (next); +free (old_fname); +free (next);os_dirent_free (head); ret = -ENOMEM ; goto done;
@@ -469,7 +469,7 @@ int os_dirent_ls(const char *dirname, struct os_dirent_node **headp) done:closedir (dir); -os_free (fname); +free (fname);return ret; }
@@ -586,7 +586,7 @@ static int add_args(char ***argvp, char *add_args[], int count)for (argc =0 ; (*argvp)[argc]; argc++) ; - argv =os_malloc ((argc + count +1 ) *sizeof (char *)); + argv =malloc ((argc + count +1 ) *sizeof (char *));if (!argv) {printf ("Out of memory for %d argv\n" , count);return -ENOMEM ;
@@ -669,7 +669,7 @@ static int os_jump_to_file(const char *fname)os_exit (2 ); err =execv (fname, argv); -os_free (argv); +free (argv);if (err) {perror ("Unable to run image" );printf ("Image filename '%s'\n" , fname);
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 17/33 sandbox: Drop os_realloc()
In reply to Simon GlassDue to recent changes this function is no-longer used. Drop it.
---
arch/sandbox/cpu/os.c | 23 ----------------------- include/os.h | 22 +--------------------- 2 files changed, 1 insertion(+), 44 deletions(-)
arch/sandbox/cpu/os.c +0 -23
@@ -238,29 +238,6 @@ void os_free(void *ptr) } } -void *os_realloc (void *ptr,size_t length) -{ -int page_size =getpagesize (); -struct os_mem_hdr *hdr; -void *buf =NULL ; - -if (length) { - buf =os_malloc (length); -if (!buf) -return buf; -if (ptr) { - hdr = ptr - page_size; -if (length > hdr->length) - length = hdr->length; -memcpy (buf, ptr, length); - } - } -if (ptr) -os_free (ptr); - -return buf; -} -void os_usleep (unsigned long usec) {usleep (usec);
include/os.h +1 -21
@@ -119,7 +119,7 @@ void os_fd_restore(void);void *os_malloc (size_t length);/** -* Free memory previous allocated with os_malloc()/os_realloc() +* Free memory previous allocated with os_malloc() * * This returns the memory to the OS. *
@@ -127,26 +127,6 @@ void *os_malloc(size_t length);*/ void os_free (void *ptr); -/** -* Reallocate previously-allocated memory to increase/decrease space -* -* This works in a similar way to the C library realloc() function. If -* length is 0, then ptr is freed. Otherwise the space used by ptr is -* expanded or reduced depending on whether length is larger or smaller -* than before. -* -* If ptr is NULL, then this is similar to calling os_malloc(). -* -* This function may need to move the memory block to make room for any -* extra space, in which case the new pointer is returned. -* -* \param ptr Pointer to memory block to reallocate -* \param length New length for memory block -* \return pointer to new memory block, or NULL on failure or if length -* is 0. -*/ -void *os_realloc (void *ptr,size_t length); -/** * Access to the usleep function of the os *
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 18/33 sandbox: Ensure that long-options array is terminated
In reply to Simon GlassThe last member of this array is supposed to be all zeroes according to the getopt_long() man page. Fix the function to do this.
---
arch/sandbox/cpu/os.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/sandbox/cpu/os.c +2 -1
@@ -284,7 +284,7 @@ int os_parse_args(struct sandbox_state *state, int argc, char *argv[])/* dynamically construct the arguments to the system getopt_long */ short_opts =malloc (sizeof (*short_opts) * num_options *2 +1 ); - long_opts =malloc (sizeof (*long_opts) * num_options); + long_opts =malloc (sizeof (*long_opts) * (num_options +1 ));if (!short_opts || !long_opts)return 1 ;
@@ -314,6 +314,7 @@ int os_parse_args(struct sandbox_state *state, int argc, char *argv[])/* we need to handle output ourselves since u-boot provides printf */ opterr =0 ; +memset (&long_opts[num_options],'\0' ,sizeof (*long_opts));/* * walk all of the options the user gave us on the command line, * figure out what u-boot option structure they belong to (via
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 19/33 sandbox: Add a new header for the system malloc()
In reply to Simon GlassSome files use U-Boot headers but still need to access the system malloc(). Allow this by creating a new asm/malloc.h which can be used so long as U-Boot's malloc.h has not been included.
---
arch/sandbox/cpu/start.c | 6 +++--- arch/sandbox/cpu/state.c | 17 +++++++++-------- arch/sandbox/include/asm/malloc.h | 26 ++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 11 deletions(-) create mode 100644 arch/sandbox/include/asm/malloc.h
arch/sandbox/cpu/start.c +3 -3
@@ -8,10 +8,10 @@#include <errno.h> #include <os.h> #include <cli.h> -#include <malloc.h> #include <sort.h> #include <asm/getopt.h> #include <asm/io.h> +#include <asm/malloc.h> #include <asm/sections.h> #include <asm/state.h> #include <linux/ctype.h>
@@ -181,7 +181,7 @@ static int sandbox_cmdline_cb_default_fdt(struct sandbox_state *state,int len; len =strlen (state->argv[0 ]) +strlen (fmt) +1 ; - fname =os_malloc (len); + fname =malloc (len);if (!fname)return -ENOMEM ;snprintf (fname, len, fmt, state->argv[0 ]);
@@ -201,7 +201,7 @@ static int sandbox_cmdline_cb_test_fdt(struct sandbox_state *state,int len; len =strlen (state->argv[0 ]) +strlen (fmt) +1 ; - fname =os_malloc (len); + fname =malloc (len);if (!fname)return -ENOMEM ;strcpy (fname, state->argv[0 ]);
arch/sandbox/cpu/state.c +9 -8
@@ -7,6 +7,7 @@#include <errno.h> #include <fdtdec.h> #include <os.h> +#include <asm/malloc.h> #include <asm/state.h> /* Main state record for the sandbox */
@@ -27,17 +28,17 @@ static int state_ensure_space(int extra_size)return 0 ; size = used + extra_size; - buf =os_malloc (size); + buf =malloc (size);if (!buf)return -ENOMEM ; ret =fdt_open_into (blob, buf, size);if (ret) { -os_free (buf); +free (buf);return -EIO ; } -os_free (blob); +free (blob); state->state_fdt = buf;return 0 ; }
@@ -53,7 +54,7 @@ static int state_read_file(struct sandbox_state *state, const char *fname)printf ("Cannot find sandbox state file '%s'\n" , fname);return -ENOENT ; } - state->state_fdt =os_malloc (size); + state->state_fdt =malloc (size);if (!state->state_fdt) {puts ("No memory to read sandbox state\n" );return -ENOMEM ;
@@ -75,7 +76,7 @@ static int state_read_file(struct sandbox_state *state, const char *fname) err_read:os_close (fd); err_open: -os_free (state->state_fdt); +free (state->state_fdt); state->state_fdt =NULL ;return ret;
@@ -242,7 +243,7 @@ int sandbox_write_state(struct sandbox_state *state, const char *fname)/* Create a state FDT if we don't have one */ if (!state->state_fdt) { size =0x4000 ; - state->state_fdt =os_malloc (size); + state->state_fdt =malloc (size);if (!state->state_fdt) {puts ("No memory to create FDT\n" );return -ENOMEM ;
@@ -300,7 +301,7 @@ int sandbox_write_state(struct sandbox_state *state, const char *fname) err_write:os_close (fd); err_create: -os_free (state->state_fdt); +free (state->state_fdt);return ret; }
@@ -418,7 +419,7 @@ int state_uninit(void)os_unlink (state->jumped_fname);if (state->state_fdt) -os_free (state->state_fdt); +free (state->state_fdt);memset (state,'\0' ,sizeof (*state));return 0 ;
arch/sandbox/include/asm/malloc.h new file +26 -0
@@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Sandbox access to system malloc (i.e. not U-Boot's) +* +* Copyright 2020 Google LLC +*/ + +#ifndef __ASM_MALLOC_H + +void *malloc (size_t size); +void free (void *ptr); +void *calloc (size_t nmemb,size_t size); +void *realloc (void *ptr,size_t size); +void *reallocarray (void *ptr,size_t nmemb,size_t size); + +/* +* This header allows calling the system allocation routines. It makes no +* sense to also include U-Boot's malloc.h since that redfines malloc to +* have a 'dl' prefix. These two implementations cannot be mixed and matched +* in the same file. +*/ +#ifdef __MALLOC_H__ +#error "This sandbox header file cannot be included with malloc.h" +#endif + +#endif
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 20/33 sound: Add a new stop_play() method
In reply to Simon GlassAt present there is no positive indication that U-Boot has finished sending sound data. This means that it is not possible to power down an audio codec, for example. Add a new method that is called once all sound data has been sent.
Add a new method for this, called when the sound_play() call is done.
---
arch/sandbox/include/asm/test.h | 7 +++++++ drivers/sound/sandbox.c | 21 ++++++++++++++++++++- drivers/sound/sound-uclass.c | 11 +++++++++++ include/sound.h | 12 ++++++++++++ test/dm/sound.c | 1 + 5 files changed, 51 insertions(+), 1 deletion(-)
arch/sandbox/include/asm/test.h +7 -0
@@ -165,6 +165,13 @@ int sandbox_get_i2s_sum(struct udevice *dev);*/ int sandbox_get_setup_called (struct udevice *dev); +/** +* sandbox_get_sound_active() - Returns whether sound play is in progress +* +* @return true if active, false if not +*/ +int sandbox_get_sound_active (struct udevice *dev); +/** * sandbox_get_sound_sum() - Read back the sum of the sound data so far *
drivers/sound/sandbox.c +20 -1
@@ -26,7 +26,8 @@ struct sandbox_i2s_priv { };struct sandbox_sound_priv { -int setup_called; +int setup_called;/* Incremented when setup() method is called */ +bool active;/* TX data is being sent */ int sum;/* Use to sum the provided audio data */ bool allow_beep;/* true to allow the start_beep() interface */ int frequency_hz;/* Beep frequency if active, else 0 */
@@ -59,6 +60,13 @@ int sandbox_get_setup_called(struct udevice *dev)return priv->setup_called; } +int sandbox_get_sound_active (struct udevice *dev) +{ +struct sandbox_sound_priv *priv =dev_get_priv (dev); + +return priv->active; +} +int sandbox_get_sound_sum (struct udevice *dev) {struct sandbox_sound_priv *priv =dev_get_priv (dev);
@@ -163,6 +171,16 @@ static int sandbox_sound_play(struct udevice *dev, void *data, uint data_size)return i2s_tx_data (uc_priv->i2s, data, data_size); } +static int sandbox_sound_stop_play (struct udevice *dev) +{ +struct sandbox_sound_priv *priv =dev_get_priv (dev); + +sandbox_sdl_sound_stop (); + priv->active = false; + +return 0 ; +} +int sandbox_sound_start_beep (struct udevice *dev,int frequency_hz) {struct sandbox_sound_priv *priv =dev_get_priv (dev);
@@ -228,6 +246,7 @@ U_BOOT_DRIVER(sandbox_i2s) = {static const struct sound_ops sandbox_sound_ops = { .setup = sandbox_sound_setup, .play = sandbox_sound_play, + .stop_play = sandbox_sound_stop_play, .start_beep = sandbox_sound_start_beep, .stop_beep = sandbox_sound_stop_beep, };
drivers/sound/sound-uclass.c +11 -0
@@ -31,6 +31,16 @@ int sound_play(struct udevice *dev, void *data, uint data_size)return ops->play (dev, data, data_size); } +int sound_stop_play (struct udevice *dev) +{ +struct sound_ops *ops =sound_get_ops (dev); + +if (!ops->play) +return -ENOSYS ; + +return ops->stop_play (dev); +} +int sound_start_beep (struct udevice *dev,int frequency_hz) {struct sound_ops *ops =sound_get_ops (dev);
@@ -97,6 +107,7 @@ int sound_beep(struct udevice *dev, int msecs, int frequency_hz) ret =sound_play (dev, data, size); } +sound_stop_play (dev);free (data);
include/sound.h +12 -0
@@ -68,6 +68,18 @@ struct sound_ops {*/ int (*play)(struct udevice *dev,void *data,uint data_size); +/** +* stop_play() - Indicate that there is no more data coming +* +* This is called once play() has finished sending all the data to the +* output device. This may be used to tell the hardware to turn off the +* codec, for example. +* +* @dev: Sound device +* @return 0 if OK, -ve on error +*/ +int (*stop_play)(struct udevice *dev); +/** * start_beep() - Start beeping (optional) *
test/dm/sound.c +1 -0
@@ -28,6 +28,7 @@ static int dm_test_sound(struct unit_test_state *uts)ut_asserteq (4560 ,sandbox_get_sound_sum (dev));ut_assertok (sound_beep (dev,1 ,100 ));ut_asserteq (9120 ,sandbox_get_sound_sum (dev)); +ut_asserteq (false,sandbox_get_sound_active (dev));return 0 ; }
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 21/33 sandbox: sound: Handle errors better in sound_beep()
In reply to Simon GlassAt present an error does not stop the sound-output loop. This is incorrect since nothing can be gained by trying to continue. Fix it.
---
drivers/sound/sound-uclass.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/sound/sound-uclass.c +4 -1
@@ -97,11 +97,14 @@ int sound_beep(struct udevice *dev, int msecs, int frequency_hz)sound_create_square_wave (i2s_uc_priv->samplingrate, data, data_size, frequency_hz, i2s_uc_priv->channels); + ret =0 ;while (msecs >=1000 ) { ret =sound_play (dev, data, data_size); +if (ret) +break ; msecs -=1000 ; } -if (msecs) { +if (!ret && msecs) {unsigned long size = (data_size * msecs) / (sizeof (int ) *1000 );
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 22/33 sandbox: Add comments to the sdl struct
In reply to Simon GlassAdd comments for each struct member. Drop frequency since it is not used.
---
arch/sandbox/cpu/sdl.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)
arch/sandbox/cpu/sdl.c +16 -1
@@ -24,13 +24,28 @@ struct buf_info {uint8_t *data; }; +/** +* struct sdl_info - Information about our use of the SDL library +* +* @screen: Surface used to draw on the screen +* @width: Width of simulated LCD display +* @height: Height of simulated LCD display +* @depth: Depth of the display in bits per pixel (16 or 32) +* @pitch: Number of bytes per line of the display +* @sample_rate: Current sample rate for audio +* @audio_active: true if audio can be used +* @inited: true if this module is initialised +* @cur_buf: Current audio buffer being used by sandbox_sdl_fill_audio (0 or 1) +* @buf: The two available audio buffers. SDL can be reading from one while we +* are setting up the next +* @running: true if audio is running +*/ static struct sdl_info { SDL_Surface *screen; int width; int height; int depth; int pitch; - uint frequency; uint sample_rate; bool audio_active; bool inited;
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 23/33 sandbox: sdl: Improve error handling
In reply to Simon GlassA few errors are not checked. Fix these and use my preferred spelling for init.
---
arch/sandbox/cpu/sdl.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
arch/sandbox/cpu/sdl.c +9 -5
@@ -77,7 +77,7 @@ static int sandbox_sdl_ensure_init(void) {if (!sdl.inited) {if (SDL_Init (0 ) <0 ) { -printf ("Unable to initialize SDL: %s\n" , +printf ("Unable to initialise SDL: %s\n" ,SDL_GetError ());return -EIO ; }
@@ -100,7 +100,7 @@ int sandbox_sdl_init_display(int width, int height, int log2_bpp)if (err)return err;if (SDL_InitSubSystem (SDL_INIT_VIDEO ) <0 ) { -printf ("Unable to initialize SDL LCD: %s\n" ,SDL_GetError ()); +printf ("Unable to initialise SDL LCD: %s\n" ,SDL_GetError ());return -EPERM ; }SDL_WM_SetCaption ("U-Boot" ,"U-Boot" );
@@ -298,7 +298,7 @@ void sandbox_sdl_fill_audio(void *udata, Uint8 *stream, int len)int sandbox_sdl_sound_init (int rate,int channels) { -SDL_AudioSpec wanted; +SDL_AudioSpec wanted, have;int i;if (sandbox_sdl_ensure_init ())
@@ -331,15 +331,19 @@ int sandbox_sdl_sound_init(int rate, int channels) }if (SDL_InitSubSystem (SDL_INIT_AUDIO ) <0 ) { -printf ("Unable to initialize SDL audio: %s\n" ,SDL_GetError ()); +printf ("Unable to initialise SDL audio: %s\n" ,SDL_GetError ()); goto err; }/* Open the audio device, forcing the desired format */ -if (SDL_OpenAudio (&wanted,NULL ) <0 ) { +if (SDL_OpenAudio (&wanted, &have) <0 ) {printf ("Couldn't open audio: %s\n" ,SDL_GetError ()); goto err; } +if (have.format != wanted.format) { +printf ("Couldn't select required audio format\n" ); + goto err; + } sdl.audio_active = true; sdl.sample_rate = wanted.freq; sdl.cur_buf =0 ;
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 24/33 sandbox: sdl: Support waiting for audio to complete
In reply to Simon GlassAt present when audio stops, any in-progress output is cut off. Fix this by waiting for output to finish.
Also use booleans for the boolean variables.
---
arch/sandbox/cpu/sdl.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
arch/sandbox/cpu/sdl.c +13 -2
@@ -5,6 +5,7 @@#include <errno.h> #include <unistd.h> +#include <stdbool.h> #include <linux/input.h> #include <SDL.h> #include <asm/state.h>
@@ -39,6 +40,7 @@ struct buf_info {* @buf: The two available audio buffers. SDL can be reading from one while we * are setting up the next * @running: true if audio is running +* @stopping: true if audio will stop once it runs out of data */ static struct sdl_info { SDL_Surface *screen;
@@ -52,6 +54,7 @@ static struct sdl_info {int cur_buf;struct buf_info buf[2 ];bool running; +bool stopping; } sdl;static void sandbox_sdl_poll_events (void )
@@ -271,6 +274,7 @@ void sandbox_sdl_fill_audio(void *udata, Uint8 *stream, int len) {struct buf_info *buf;int avail; +bool have_data = false;int i;for (i =0 ; i <2 ; i++) {
@@ -282,6 +286,7 @@ void sandbox_sdl_fill_audio(void *udata, Uint8 *stream, int len) }if (avail > len) avail = len; + have_data = true;SDL_MixAudio (stream, buf->data + buf->pos, avail,SDL_MIX_MAXVOLUME );
@@ -294,6 +299,7 @@ void sandbox_sdl_fill_audio(void *udata, Uint8 *stream, int len)else break ; } + sdl.stopping = !have_data; }int sandbox_sdl_sound_init (int rate,int channels)
@@ -347,7 +353,7 @@ int sandbox_sdl_sound_init(int rate, int channels) sdl.audio_active = true; sdl.sample_rate = wanted.freq; sdl.cur_buf =0 ; - sdl.running =0 ; + sdl.running = false;return 0 ;
@@ -378,7 +384,8 @@ int sandbox_sdl_sound_play(const void *data, uint size) buf->pos =0 ;if (!sdl.running) {SDL_PauseAudio (0 ); - sdl.running =1 ; + sdl.running = true; + sdl.stopping = false; }return 0 ;
@@ -387,8 +394,12 @@ int sandbox_sdl_sound_play(const void *data, uint size)int sandbox_sdl_sound_stop (void ) {if (sdl.running) { +while (!sdl.stopping) +SDL_Delay (100 ); +SDL_PauseAudio (1 ); sdl.running =0 ; + sdl.stopping = false; }return 0 ;
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 25/33 gitlab: Disable SDL when building sandbox
In reply to Simon GlassI am not sure how to add libsdl2-dev to the gitlab image, so disable building sandbox with SDL for now.
---
.gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
.gitlab-ci.yml +3 -2
@@ -32,7 +32,8 @@ stages: # use clang only do one configuration. - if [[ "${BUILDMAN}" != "" ]]; then ret=0; - tools/buildman/buildman -o /tmp -P -E ${BUILDMAN} ${OVERRIDE}|| ret=$?; + NO_SDL=1 tools/buildman/buildman -o /tmp -P -E ${BUILDMAN} + ${OVERRIDE}|| ret=$?; if [[ $ret -ne 0 && $ret -ne 129 ]]; then tools/buildman/buildman -o /tmp -sdeP ${BUILDMAN}; exit $ret;
@@ -164,7 +165,7 @@ Run binman, buildman, dtoc and patman testsuites: export UBOOT_TRAVIS_BUILD_DIR=/tmp/.bm-work/sandbox_spl; export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt"; export PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}"; - ./tools/buildman/buildman -o /tmp -P sandbox_spl; + NO_SDL=1 ./tools/buildman/buildman -o /tmp -P sandbox_spl; ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test; ./tools/buildman/buildman -t; ./tools/dtoc/dtoc -t;
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 26/33 sandbox: sdl: Move to use SDL2
In reply to Simon GlassSandbox currently uses SDL1.2. SDL2 has been around for quite a while and is widely supported. It has a number of useful features. It seems appropriate to move sandbox over.
Update the code to use SDL2 instead of SDL1.2.
---
.travis.yml | 2 +- arch/sandbox/config.mk | 2 +- arch/sandbox/cpu/sdl.c | 279 +++++++++++++++++++++++------------------ doc/arch/sandbox.rst | 2 +- 4 files changed, 158 insertions(+), 127 deletions(-)
.travis.yml +1 -1
@@ -19,7 +19,7 @@ addons: - sparse - bc - build-essential - - libsdl1.2-dev + - libsdl2-dev - python - python-pyelftools - python3-virtualenv
arch/sandbox/config.mk +1 -1
@@ -5,7 +5,7 @@ PLATFORM_CPPFLAGS += -D__SANDBOX__ -U_FORTIFY_SOURCE PLATFORM_CPPFLAGS += -DCONFIG_ARCH_MAP_SYSMEM PLATFORM_CPPFLAGS += -fPIC PLATFORM_LIBS += -lrt -SDL_CONFIG ?= sdl-config +SDL_CONFIG ?= sdl2-config # Define this to avoid linking with SDL, which requires SDL libraries # This can solve 'sdl-config: Command not found' errors
arch/sandbox/cpu/sdl.c +155 -124
333 lines not on this page · raw message
doc/arch/sandbox.rst +1 -1
@@ -43,7 +43,7 @@ To run sandbox U-Boot use something like:: ./u-boot Note: If you get errors about 'sdl-config: Command not found' you may need to -install libsdl1.2-dev or similar to get SDL support. Alternatively you can +install libsdl2.0-dev or similar to get SDL support. Alternatively you can build sandbox without SDL (i.e. no display/keyboard support) by removing the CONFIG_SANDBOX_SDL line in include/configs/sandbox.h or using::
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 27/33 sandbox: sdl: Add an option to double the screen size
In reply to Simon GlassOn high-DPI displays U-Boot's LCD window can look very small. Add a -K flag to expand it to make things easier to read, while still using the existing resolution internally.
---
arch/sandbox/cpu/sdl.c | 17 +++++++++++++++-- arch/sandbox/cpu/start.c | 10 ++++++++++ arch/sandbox/include/asm/sdl.h | 9 ++++++--- arch/sandbox/include/asm/state.h | 1 + drivers/video/sandbox_sdl.c | 5 ++++- 5 files changed, 36 insertions(+), 6 deletions(-)
arch/sandbox/cpu/sdl.c +15 -2
@@ -30,6 +30,8 @@ struct buf_info {* * @width: Width of simulated LCD display * @height: Height of simulated LCD display +* @vis_width: Visible width (may be larger to allow for scaling up) +* @vis_height: Visible height (may be larger to allow for scaling up) * @depth: Depth of the display in bits per pixel (16 or 32) * @pitch: Number of bytes per line of the display * @sample_rate: Current sample rate for audio
@@ -46,6 +48,8 @@ struct buf_info { static struct sdl_info { int width; int height; + int vis_width; + int vis_height; int depth; int pitch; uint sample_rate;
@@ -94,7 +98,8 @@ static int sandbox_sdl_ensure_init(void)return 0 ; } -int sandbox_sdl_init_display (int width,int height,int log2_bpp) +int sandbox_sdl_init_display (int width,int height,int log2_bpp, +bool double_size) {struct sandbox_state *state =state_get_current ();int err;
@@ -110,11 +115,19 @@ int sandbox_sdl_init_display(int width, int height, int log2_bpp) } sdl.width = width; sdl.height = height; +if (double_size) { + sdl.vis_width = sdl.width *2 ; + sdl.vis_height = sdl.height *2 ; + }else { + sdl.vis_width = sdl.width; + sdl.vis_height = sdl.height; + } + sdl.depth =1 << log2_bpp; sdl.pitch = sdl.width * sdl.depth /8 ;SDL_Window *screen =SDL_CreateWindow ("U-Boot" ,SDL_WINDOWPOS_UNDEFINED ,SDL_WINDOWPOS_UNDEFINED , - sdl.width, sdl.height,0 ); + sdl.vis_width, sdl.vis_height,0 );if (!screen) {printf ("Unable to initialise SDL screen: %s\n" ,SDL_GetError ());
arch/sandbox/cpu/start.c +10 -0
@@ -308,6 +308,16 @@ static int sandbox_cmdline_cb_show_lcd(struct sandbox_state *state,SANDBOX_CMDLINE_OPT_SHORT (show_lcd,'l' ,0 ,"Show the sandbox LCD display" ); +static int sandbox_cmdline_cb_double_lcd (struct sandbox_state *state, +const char *arg) +{ + state->double_lcd = true; + +return 0 ; +} +SANDBOX_CMDLINE_OPT_SHORT (double_lcd,'K' ,0 , +"Double the LCD display size in each direction" ); +static const char *term_args[STATE_TERM_COUNT ] = {"raw-with-sigs" ,"raw" ,
arch/sandbox/include/asm/sdl.h +6 -3
@@ -17,10 +17,13 @@* @height Window height in pixels * @log2_bpp: Log to base 2 of the number of bits per pixel. So a 32bpp * display will pass 5, since 2*5 = 32 +* @double_size: true to double the visible size in each direction for high-DPI +* displays * @return 0 if OK, -ENODEV if no device, -EIO if SDL failed to initialize * and -EPERM if the video failed to come up. */ -int sandbox_sdl_init_display (int width,int height,int log2_bpp); +int sandbox_sdl_init_display (int width,int height,int log2_bpp, +bool double_size);/** * sandbox_sdl_sync() - Sync current U-Boot LCD frame buffer to SDL
@@ -78,8 +81,8 @@ int sandbox_sdl_sound_stop(void);int sandbox_sdl_sound_init (int rate,int channels);#else -static inline int sandbox_sdl_init_display (int width,int height, -int log2_bpp) +static inline int sandbox_sdl_init_display (int width,int height,int log2_bpp, +bool double_size) {return -ENODEV ; }
arch/sandbox/include/asm/state.h +1 -0
@@ -83,6 +83,7 @@ struct sandbox_state {bool write_state;/* Write sandbox state on exit */ bool ignore_missing_state_on_read;/* No error if state missing */ bool show_lcd;/* Show LCD on start-up */ +bool double_lcd;/* Double display size for high-DPI */ enum sysreset_t last_sysreset;/* Last system reset type */ bool sysreset_allowed[SYSRESET_COUNT ];/* Allowed system reset types */ enum state_terminal_raw term_raw;/* Terminal raw/cooked */
drivers/video/sandbox_sdl.c +4 -1
@@ -8,6 +8,7 @@#include <fdtdec.h> #include <video.h> #include <asm/sdl.h> +#include <asm/state.h> #include <asm/u-boot-sandbox.h> #include <dm/test.h>
@@ -23,9 +24,11 @@ static int sandbox_sdl_probe(struct udevice *dev) {struct sandbox_sdl_plat *plat =dev_get_platdata (dev);struct video_priv *uc_priv =dev_get_uclass_priv (dev); +struct sandbox_state *state =state_get_current ();int ret; - ret =sandbox_sdl_init_display (plat->xres, plat->yres, plat->bpix); + ret =sandbox_sdl_init_display (plat->xres, plat->yres, plat->bpix, + state->double_lcd);if (ret) {puts ("LCD init failed\n" );return ret;
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 27/33 sandbox: sdl: Add an option to double the screen size
Quoted 5 lines · On Sun, 12 Jan 2020 12:06:18 -0700 Simon Glass sjg at chromium.org wrote:
On high-DPI displays U-Boot's LCD window can look very small. Add a -K flag to expand it to make things easier to read, while still using the existing resolution internally.
Signed-off-by Simon Glass <[email protected]>
--
Anatolij
PATCH 28/33 sandbox: Support changing the LCD colour depth
In reply to Simon GlassAdd a new device-tree property to control the colour depth. At present we support 16bpp and 32bpp.
While we are here, update the code to use livetree.
---
arch/sandbox/dts/sandbox.dtsi | 1 + doc/device-tree-bindings/video/sandbox-fb.txt | 6 +++++- drivers/video/sandbox_sdl.c | 8 +++----- 3 files changed, 9 insertions(+), 6 deletions(-)
arch/sandbox/dts/sandbox.dtsi +1 -0
@@ -83,6 +83,7 @@ compatible = "sandbox,lcd-sdl"; xres = <1366>; yres = <768>; + log2-depth = <5>; }; leds {
doc/device-tree-bindings/video/sandbox-fb.txt +5 -1
@@ -2,7 +2,10 @@ Sandbox LCD =========== This uses the displaymode.txt binding except that only xres and yres are -required properties. +required properties. Also an additional optional property is defined: + +log2-depth: Log base 2 of the U-Boot display buffer depth (4=16bpp, 5=32bpp). + If not provided, a value of 4 is used. Example:
@@ -10,4 +13,5 @@ Example: compatible = "sandbox,lcd-sdl"; xres = <800>; yres = <600>; + log2-depth = <5>; };
drivers/video/sandbox_sdl.c +3 -5
@@ -47,13 +47,11 @@ static int sandbox_sdl_bind(struct udevice *dev) {struct video_uc_platdata *uc_plat =dev_get_uclass_platdata (dev);struct sandbox_sdl_plat *plat =dev_get_platdata (dev); -const void *blob = gd->fdt_blob; -int node =dev_of_offset (dev);int ret =0 ; - plat->xres =fdtdec_get_int (blob, node,"xres" ,LCD_MAX_WIDTH ); - plat->yres =fdtdec_get_int (blob, node,"yres" ,LCD_MAX_HEIGHT ); - plat->bpix =VIDEO_BPP16 ; + plat->xres =dev_read_u32_default (dev,"xres" ,LCD_MAX_WIDTH ); + plat->yres =dev_read_u32_default (dev,"yres" ,LCD_MAX_HEIGHT ); + plat->bpix =dev_read_u32_default (dev,"log2-depth" ,VIDEO_BPP16 ); uc_plat->size = plat->xres * plat->yres * (1 << plat->bpix) /8 ;debug ("%s: Frame buffer size %x\n" , __func__, uc_plat->size);
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 28/33 sandbox: Support changing the LCD colour depth
Quoted 6 lines · On Sun, 12 Jan 2020 12:06:19 -0700 Simon Glass sjg at chromium.org wrote:
Add a new device-tree property to control the colour depth. At present we support 16bpp and 32bpp.
While we are here, update the code to use livetree.
Signed-off-by Simon Glass <[email protected]>
--
Anatolij
PATCH 29/33 dm: core: Require users of devres to include the header
In reply to Simon GlassAt present devres.h is included in all files that include dm.h but few make use of it. Also this pulls in linux/compat which adds several more headers. Drop the automatic inclusion and require files to include devres themselves. This provides a good indication of which files use devres.
---
arch/arm/mach-aspeed/ast2500/clk_ast2500.c | 1 + arch/arm/mach-imx/cmd_nandbcb.c | 1 + arch/arm/mach-meson/board-info.c | 1 + arch/arm/mach-meson/sm.c | 1 + arch/arm/mach-rockchip/px30/clk_px30.c | 1 + arch/arm/mach-rockchip/rk3036/clk_rk3036.c | 1 + arch/arm/mach-rockchip/rk3128/clk_rk3128.c | 1 + arch/arm/mach-rockchip/rk3188/clk_rk3188.c | 1 + arch/arm/mach-rockchip/rk3188/rk3188.c | 1 + arch/arm/mach-rockchip/rk322x/clk_rk322x.c | 1 + arch/arm/mach-rockchip/rk3288/clk_rk3288.c | 1 + arch/arm/mach-rockchip/rk3288/rk3288.c | 1 + arch/arm/mach-rockchip/rk3308/clk_rk3308.c | 1 + arch/arm/mach-rockchip/rk3328/clk_rk3328.c | 1 + arch/arm/mach-rockchip/rk3368/clk_rk3368.c | 1 + arch/arm/mach-rockchip/rk3399/clk_rk3399.c | 1 + arch/arm/mach-rockchip/rv1108/clk_rv1108.c | 1 + arch/arm/mach-stm32mp/pwr_regulator.c | 1 + arch/riscv/lib/andes_plic.c | 1 + arch/riscv/lib/andes_plmt.c | 1 + arch/riscv/lib/sifive_clint.c | 1 + board/google/veyron/veyron.c | 1 + board/st/stm32mp1/stm32mp1.c | 1 + cmd/gpio.c | 1 + cmd/gpt.c | 1 + cmd/mtd.c | 2 ++ cmd/ubi.c | 1 + drivers/adc/rockchip-saradc.c | 1 + drivers/block/blk-uclass.c | 1 + drivers/clk/altera/clk-arria10.c | 1 + drivers/clk/aspeed/clk_ast2500.c | 1 + drivers/clk/at91/clk-generated.c | 1 + drivers/clk/at91/clk-usb.c | 1 + drivers/clk/clk-composite.c | 2 ++ drivers/clk/clk-divider.c | 2 ++ drivers/clk/clk-fixed-factor.c | 2 ++ drivers/clk/clk-gate.c | 2 ++ drivers/clk/clk-mux.c | 2 ++ drivers/clk/clk-ti-sci.c | 1 + drivers/clk/clk-uclass.c | 4 +++- drivers/clk/clk_fixed_factor.c | 1 + drivers/clk/clk_sandbox_ccf.c | 2 ++ drivers/clk/clk_sandbox_test.c | 1 + drivers/clk/clk_versal.c | 1 + drivers/clk/clk_zynqmp.c | 1 + drivers/clk/imx/clk-composite-8m.c | 2 ++ drivers/clk/imx/clk-gate2.c | 2 ++ drivers/clk/imx/clk-pfd.c | 2 ++ drivers/clk/imx/clk-pll14xx.c | 2 ++ drivers/clk/imx/clk-pllv3.c | 2 ++ drivers/clk/meson/axg.c | 1 + drivers/clk/meson/g12a.c | 1 + drivers/clk/meson/gxbb.c | 1 + drivers/clk/rockchip/clk_rk3188.c | 1 + drivers/clk/rockchip/clk_rk3288.c | 1 + drivers/clk/sifive/fu540-prci.c | 1 + drivers/core/devres.c | 1 + drivers/dfu/dfu_mtd.c | 1 + drivers/dma/ti/k3-udma.c | 2 ++ drivers/firmware/ti_sci.c | 1 + drivers/gpio/dwapb_gpio.c | 1 + drivers/gpio/mscc_sgpio.c | 1 + drivers/i2c/ast_i2c.c | 1 + drivers/i2c/designware_i2c.c | 1 + drivers/i2c/meson_i2c.c | 1 + drivers/i2c/muxes/i2c-mux-gpio.c | 1 + drivers/i2c/tegra_i2c.c | 1 + drivers/misc/microchip_flexcom.c | 1 + drivers/misc/tegra186_bpmp.c | 1 + drivers/mmc/am654_sdhci.c | 1 + drivers/mmc/aspeed_sdhci.c | 1 + drivers/mmc/fsl_esdhc_imx.c | 1 + drivers/mmc/omap_hsmmc.c | 2 ++ drivers/mmc/rockchip_sdhci.c | 1 + drivers/mmc/tegra_mmc.c | 1 + drivers/mmc/zynq_sdhci.c | 1 + drivers/mtd/mtd_uboot.c | 1 + drivers/mtd/mtdconcat.c | 1 + drivers/mtd/mtdcore.c | 1 + drivers/mtd/mtdpart.c | 1 + drivers/mtd/nand/bbt.c | 1 + drivers/mtd/nand/raw/atmel_nand.c | 1 + drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c | 1 + drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c | 1 + drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c | 1 + drivers/mtd/nand/raw/brcmnand/brcmnand.c | 2 ++ drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c | 1 + drivers/mtd/nand/raw/denali.c | 2 ++ drivers/mtd/nand/raw/fsl_elbc_nand.c | 1 + drivers/mtd/nand/raw/fsl_ifc_nand.c | 1 + drivers/mtd/nand/raw/mxs_nand_spl.c | 1 + drivers/mtd/nand/raw/nand_base.c | 1 + drivers/mtd/nand/raw/nand_bbt.c | 1 + drivers/mtd/nand/raw/nand_bch.c | 1 + drivers/mtd/nand/raw/nand_timings.c | 1 + drivers/mtd/nand/raw/nand_util.c | 1 + drivers/mtd/nand/raw/pxa3xx_nand.c | 2 ++ drivers/mtd/nand/raw/stm32_fmc2_nand.c | 1 + drivers/mtd/nand/raw/sunxi_nand.c | 2 ++ drivers/mtd/nand/spi/core.c | 1 + drivers/mtd/onenand/onenand_base.c | 1 + drivers/mtd/spi/spi-nor-core.c | 1 + drivers/mtd/ubi/attach.c | 1 + drivers/mtd/ubi/build.c | 1 + drivers/mtd/ubi/debug.c | 1 + drivers/mtd/ubi/eba.c | 1 + drivers/mtd/ubi/fastmap.c | 2 ++ drivers/mtd/ubi/io.c | 1 + drivers/mtd/ubi/kapi.c | 1 + drivers/mtd/ubi/vmt.c | 1 + drivers/mtd/ubi/vtbl.c | 1 + drivers/mtd/ubi/wl.c | 1 + drivers/net/designware.c | 1 + drivers/net/dwmac_socfpga.c | 1 + drivers/net/mvneta.c | 1 + drivers/net/mvpp2.c | 2 ++ drivers/net/phy/dp83867.c | 1 + drivers/net/sni_ave.c | 1 + drivers/net/zynq_gem.c | 1 + drivers/pci/pcie_dw_ti.c | 1 + drivers/pci/pcie_mediatek.c | 1 + drivers/phy/allwinner/phy-sun4i-usb.c | 1 + drivers/phy/marvell/comphy_core.c | 1 + drivers/phy/omap-usb2-phy.c | 1 + drivers/phy/phy-mtk-tphy.c | 1 + drivers/phy/phy-ti-am654.c | 1 + drivers/phy/ti-pipe3-phy.c | 1 + drivers/pinctrl/intel/pinctrl.c | 1 + drivers/pinctrl/mscc/mscc-common.c | 1 + drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 1 + drivers/pinctrl/nxp/pinctrl-imx.c | 1 + drivers/pinctrl/nxp/pinctrl-mxs.c | 1 + drivers/pinctrl/pinctrl_stm32.c | 1 + drivers/pinctrl/renesas/pfc.c | 1 + drivers/power/domain/meson-ee-pwrc.c | 1 + drivers/power/domain/meson-gx-pwrc-vpu.c | 1 + drivers/power/domain/mtk-power-domain.c | 1 + drivers/power/domain/ti-sci-power-domain.c | 1 + drivers/power/regulator/pbias_regulator.c | 1 + drivers/ram/rockchip/dmc-rk3368.c | 1 + drivers/remoteproc/rproc-elf-loader.c | 1 + drivers/remoteproc/stm32_copro.c | 1 + drivers/remoteproc/ti_k3_arm64_rproc.c | 1 + drivers/remoteproc/ti_k3_dsp_rproc.c | 1 + drivers/remoteproc/ti_k3_r5f_rproc.c | 1 + drivers/reset/reset-mediatek.c | 1 + drivers/reset/reset-ti-sci.c | 1 + drivers/reset/reset-uclass.c | 1 + drivers/serial/ns16550.c | 1 + drivers/serial/serial_mtk.c | 3 ++- drivers/serial/serial_omap.c | 1 + drivers/serial/serial_sifive.c | 1 + drivers/serial/serial_zynq.c | 1 + drivers/smem/msm_smem.c | 2 ++ drivers/soc/ti/k3-navss-ringacc.c | 2 ++ drivers/spi/atmel-quadspi.c | 1 + drivers/spi/cadence_qspi.c | 1 + drivers/spi/spi-mem.c | 1 + drivers/spi/ti_qspi.c | 1 + drivers/spi/zynqmp_gqspi.c | 1 + drivers/sysreset/sysreset-ti-sci.c | 1 + drivers/sysreset/sysreset_syscon.c | 1 + drivers/tee/optee/core.c | 1 + drivers/timer/ast_timer.c | 1 + drivers/timer/cadence-ttc.c | 1 + drivers/timer/timer-uclass.c | 1 + drivers/ufs/cdns-platform.c | 1 + drivers/ufs/ti-j721e-ufs.c | 1 + drivers/ufs/ufs.c | 1 + drivers/usb/cdns3/core.c | 1 + drivers/usb/cdns3/gadget.c | 2 ++ drivers/usb/cdns3/host.c | 1 + drivers/usb/dwc3/core.c | 2 ++ drivers/usb/dwc3/dwc3-omap.c | 1 + drivers/usb/dwc3/gadget.c | 1 + drivers/usb/dwc3/ti_usb_phy.c | 1 + drivers/usb/gadget/at91_udc.c | 2 ++ drivers/usb/gadget/composite.c | 1 + drivers/usb/gadget/dwc2_udc_otg.c | 1 + drivers/usb/gadget/f_mass_storage.c | 1 + drivers/usb/gadget/pxa25x_udc.c | 1 + drivers/usb/gadget/udc/udc-core.c | 1 + drivers/usb/host/ehci-generic.c | 1 + drivers/usb/host/ohci-da8xx.c | 1 + drivers/usb/host/ohci-generic.c | 1 + drivers/usb/musb-new/am35x.c | 1 + drivers/usb/musb-new/musb_core.c | 1 + drivers/usb/musb-new/musb_dsps.c | 1 + drivers/usb/musb-new/musb_gadget.c | 1 + drivers/usb/musb-new/musb_host.c | 1 + drivers/usb/musb-new/musb_uboot.c | 1 + drivers/usb/musb-new/omap2430.c | 1 + drivers/video/exynos/exynos_mipi_dsi.c | 1 + drivers/video/mipi_dsi.c | 1 + drivers/video/rockchip/rk3288_mipi.c | 1 + drivers/video/rockchip/rk3399_mipi.c | 1 + drivers/video/rockchip/rk_vop.c | 1 + drivers/video/tegra124/sor.c | 1 + drivers/virtio/virtio_mmio.c | 1 + drivers/virtio/virtio_pci_legacy.c | 1 + drivers/virtio/virtio_pci_modern.c | 1 + drivers/virtio/virtio_sandbox.c | 1 + drivers/watchdog/ast_wdt.c | 1 + drivers/watchdog/cdns_wdt.c | 1 + drivers/watchdog/sp805_wdt.c | 1 + drivers/watchdog/xilinx_tb_wdt.c | 1 + fs/ubifs/debug.c | 1 + fs/ubifs/gc.c | 1 + fs/ubifs/io.c | 1 + fs/ubifs/log.c | 1 + fs/ubifs/lpt.c | 1 + fs/ubifs/lpt_commit.c | 1 + fs/ubifs/master.c | 1 + fs/ubifs/orphan.c | 1 + fs/ubifs/recovery.c | 1 + fs/ubifs/replay.c | 1 + fs/ubifs/sb.c | 1 + fs/ubifs/scan.c | 1 + fs/ubifs/super.c | 1 + fs/ubifs/tnc.c | 1 + fs/ubifs/tnc_misc.c | 1 + fs/ubifs/ubifs.c | 1 + fs/yaffs2/yaffs_allocator.c | 1 + fs/yaffs2/yaffs_checkptrw.c | 1 + fs/yaffs2/yaffs_guts.c | 1 + fs/yaffs2/yaffs_summary.c | 1 + fs/yaffs2/yaffs_yaffs1.c | 1 + fs/yaffs2/yaffs_yaffs2.c | 1 + fs/yaffs2/yaffsfs.c | 1 + include/dm/device.h | 2 -- include/dm/devres.h | 4 ++++ lib/bch.c | 1 + lib/crypto/asymmetric_type.c | 2 ++ lib/crypto/pkcs7_parser.c | 1 + lib/crypto/public_key.c | 2 ++ lib/crypto/x509_cert_parser.c | 1 + lib/crypto/x509_public_key.c | 2 ++ lib/list_sort.c | 1 + test/dm/devres.c | 1 + test/dm/regmap.c | 1 + test/dm/syscon.c | 1 + test/dm/test-fdt.c | 1 + 242 files changed, 275 insertions(+), 4 deletions(-)
arch/arm/mach-aspeed/ast2500/clk_ast2500.c +1 -0
@@ -7,6 +7,7 @@#include <dm.h> #include <asm/io.h> #include <asm/arch/scu_ast2500.h> +#include <linux/err.h> int ast_get_clk (struct udevice **devp) {
arch/arm/mach-imx/cmd_nandbcb.c +1 -0
@@ -11,6 +11,7 @@#include <common.h> #include <nand.h> +#include <dm/devres.h> #include <asm/io.h> #include <jffs2/jffs2.h>
arch/arm/mach-meson/board-info.c +1 -0
@@ -10,6 +10,7 @@#include <linux/bitfield.h> #include <regmap.h> #include <syscon.h> +#include <linux/err.h> #define AO_SEC_SD_CFG8 0xe0#define AO_SEC_SOCINFO_OFFSET AO_SEC_SD_CFG8
arch/arm/mach-meson/sm.c +1 -0
@@ -7,6 +7,7 @@#include <common.h> #include <asm/arch/sm.h> +#include <linux/err.h> #include <linux/kernel.h> #include <dm.h> #include <linux/bitfield.h>
arch/arm/mach-rockchip/px30/clk_px30.c +1 -0
@@ -8,6 +8,7 @@#include <syscon.h> #include <asm/arch-rockchip/clock.h> #include <asm/arch-rockchip/cru_px30.h> +#include <linux/err.h> int rockchip_get_clk (struct udevice **devp) {
arch/arm/mach-rockchip/rk3036/clk_rk3036.c +1 -0
@@ -9,6 +9,7 @@#include <syscon.h> #include <asm/arch-rockchip/clock.h> #include <asm/arch-rockchip/cru_rk3036.h> +#include <linux/err.h> int rockchip_get_clk (struct udevice **devp) {
arch/arm/mach-rockchip/rk3128/clk_rk3128.c +1 -0
@@ -8,6 +8,7 @@#include <syscon.h> #include <asm/arch-rockchip/clock.h> #include <asm/arch-rockchip/cru_rk3128.h> +#include <linux/err.h> int rockchip_get_clk (struct udevice **devp) {
arch/arm/mach-rockchip/rk3188/clk_rk3188.c +1 -0
@@ -9,6 +9,7 @@#include <syscon.h> #include <asm/arch-rockchip/clock.h> #include <asm/arch-rockchip/cru_rk3188.h> +#include <linux/err.h> int rockchip_get_clk (struct udevice **devp) {
arch/arm/mach-rockchip/rk3188/rk3188.c +1 -0
@@ -10,6 +10,7 @@#include <asm/arch-rockchip/clock.h> #include <asm/arch-rockchip/grf_rk3188.h> #include <asm/arch-rockchip/hardware.h> +#include <linux/err.h> #define GRF_BASE 0x20008000
arch/arm/mach-rockchip/rk322x/clk_rk322x.c +1 -0
@@ -8,6 +8,7 @@#include <syscon.h> #include <asm/arch-rockchip/clock.h> #include <asm/arch-rockchip/cru_rk322x.h> +#include <linux/err.h> int rockchip_get_clk (struct udevice **devp) {
arch/arm/mach-rockchip/rk3288/clk_rk3288.c +1 -0
@@ -9,6 +9,7 @@#include <syscon.h> #include <asm/arch-rockchip/clock.h> #include <asm/arch-rockchip/cru_rk3288.h> +#include <linux/err.h> int rockchip_get_clk (struct udevice **devp) {
arch/arm/mach-rockchip/rk3288/rk3288.c +1 -0
@@ -17,6 +17,7 @@#include <asm/arch-rockchip/pmu_rk3288.h> #include <asm/arch-rockchip/qos_rk3288.h> #include <asm/arch-rockchip/sdram.h> +#include <linux/err.h> DECLARE_GLOBAL_DATA_PTR ;
arch/arm/mach-rockchip/rk3308/clk_rk3308.c +1 -0
@@ -8,6 +8,7 @@#include <syscon.h> #include <asm/arch-rockchip/clock.h> #include <asm/arch/cru_rk3308.h> +#include <linux/err.h> int rockchip_get_clk (struct udevice **devp) {
arch/arm/mach-rockchip/rk3328/clk_rk3328.c +1 -0
@@ -7,6 +7,7 @@#include <dm.h> #include <asm/arch-rockchip/clock.h> #include <asm/arch-rockchip/cru_rk3328.h> +#include <linux/err.h> int rockchip_get_clk (struct udevice **devp) {
arch/arm/mach-rockchip/rk3368/clk_rk3368.c +1 -0
@@ -9,6 +9,7 @@#include <syscon.h> #include <asm/arch-rockchip/clock.h> #include <asm/arch-rockchip/cru_rk3368.h> +#include <linux/err.h> int rockchip_get_clk (struct udevice **devp) {
arch/arm/mach-rockchip/rk3399/clk_rk3399.c +1 -0
@@ -9,6 +9,7 @@#include <syscon.h> #include <asm/arch-rockchip/clock.h> #include <asm/arch-rockchip/cru_rk3399.h> +#include <linux/err.h> static int rockchip_get_cruclk (struct udevice **devp) {
arch/arm/mach-rockchip/rv1108/clk_rv1108.c +1 -0
@@ -9,6 +9,7 @@#include <syscon.h> #include <asm/arch-rockchip/clock.h> #include <asm/arch-rockchip/cru_rv1108.h> +#include <linux/err.h> int rockchip_get_clk (struct udevice **devp) {
arch/arm/mach-stm32mp/pwr_regulator.c +1 -0
@@ -8,6 +8,7 @@#include <errno.h> #include <regmap.h> #include <syscon.h> +#include <linux/err.h> #include <power/pmic.h> #include <power/regulator.h>
arch/riscv/lib/andes_plic.c +1 -0
@@ -17,6 +17,7 @@#include <asm/io.h> #include <asm/syscon.h> #include <cpu.h> +#include <linux/err.h> /* pending register */ #define PENDING_REG (base, hart) ((ulong)(base) + 0x1000 + ((hart) / 4) * 4)
arch/riscv/lib/andes_plmt.c +1 -0
@@ -13,6 +13,7 @@#include <syscon.h> #include <asm/io.h> #include <asm/syscon.h> +#include <linux/err.h> /* mtime register */ #define MTIME_REG (base) ((ulong)(base))
arch/riscv/lib/sifive_clint.c +1 -0
@@ -13,6 +13,7 @@#include <syscon.h> #include <asm/io.h> #include <asm/syscon.h> +#include <linux/err.h> /* MSIP registers */ #define MSIP_REG (base, hart) ((ulong)(base) + (hart) * 4)
board/google/veyron/veyron.c +1 -0
@@ -8,6 +8,7 @@#include <dm.h> #include <asm/arch-rockchip/clock.h> #include <dt-bindings/clock/rk3288-cru.h> +#include <linux/err.h> #include <power/regulator.h> /*
board/st/stm32mp1/stm32mp1.c +1 -0
@@ -31,6 +31,7 @@#include <asm/arch/stm32.h> #include <asm/arch/sys_proto.h> #include <jffs2/load_kernel.h> +#include <linux/err.h> #include <power/regulator.h> #include <usb/dwc2_udc.h>
cmd/gpio.c +1 -0
@@ -11,6 +11,7 @@#include <errno.h> #include <dm.h> #include <asm/gpio.h> +#include <linux/err.h> __weak int name_to_gpio (const char *name) {
cmd/gpt.c +1 -0
@@ -20,6 +20,7 @@#include <div64.h> #include <memalign.h> #include <linux/compat.h> +#include <linux/err.h> #include <linux/sizes.h> #include <stdlib.h>
cmd/mtd.c +2 -0
@@ -14,6 +14,8 @@#include <malloc.h> #include <mapmem.h> #include <mtd.h> +#include <dm/devres.h> +#include <linux/err.h> #include <linux/ctype.h>
cmd/ubi.c +1 -0
@@ -19,6 +19,7 @@#include <mtd.h> #include <nand.h> #include <onenand_uboot.h> +#include <dm/devres.h> #include <linux/mtd/mtd.h> #include <linux/mtd/partitions.h> #include <linux/err.h>
drivers/adc/rockchip-saradc.c +1 -0
@@ -11,6 +11,7 @@#include <dm.h> #include <errno.h> #include <asm/io.h> +#include <linux/err.h> #define SARADC_CTRL_CHN_MASK GENMASK(2, 0)#define SARADC_CTRL_POWER_CTRL BIT(3)
drivers/block/blk-uclass.c +1 -0
@@ -10,6 +10,7 @@#include <dm/device-internal.h> #include <dm/lists.h> #include <dm/uclass-internal.h> +#include <linux/err.h> static const char *if_typename_str[IF_TYPE_COUNT ] = { [IF_TYPE_IDE ] ="ide" ,
drivers/clk/altera/clk-arria10.c +1 -0
@@ -7,6 +7,7 @@#include <asm/io.h> #include <clk-uclass.h> #include <dm.h> +#include <dm/devres.h> #include <dm/lists.h> #include <dm/util.h>
drivers/clk/aspeed/clk_ast2500.c +1 -0
@@ -10,6 +10,7 @@#include <asm/arch/scu_ast2500.h> #include <dm/lists.h> #include <dt-bindings/clock/ast2500-scu.h> +#include <linux/err.h> /* * MAC Clock Delay settings, taken from Aspeed SDK
drivers/clk/at91/clk-generated.c +1 -0
@@ -7,6 +7,7 @@#include <common.h> #include <clk-uclass.h> #include <dm.h> +#include <linux/err.h> #include <linux/io.h> #include <mach/at91_pmc.h> #include "pmc.h"
drivers/clk/at91/clk-usb.c +1 -0
@@ -7,6 +7,7 @@#include <common.h> #include <clk-uclass.h> #include <dm/device.h> +#include <linux/err.h> #include <linux/io.h> #include <mach/at91_pmc.h> #include "pmc.h"
drivers/clk/clk-composite.c +2 -0
@@ -9,8 +9,10 @@#include <malloc.h> #include <clk-uclass.h> #include <dm/device.h> +#include <dm/devres.h> #include <linux/clk-provider.h> #include <clk.h> +#include <linux/err.h> #include "clk.h"
drivers/clk/clk-divider.c +2 -0
@@ -14,10 +14,12 @@#include <malloc.h> #include <clk-uclass.h> #include <dm/device.h> +#include <dm/devres.h> #include <dm/uclass.h> #include <dm/lists.h> #include <dm/device-internal.h> #include <linux/clk-provider.h> +#include <linux/err.h> #include <linux/log2.h> #include <div64.h> #include <clk.h>
drivers/clk/clk-fixed-factor.c +2 -0
@@ -9,10 +9,12 @@#include <malloc.h> #include <clk-uclass.h> #include <dm/device.h> +#include <dm/devres.h> #include <linux/clk-provider.h> #include <div64.h> #include <clk.h> #include "clk.h" +#include <linux/err.h> #define UBOOT_DM_CLK_IMX_FIXED_FACTOR "ccf_clk_fixed_factor"
drivers/clk/clk-gate.c +2 -0
@@ -12,9 +12,11 @@#include <malloc.h> #include <clk-uclass.h> #include <dm/device.h> +#include <dm/devres.h> #include <linux/clk-provider.h> #include <clk.h> #include "clk.h" +#include <linux/err.h> #define UBOOT_DM_CLK_GATE "clk_gate"
drivers/clk/clk-mux.c +2 -0
@@ -26,9 +26,11 @@#include <malloc.h> #include <clk-uclass.h> #include <dm/device.h> +#include <dm/devres.h> #include <linux/clk-provider.h> #include <clk.h> #include "clk.h" +#include <linux/err.h> #define UBOOT_DM_CLK_CCF_MUX "ccf_clk_mux"
drivers/clk/clk-ti-sci.c +1 -0
@@ -12,6 +12,7 @@#include <dm.h> #include <errno.h> #include <clk-uclass.h> +#include <linux/err.h> #include <linux/soc/ti/ti_sci_protocol.h> #include <k3-avs.h>
drivers/clk/clk-uclass.c +3 -1
@@ -10,10 +10,12 @@#include <clk.h> #include <clk-uclass.h> #include <dm.h> -#include <dm/read.h> #include <dt-structs.h> #include <errno.h> +#include <dm/devres.h> +#include <dm/read.h> #include <linux/clk-provider.h> +#include <linux/err.h> static inline const struct clk_ops *clk_dev_ops (struct udevice *dev) {
drivers/clk/clk_fixed_factor.c +1 -0
@@ -9,6 +9,7 @@#include <clk-uclass.h> #include <div64.h> #include <dm.h> +#include <linux/err.h> struct clk_fixed_factor {struct clk parent;
drivers/clk/clk_sandbox_ccf.c +2 -0
@@ -11,8 +11,10 @@#include <clk.h> #include <asm/clk.h> #include <clk-uclass.h> +#include <dm/devres.h> #include <linux/clk-provider.h> #include <sandbox-clk.h> +#include <linux/err.h> /* * Sandbox implementation of CCF primitives necessary for clk-uclass testing
drivers/clk/clk_sandbox_test.c +1 -0
@@ -7,6 +7,7 @@#include <dm.h> #include <clk.h> #include <asm/clk.h> +#include <linux/err.h> struct sandbox_clk_test {struct clk clks[SANDBOX_CLK_TEST_NON_DEVM_COUNT ];
drivers/clk/clk_versal.c +1 -0
@@ -13,6 +13,7 @@#include <dm.h> #include <asm/arch/sys_proto.h> #include <zynqmp_firmware.h> +#include <linux/err.h> #define MAX_PARENT 100#define MAX_NODES 6
drivers/clk/clk_zynqmp.c +1 -0
@@ -11,6 +11,7 @@#include <clk.h> #include <asm/arch/sys_proto.h> #include <dm.h> +#include <linux/err.h> static const resource_size_t zynqmp_crf_apb_clkc_base =0xfd1a0020 ;static const resource_size_t zynqmp_crl_apb_clkc_base =0xff5e0020 ;
drivers/clk/imx/clk-composite-8m.c +2 -0
@@ -8,9 +8,11 @@#include <malloc.h> #include <clk-uclass.h> #include <dm/device.h> +#include <dm/devres.h> #include <linux/clk-provider.h> #include <clk.h> #include "clk.h" +#include <linux/err.h> #define UBOOT_DM_CLK_IMX_COMPOSITE "imx_clk_composite"
drivers/clk/imx/clk-gate2.c +2 -0
@@ -19,9 +19,11 @@#include <malloc.h> #include <clk-uclass.h> #include <dm/device.h> +#include <dm/devres.h> #include <linux/clk-provider.h> #include <clk.h> #include "clk.h" +#include <linux/err.h> #define UBOOT_DM_CLK_IMX_GATE2 "imx_clk_gate2"
drivers/clk/imx/clk-pfd.c +2 -0
@@ -19,10 +19,12 @@#include <malloc.h> #include <clk-uclass.h> #include <dm/device.h> +#include <dm/devres.h> #include <linux/clk-provider.h> #include <div64.h> #include <clk.h> #include "clk.h" +#include <linux/err.h> #define UBOOT_DM_CLK_IMX_PFD "imx_clk_pfd"
drivers/clk/imx/clk-pll14xx.c +2 -0
@@ -10,7 +10,9 @@#include <malloc.h> #include <clk-uclass.h> #include <dm/device.h> +#include <dm/devres.h> #include <linux/clk-provider.h> +#include <linux/err.h> #include <linux/iopoll.h> #include <clk.h> #include <div64.h>
drivers/clk/imx/clk-pllv3.c +2 -0
@@ -9,9 +9,11 @@#include <malloc.h> #include <clk-uclass.h> #include <dm/device.h> +#include <dm/devres.h> #include <dm/uclass.h> #include <clk.h> #include "clk.h" +#include <linux/err.h> #define UBOOT_DM_CLK_IMX_PLLV3 "imx_clk_pllv3"
drivers/clk/meson/axg.c +1 -0
@@ -15,6 +15,7 @@#include <div64.h> #include <dt-bindings/clock/axg-clkc.h> #include "clk_meson.h" +#include <linux/err.h> #define XTAL_RATE 24000000
drivers/clk/meson/g12a.c +1 -0
@@ -14,6 +14,7 @@#include <syscon.h> #include <div64.h> #include <dt-bindings/clock/g12a-clkc.h> +#include <linux/err.h> #include <linux/kernel.h> #include "clk_meson.h"
drivers/clk/meson/gxbb.c +1 -0
@@ -15,6 +15,7 @@#include <syscon.h> #include <dt-bindings/clock/gxbb-clkc.h> #include "clk_meson.h" +#include <linux/err.h> /* This driver support only basic clock tree operations : * - Can calculate clock frequency on a limited tree
drivers/clk/rockchip/clk_rk3188.c +1 -0
@@ -20,6 +20,7 @@#include <dm/device-internal.h> #include <dm/lists.h> #include <dm/uclass-internal.h> +#include <linux/err.h> #include <linux/log2.h> enum rk3188_clk_type {
drivers/clk/rockchip/clk_rk3288.c +1 -0
@@ -21,6 +21,7 @@#include <dm/device-internal.h> #include <dm/lists.h> #include <dm/uclass-internal.h> +#include <linux/err.h> #include <linux/log2.h> DECLARE_GLOBAL_DATA_PTR ;
drivers/clk/sifive/fu540-prci.c +1 -0
@@ -35,6 +35,7 @@#include <div64.h> #include <dm.h> #include <errno.h> +#include <linux/err.h> #include <linux/math64.h> #include <linux/clk/analogbits-wrpll-cln28hpc.h>
drivers/core/devres.c +1 -0
@@ -14,6 +14,7 @@#include <linux/kernel.h> #include <linux/list.h> #include <dm/device.h> +#include <dm/devres.h> #include <dm/root.h> #include <dm/util.h>
drivers/dfu/dfu_mtd.c +1 -0
@@ -11,6 +11,7 @@#include <dfu.h> #include <mtd.h> #include <jffs2/load_kernel.h> +#include <linux/err.h> static bool mtd_is_aligned_with_block_size (struct mtd_info *mtd,u64 size) {
drivers/dma/ti/k3-udma.c +2 -0
@@ -12,12 +12,14 @@#include <malloc.h> #include <asm/dma-mapping.h> #include <dm.h> +#include <dm/devres.h> #include <dm/read.h> #include <dm/of_access.h> #include <dma.h> #include <dma-uclass.h> #include <linux/delay.h> #include <dt-bindings/dma/k3-udma.h> +#include <linux/err.h> #include <linux/soc/ti/k3-navss-ringacc.h> #include <linux/soc/ti/cppi5.h> #include <linux/soc/ti/ti-udma.h>
drivers/firmware/ti_sci.c +1 -0
@@ -12,6 +12,7 @@#include <errno.h> #include <mailbox.h> #include <dm/device.h> +#include <dm/devres.h> #include <linux/compat.h> #include <linux/err.h> #include <linux/soc/ti/k3-sec-proxy.h>
drivers/gpio/dwapb_gpio.c +1 -0
@@ -12,6 +12,7 @@#include <asm/io.h> #include <dm.h> #include <dm/device-internal.h> +#include <dm/devres.h> #include <dm/lists.h> #include <dm/root.h> #include <errno.h>
drivers/gpio/mscc_sgpio.c +1 -0
@@ -13,6 +13,7 @@#include <asm/io.h> #include <errno.h> #include <clk.h> +#include <linux/err.h> #define MSCC_SGPIOS_PER_BANK 32#define MSCC_SGPIO_BANK_DEPTH 4
drivers/i2c/ast_i2c.c +1 -0
@@ -13,6 +13,7 @@#include <i2c.h> #include <asm/io.h> #include <asm/arch/scu_ast2500.h> +#include <linux/err.h> #include "ast_i2c.h"
drivers/i2c/designware_i2c.c +1 -0
@@ -12,6 +12,7 @@#include <reset.h> #include <asm/io.h> #include "designware_i2c.h" +#include <linux/err.h> #ifdef CONFIG_SYS_I2C_DW_ENABLE_STATUS_UNSUPPORTED static int dw_i2c_enable (struct i2c_regs *i2c_base,bool enable)
drivers/i2c/meson_i2c.c +1 -0
@@ -7,6 +7,7 @@#include <clk.h> #include <dm.h> #include <i2c.h> +#include <linux/err.h> #define I2C_TIMEOUT_MS 100
drivers/i2c/muxes/i2c-mux-gpio.c +1 -0
@@ -11,6 +11,7 @@#include <asm-generic/gpio.h> #include <common.h> #include <dm.h> +#include <dm/devres.h> #include <dm/pinctrl.h> #include <fdtdec.h> #include <i2c.h>
drivers/i2c/tegra_i2c.c +1 -0
@@ -18,6 +18,7 @@#endif #include <asm/arch/gpio.h> #include <asm/arch-tegra/tegra_i2c.h> +#include <linux/err.h> enum i2c_type {TYPE_114 ,
drivers/misc/microchip_flexcom.c +1 -0
@@ -9,6 +9,7 @@#include <errno.h> #include <misc.h> #include <asm/io.h> +#include <linux/err.h> struct microchip_flexcom_regs {u32 cr;
drivers/misc/tegra186_bpmp.c +1 -0
@@ -12,6 +12,7 @@#include <misc.h> #include <asm/arch-tegra/bpmp_abi.h> #include <asm/arch-tegra/ivc.h> +#include <linux/err.h> #define BPMP_IVC_FRAME_COUNT 1#define BPMP_IVC_FRAME_SIZE 128
drivers/mmc/am654_sdhci.c +1 -0
@@ -12,6 +12,7 @@#include <power-domain.h> #include <regmap.h> #include <sdhci.h> +#include <linux/err.h> /* CTL_CFG Registers */ #define CTL_CFG_2 0x14
drivers/mmc/aspeed_sdhci.c +1 -0
@@ -9,6 +9,7 @@#include <dm.h> #include <malloc.h> #include <sdhci.h> +#include <linux/err.h> struct aspeed_sdhci_plat {struct mmc_config cfg;
drivers/mmc/fsl_esdhc_imx.c +1 -0
@@ -19,6 +19,7 @@#include <hwconfig.h> #include <mmc.h> #include <part.h> +#include <linux/err.h> #include <power/regulator.h> #include <malloc.h> #include <fsl_esdhc_imx.h>
drivers/mmc/omap_hsmmc.c +2 -0
@@ -47,6 +47,8 @@#include <asm/arch/mux.h> #endif #include <dm.h> +#include <dm/devres.h> +#include <linux/err.h> #include <power/regulator.h> #include <thermal.h>
drivers/mmc/rockchip_sdhci.c +1 -0
@@ -8,6 +8,7 @@#include <common.h> #include <dm.h> #include <dt-structs.h> +#include <linux/err.h> #include <linux/libfdt.h> #include <malloc.h> #include <mapmem.h>
drivers/mmc/tegra_mmc.c +1 -0
@@ -14,6 +14,7 @@#include <asm/gpio.h> #include <asm/io.h> #include <asm/arch-tegra/tegra_mmc.h> +#include <linux/err.h> struct tegra_mmc_plat {struct mmc_config cfg;
drivers/mmc/zynq_sdhci.c +1 -0
@@ -10,6 +10,7 @@#include <dm.h> #include <fdtdec.h> #include "mmc_private.h" +#include <linux/err.h> #include <linux/libfdt.h> #include <malloc.h> #include <sdhci.h>
drivers/mtd/mtd_uboot.c +1 -0
@@ -7,6 +7,7 @@#include <env.h> #include <dm/device.h> #include <dm/uclass-internal.h> +#include <linux/err.h> #include <linux/mtd/mtd.h> #include <linux/mtd/partitions.h> #include <mtd.h>
drivers/mtd/mtdconcat.c +1 -0
@@ -10,6 +10,7 @@*/ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/slab.h>
drivers/mtd/mtdcore.c +1 -0
@@ -9,6 +9,7 @@*/ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/ptrace.h>
drivers/mtd/mtdpart.c +1 -0
@@ -9,6 +9,7 @@*/ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/module.h> #include <linux/types.h> #include <linux/kernel.h>
drivers/mtd/nand/bbt.c +1 -0
@@ -10,6 +10,7 @@#define pr_fmt (fmt) "nand-bbt: " fmt#include <common.h> +#include <dm/devres.h> #include <linux/mtd/nand.h> #ifndef __UBOOT__#include <linux/slab.h>
drivers/mtd/nand/raw/atmel_nand.c +1 -0
@@ -13,6 +13,7 @@#include <common.h> #include <asm/gpio.h> #include <asm/arch/gpio.h> +#include <dm/devres.h> #include <malloc.h> #include <nand.h>
drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c +1 -0
@@ -4,6 +4,7 @@#include <asm/io.h> #include <memalign.h> #include <nand.h> +#include <linux/err.h> #include <linux/errno.h> #include <linux/io.h> #include <linux/ioport.h>
drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c +1 -0
@@ -4,6 +4,7 @@#include <asm/io.h> #include <memalign.h> #include <nand.h> +#include <linux/err.h> #include <linux/errno.h> #include <linux/io.h> #include <linux/ioport.h>
drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c +1 -0
@@ -4,6 +4,7 @@#include <asm/io.h> #include <memalign.h> #include <nand.h> +#include <linux/err.h> #include <linux/errno.h> #include <linux/io.h> #include <linux/ioport.h>
drivers/mtd/nand/raw/brcmnand/brcmnand.c +2 -0
@@ -17,6 +17,8 @@#include <memalign.h> #include <nand.h> #include <clk.h> +#include <dm/devres.h> +#include <linux/err.h> #include <linux/ioport.h> #include <linux/completion.h> #include <linux/errno.h>
drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c +1 -0
@@ -2,6 +2,7 @@#include <common.h> #include "brcmnand_compat.h" +#include <dm/devres.h> static char *devm_kvasprintf (struct udevice *dev,gfp_t gfp,const char *fmt,va_list ap)
drivers/mtd/nand/raw/denali.c +2 -0
@@ -8,8 +8,10 @@#include <cpu_func.h> #include <dm.h> #include <nand.h> +#include <dm/devres.h> #include <linux/bitfield.h> #include <linux/dma-direction.h> +#include <linux/err.h> #include <linux/errno.h> #include <linux/io.h> #include <linux/mtd/mtd.h>
drivers/mtd/nand/raw/fsl_elbc_nand.c +1 -0
@@ -11,6 +11,7 @@#include <command.h> #include <malloc.h> #include <nand.h> +#include <dm/devres.h> #include <linux/mtd/mtd.h> #include <linux/mtd/rawnand.h>
drivers/mtd/nand/raw/fsl_ifc_nand.c +1 -0
@@ -10,6 +10,7 @@#include <command.h> #include <malloc.h> #include <nand.h> +#include <dm/devres.h> #include <linux/mtd/mtd.h> #include <linux/mtd/rawnand.h>
drivers/mtd/nand/raw/mxs_nand_spl.c +1 -0
@@ -7,6 +7,7 @@#include <nand.h> #include <malloc.h> #include <mxs_nand.h> +#include <linux/err.h> static struct mtd_info *mtd;static struct nand_chip nand_chip;
drivers/mtd/nand/raw/nand_base.c +1 -0
@@ -34,6 +34,7 @@#endif #include <malloc.h> #include <watchdog.h> +#include <dm/devres.h> #include <linux/err.h> #include <linux/compat.h> #include <linux/mtd/mtd.h>
drivers/mtd/nand/raw/nand_bbt.c +1 -0
@@ -59,6 +59,7 @@#include <common.h> #include <malloc.h> +#include <dm/devres.h> #include <linux/compat.h> #include <linux/mtd/mtd.h> #include <linux/mtd/bbm.h>
drivers/mtd/nand/raw/nand_bch.c +1 -0
@@ -8,6 +8,7 @@*/ #include <common.h> +#include <dm/devres.h> /*#include <asm/io.h>*/ #include <linux/types.h>
drivers/mtd/nand/raw/nand_timings.c +1 -0
@@ -9,6 +9,7 @@* */ #include <common.h> +#include <linux/err.h> #include <linux/kernel.h> #include <linux/mtd/rawnand.h>
drivers/mtd/nand/raw/nand_util.c +1 -0
@@ -24,6 +24,7 @@#include <malloc.h> #include <memalign.h> #include <div64.h> +#include <dm/devres.h> #include <linux/errno.h> #include <linux/mtd/mtd.h>
drivers/mtd/nand/raw/pxa3xx_nand.c +2 -0
@@ -10,6 +10,8 @@#include <malloc.h> #include <fdtdec.h> #include <nand.h> +#include <dm/devres.h> +#include <linux/err.h> #include <linux/errno.h> #include <asm/io.h> #include <asm/arch/cpu.h>
drivers/mtd/nand/raw/stm32_fmc2_nand.c +1 -0
@@ -9,6 +9,7 @@#include <dm.h> #include <nand.h> #include <reset.h> +#include <linux/err.h> #include <linux/iopoll.h> #include <linux/ioport.h>
drivers/mtd/nand/raw/sunxi_nand.c +2 -0
@@ -28,6 +28,8 @@#include <fdtdec.h> #include <memalign.h> #include <nand.h> +#include <dm/devres.h> +#include <linux/err.h> #include <linux/kernel.h> #include <linux/mtd/mtd.h>
drivers/mtd/nand/spi/core.c +1 -0
@@ -24,6 +24,7 @@#include <errno.h> #include <spi.h> #include <spi-mem.h> +#include <dm/devres.h> #include <linux/mtd/spinand.h> #endif
drivers/mtd/onenand/onenand_base.c +1 -0
@@ -21,6 +21,7 @@#include <common.h> #include <watchdog.h> +#include <dm/devres.h> #include <linux/compat.h> #include <linux/mtd/mtd.h> #include "linux/mtd/flashchip.h"
drivers/mtd/spi/spi-nor-core.c +1 -0
@@ -10,6 +10,7 @@*/ #include <common.h> +#include <dm/devres.h> #include <linux/err.h> #include <linux/errno.h> #include <linux/log2.h>
drivers/mtd/ubi/attach.c +1 -0
@@ -70,6 +70,7 @@*/ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/err.h> #include <linux/slab.h> #include <linux/crc32.h>
drivers/mtd/ubi/build.c +1 -0
@@ -17,6 +17,7 @@*/ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/stringify.h>
drivers/mtd/ubi/debug.c +1 -0
@@ -10,6 +10,7 @@#include "ubi.h" #ifndef __UBOOT__#include <linux/debugfs.h> +#include <linux/err.h> #include <linux/uaccess.h> #include <linux/module.h> #endif
drivers/mtd/ubi/eba.c +1 -0
@@ -29,6 +29,7 @@*/ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/slab.h> #include <linux/crc32.h> #include <u-boot/crc.h>
drivers/mtd/ubi/fastmap.c +2 -0
@@ -7,7 +7,9 @@*/ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/crc32.h> +#include <linux/err.h> #include <u-boot/crc.h> #else #include <div64.h>
drivers/mtd/ubi/io.c +1 -0
@@ -74,6 +74,7 @@*/ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/crc32.h> #include <linux/err.h> #include <linux/slab.h>
drivers/mtd/ubi/kapi.c +1 -0
@@ -8,6 +8,7 @@/* This file mostly implements UBI kernel API functions */ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/module.h> #include <linux/slab.h> #include <linux/namei.h>
drivers/mtd/ubi/vmt.c +1 -0
@@ -11,6 +11,7 @@*/ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/err.h> #include <linux/slab.h> #include <linux/export.h>
drivers/mtd/ubi/vtbl.c +1 -0
@@ -46,6 +46,7 @@*/ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/crc32.h> #include <linux/err.h> #include <linux/slab.h>
drivers/mtd/ubi/wl.c +1 -0
@@ -86,6 +86,7 @@*/ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/slab.h> #include <linux/crc32.h> #include <linux/freezer.h>
drivers/net/designware.c +1 -0
@@ -17,6 +17,7 @@#include <malloc.h> #include <pci.h> #include <reset.h> +#include <dm/devres.h> #include <linux/compiler.h> #include <linux/err.h> #include <linux/kernel.h>
drivers/net/dwmac_socfpga.c +1 -0
@@ -14,6 +14,7 @@#include <reset.h> #include <syscon.h> #include "designware.h" +#include <linux/err.h> #include <asm/arch/system_manager.h>
drivers/net/mvneta.c +1 -0
@@ -20,6 +20,7 @@#include <config.h> #include <malloc.h> #include <asm/io.h> +#include <dm/devres.h> #include <linux/errno.h> #include <phy.h> #include <miiphy.h>
drivers/net/mvpp2.c +2 -0
@@ -17,12 +17,14 @@#include <cpu_func.h> #include <dm.h> #include <dm/device-internal.h> +#include <dm/devres.h> #include <dm/lists.h> #include <net.h> #include <netdev.h> #include <config.h> #include <malloc.h> #include <asm/io.h> +#include <linux/err.h> #include <linux/errno.h> #include <phy.h> #include <miiphy.h>
drivers/net/phy/dp83867.c +1 -0
@@ -5,6 +5,7 @@*/ #include <common.h> #include <phy.h> +#include <dm/devres.h> #include <linux/compat.h> #include <malloc.h>
drivers/net/sni_ave.c +1 -0
@@ -8,6 +8,7 @@#include <cpu_func.h> #include <dm.h> #include <fdt_support.h> +#include <linux/err.h> #include <linux/io.h> #include <linux/iopoll.h> #include <miiphy.h>
drivers/net/zynq_gem.c +1 -0
@@ -25,6 +25,7 @@#include <asm/system.h> #include <asm/arch/hardware.h> #include <asm/arch/sys_proto.h> +#include <linux/err.h> #include <linux/errno.h> /* Bit/mask specification */
drivers/pci/pcie_dw_ti.c +1 -0
@@ -12,6 +12,7 @@#include <syscon.h> #include <asm/io.h> #include <asm-generic/gpio.h> +#include <linux/err.h> DECLARE_GLOBAL_DATA_PTR ;
drivers/pci/pcie_mediatek.c +1 -0
@@ -14,6 +14,7 @@#include <pci.h> #include <reset.h> #include <asm/io.h> +#include <dm/devres.h> #include <linux/iopoll.h> #include <linux/list.h>
drivers/phy/allwinner/phy-sun4i-usb.c +1 -0
@@ -21,6 +21,7 @@#include <asm/io.h> #include <asm/arch/clock.h> #include <asm/arch/cpu.h> +#include <linux/err.h> #define REG_ISCR 0x00#define REG_PHYCTL_A10 0x04
drivers/phy/marvell/comphy_core.c +1 -0
@@ -8,6 +8,7 @@#include <common.h> #include <dm.h> #include <fdtdec.h> +#include <linux/err.h> #include <linux/errno.h> #include <asm/io.h>
drivers/phy/omap-usb2-phy.c +1 -0
@@ -13,6 +13,7 @@#include <generic-phy.h> #include <regmap.h> #include <syscon.h> +#include <linux/err.h> #define OMAP_USB2_CALIBRATE_FALSE_DISCONNECT BIT(0)
drivers/phy/phy-mtk-tphy.c +1 -0
@@ -11,6 +11,7 @@#include <generic-phy.h> #include <mapmem.h> #include <asm/io.h> +#include <dm/devres.h> #include <dt-bindings/phy/phy.h>
drivers/phy/phy-ti-am654.c +1 -0
@@ -18,6 +18,7 @@#include <power-domain.h> #include <regmap.h> #include <syscon.h> +#include <linux/err.h> #define CMU_R07C 0x7c#define CMU_MASTER_CDN_O BIT(24)
drivers/phy/ti-pipe3-phy.c +1 -0
@@ -12,6 +12,7 @@#include <asm/arch/sys_proto.h> #include <syscon.h> #include <regmap.h> +#include <linux/err.h> /* PLLCTRL Registers */ #define PLL_STATUS 0x00000004
drivers/pinctrl/intel/pinctrl.c +1 -0
@@ -28,6 +28,7 @@#include <asm/arch/itss.h> #include <dm/device-internal.h> #include <dt-bindings/gpio/gpio.h> +#include <linux/err.h> #define GPIO_DW_SIZE (x) (sizeof(u32) * (x))#define PAD_CFG_OFFSET (x, dw_num) ((x) + GPIO_DW_SIZE(dw_num))
drivers/pinctrl/mscc/mscc-common.c +1 -0
@@ -14,6 +14,7 @@#include <config.h> #include <dm.h> #include <dm/device-internal.h> +#include <dm/devres.h> #include <dm/lists.h> #include <dm/pinctrl.h> #include <dm/root.h>
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c +1 -0
@@ -20,6 +20,7 @@#include <config.h> #include <dm.h> #include <dm/device-internal.h> +#include <dm/devres.h> #include <dm/lists.h> #include <dm/pinctrl.h> #include <dm/root.h>
drivers/pinctrl/nxp/pinctrl-imx.c +1 -0
@@ -5,6 +5,7 @@#include <common.h> #include <mapmem.h> +#include <dm/devres.h> #include <linux/io.h> #include <linux/err.h> #include <dm.h>
drivers/pinctrl/nxp/pinctrl-mxs.c +1 -0
@@ -5,6 +5,7 @@*/ #include <common.h> +#include <dm/devres.h> #include <linux/io.h> #include <linux/err.h> #include <dm.h>
drivers/pinctrl/pinctrl_stm32.c +1 -0
@@ -6,6 +6,7 @@#include <asm/io.h> #include <dm/lists.h> #include <dm/pinctrl.h> +#include <linux/err.h> DECLARE_GLOBAL_DATA_PTR ;
drivers/pinctrl/renesas/pfc.c +1 -0
@@ -14,6 +14,7 @@#include <common.h> #include <dm.h> #include <errno.h> +#include <dm/devres.h> #include <dm/pinctrl.h> #include <linux/io.h> #include <linux/sizes.h>
drivers/power/domain/meson-ee-pwrc.c +1 -0
@@ -13,6 +13,7 @@#include <clk.h> #include <dt-bindings/power/meson-g12a-power.h> #include <dt-bindings/power/meson-sm1-power.h> +#include <linux/err.h> /* AO Offsets */
drivers/power/domain/meson-gx-pwrc-vpu.c +1 -0
@@ -13,6 +13,7 @@#include <syscon.h> #include <reset.h> #include <clk.h> +#include <linux/err.h> enum {VPU_PWRC_COMPATIBLE_GX =0 ,
drivers/power/domain/mtk-power-domain.c +1 -0
@@ -12,6 +12,7 @@#include <syscon.h> #include <asm/io.h> #include <asm/processor.h> +#include <linux/err.h> #include <linux/iopoll.h> #include <dt-bindings/power/mt7623-power.h>
drivers/power/domain/ti-sci-power-domain.c +1 -0
@@ -12,6 +12,7 @@#include <dm.h> #include <errno.h> #include <power-domain-uclass.h> +#include <linux/err.h> #include <linux/soc/ti/ti_sci_protocol.h> #include <dt-bindings/soc/ti,sci_pm_domain.h>
drivers/power/regulator/pbias_regulator.c +1 -0
@@ -7,6 +7,7 @@#include <common.h> #include <errno.h> #include <dm.h> +#include <linux/err.h> #include <power/pmic.h> #include <power/regulator.h> #include <regmap.h>
drivers/ram/rockchip/dmc-rk3368.c +1 -0
@@ -18,6 +18,7 @@#include <asm/arch-rockchip/ddr_rk3368.h> #include <asm/arch-rockchip/sdram.h> #include <asm/arch-rockchip/sdram_rk3288.h> +#include <linux/err.h> struct dram_info {struct ram_info info;
drivers/remoteproc/rproc-elf-loader.c +1 -0
@@ -7,6 +7,7 @@#include <dm.h> #include <elf.h> #include <remoteproc.h> +#include <linux/err.h> /** * struct resource_table - firmware resource table header
drivers/remoteproc/stm32_copro.c +1 -0
@@ -12,6 +12,7 @@#include <reset.h> #include <syscon.h> #include <asm/io.h> +#include <linux/err.h> #define RCC_GCR_HOLD_BOOT 0#define RCC_GCR_RELEASE_BOOT 1
drivers/remoteproc/ti_k3_arm64_rproc.c +1 -0
@@ -15,6 +15,7 @@#include <reset.h> #include <asm/io.h> #include <power-domain.h> +#include <linux/err.h> #include <linux/soc/ti/ti_sci_protocol.h> #include "ti_sci_proc.h"
drivers/remoteproc/ti_k3_dsp_rproc.c +1 -0
@@ -15,6 +15,7 @@#include <reset.h> #include <asm/io.h> #include <power-domain.h> +#include <linux/err.h> #include <linux/soc/ti/ti_sci_protocol.h> #include "ti_sci_proc.h"
drivers/remoteproc/ti_k3_r5f_rproc.c +1 -0
@@ -13,6 +13,7 @@#include <clk.h> #include <reset.h> #include <asm/io.h> +#include <linux/err.h> #include <linux/kernel.h> #include <linux/soc/ti/ti_sci_protocol.h> #include "ti_sci_proc.h"
drivers/reset/reset-mediatek.c +1 -0
@@ -12,6 +12,7 @@#include <regmap.h> #include <reset-uclass.h> #include <syscon.h> +#include <linux/err.h> struct mediatek_reset_priv {struct regmap *regmap;
drivers/reset/reset-ti-sci.c +1 -0
@@ -12,6 +12,7 @@#include <dm.h> #include <errno.h> #include <reset-uclass.h> +#include <linux/err.h> #include <linux/soc/ti/ti_sci_protocol.h> /**
drivers/reset/reset-uclass.c +1 -0
@@ -8,6 +8,7 @@#include <fdtdec.h> #include <reset.h> #include <reset-uclass.h> +#include <dm/devres.h> static inline struct reset_ops *reset_dev_ops (struct udevice *dev) {
drivers/serial/ns16550.c +1 -0
@@ -12,6 +12,7 @@#include <reset.h> #include <serial.h> #include <watchdog.h> +#include <linux/err.h> #include <linux/types.h> #include <asm/io.h>
drivers/serial/serial_mtk.c +2 -1
@@ -15,6 +15,7 @@#include <watchdog.h> #include <asm/io.h> #include <asm/types.h> +#include <linux/err.h> struct mtk_serial_regs {u32 rbr;
@@ -454,4 +455,4 @@ static inline void _debug_uart_putc(int ch) DEBUG_UART_FUNCS -#endif +#endif
drivers/serial/serial_omap.c +1 -0
@@ -12,6 +12,7 @@#include <ns16550.h> #include <serial.h> #include <clk.h> +#include <linux/err.h> #ifndef CONFIG_SYS_NS16550_CLK #define CONFIG_SYS_NS16550_CLK 0
drivers/serial/serial_sifive.c +1 -0
@@ -13,6 +13,7 @@#include <asm/io.h> #include <linux/compiler.h> #include <serial.h> +#include <linux/err.h> DECLARE_GLOBAL_DATA_PTR ;
drivers/serial/serial_zynq.c +1 -0
@@ -14,6 +14,7 @@#include <asm/io.h> #include <linux/compiler.h> #include <serial.h> +#include <linux/err.h> DECLARE_GLOBAL_DATA_PTR ;
drivers/smem/msm_smem.c +2 -0
@@ -8,9 +8,11 @@#include <common.h> #include <errno.h> #include <dm.h> +#include <dm/devres.h> #include <dm/of_access.h> #include <dm/of_addr.h> #include <asm/io.h> +#include <linux/err.h> #include <linux/ioport.h> #include <linux/io.h> #include <smem.h>
drivers/soc/ti/k3-navss-ringacc.c +2 -0
@@ -11,9 +11,11 @@#include <asm/dma-mapping.h> #include <asm/bitops.h> #include <dm.h> +#include <dm/devres.h> #include <dm/read.h> #include <dm/uclass.h> #include <linux/compat.h> +#include <linux/err.h> #include <linux/soc/ti/k3-navss-ringacc.h> #include <linux/soc/ti/ti_sci_protocol.h>
drivers/spi/atmel-quadspi.c +1 -0
@@ -15,6 +15,7 @@#include <dm.h> #include <errno.h> #include <fdtdec.h> +#include <linux/err.h> #include <linux/io.h> #include <linux/iopoll.h> #include <linux/ioport.h>
drivers/spi/cadence_qspi.c +1 -0
@@ -11,6 +11,7 @@#include <malloc.h> #include <reset.h> #include <spi.h> +#include <linux/err.h> #include <linux/errno.h> #include "cadence_qspi.h"
drivers/spi/spi-mem.c +1 -0
@@ -7,6 +7,7 @@*/ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/dmaengine.h> #include <linux/pm_runtime.h> #include "internals.h"
drivers/spi/ti_qspi.c +1 -0
@@ -17,6 +17,7 @@#include <asm/omap_gpio.h> #include <asm/omap_common.h> #include <asm/ti-common/ti-edma3.h> +#include <linux/err.h> #include <linux/kernel.h> #include <regmap.h> #include <syscon.h>
drivers/spi/zynqmp_gqspi.c +1 -0
@@ -16,6 +16,7 @@#include <spi.h> #include <ubi_uboot.h> #include <wait_bit.h> +#include <linux/err.h> #define GQSPI_GFIFO_STRT_MODE_MASK BIT(29)#define GQSPI_CONFIG_MODE_EN_MASK (3 << 30)
drivers/sysreset/sysreset-ti-sci.c +1 -0
@@ -10,6 +10,7 @@#include <dm.h> #include <errno.h> #include <sysreset.h> +#include <linux/err.h> #include <linux/soc/ti/ti_sci_protocol.h> /**
drivers/sysreset/sysreset_syscon.c +1 -0
@@ -13,6 +13,7 @@#include <regmap.h> #include <sysreset.h> #include <syscon.h> +#include <linux/err.h> struct syscon_reboot_priv {struct regmap *regmap;
drivers/tee/optee/core.c +1 -0
@@ -8,6 +8,7 @@#include <log.h> #include <tee.h> #include <linux/arm-smccc.h> +#include <linux/err.h> #include <linux/io.h> #include "optee_smc.h"
drivers/timer/ast_timer.c +1 -0
@@ -9,6 +9,7 @@#include <timer.h> #include <asm/io.h> #include <asm/arch/timer.h> +#include <linux/err.h> #define AST_TICK_TIMER 1#define AST_TMC_RELOAD_VAL 0xffffffff
drivers/timer/cadence-ttc.c +1 -0
@@ -8,6 +8,7 @@#include <errno.h> #include <timer.h> #include <asm/io.h> +#include <linux/err.h> #define CNT_CNTRL_RESET BIT(4)
drivers/timer/timer-uclass.c +1 -0
@@ -11,6 +11,7 @@#include <clk.h> #include <errno.h> #include <timer.h> +#include <linux/err.h> DECLARE_GLOBAL_DATA_PTR ;
drivers/ufs/cdns-platform.c +1 -0
@@ -9,6 +9,7 @@#include <common.h> #include <dm.h> #include <ufs.h> +#include <linux/err.h> #include "ufs.h"
drivers/ufs/ti-j721e-ufs.c +1 -0
@@ -7,6 +7,7 @@#include <clk.h> #include <common.h> #include <dm.h> +#include <linux/err.h> #define UFS_SS_CTRL 0x4#define UFS_SS_RST_N_PCS BIT(0)
drivers/ufs/ufs.c +1 -0
@@ -11,6 +11,7 @@#include <charset.h> #include <common.h> #include <dm.h> +#include <dm/devres.h> #include <dm/lists.h> #include <dm/device-internal.h> #include <malloc.h>
drivers/usb/cdns3/core.c +1 -0
@@ -14,6 +14,7 @@#include <common.h> #include <dm.h> #include <dm/device-internal.h> +#include <dm/devres.h> #include <dm/lists.h> #include <linux/kernel.h> #include <linux/io.h>
drivers/usb/cdns3/gadget.c +2 -0
@@ -57,6 +57,8 @@*/ #include <dm.h> +#include <dm/devres.h> +#include <linux/err.h> #include <linux/usb/gadget.h> #include <linux/compat.h> #include <linux/iopoll.h>
drivers/usb/cdns3/host.c +1 -0
@@ -9,6 +9,7 @@* Pawel Laszczak <[email protected]> */ #include <dm.h> +#include <dm/devres.h> #include <linux/compat.h> #include <usb.h> #include <usb/xhci.h>
drivers/usb/dwc3/core.c +2 -0
@@ -18,6 +18,8 @@#include <malloc.h> #include <dwc3-uboot.h> #include <asm/dma-mapping.h> +#include <dm/devres.h> +#include <linux/err.h> #include <linux/ioport.h> #include <dm.h> #include <generic-phy.h>
drivers/usb/dwc3/dwc3-omap.c +1 -0
@@ -18,6 +18,7 @@#include <asm/io.h> #include <dm.h> #include <dwc3-omap-uboot.h> +#include <dm/devres.h> #include <linux/usb/dwc3-omap.h> #include <linux/ioport.h>
drivers/usb/dwc3/gadget.c +1 -0
@@ -17,6 +17,7 @@#include <cpu_func.h> #include <malloc.h> #include <asm/dma-mapping.h> +#include <dm/devres.h> #include <linux/bug.h> #include <linux/list.h>
drivers/usb/dwc3/ti_usb_phy.c +1 -0
@@ -19,6 +19,7 @@#include <common.h> #include <malloc.h> #include <ti-usb-phy-uboot.h> +#include <dm/devres.h> #include <linux/ioport.h> #include <asm/io.h> #include <asm/arch/sys_proto.h>
drivers/usb/gadget/at91_udc.c +2 -0
@@ -14,6 +14,8 @@#undef PACKET_TRACE#include <common.h> +#include <dm/devres.h> +#include <linux/err.h> #include <linux/errno.h> #include <asm/io.h> #include <asm/gpio.h>
drivers/usb/gadget/composite.c +1 -0
@@ -7,6 +7,7 @@*/ #undef DEBUG +#include <dm/devres.h> #include <linux/bitops.h> #include <linux/usb/composite.h>
drivers/usb/gadget/dwc2_udc_otg.c +1 -0
@@ -23,6 +23,7 @@#include <generic-phy.h> #include <malloc.h> #include <reset.h> +#include <dm/devres.h> #include <linux/errno.h> #include <linux/list.h>
drivers/usb/gadget/f_mass_storage.c +1 -0
@@ -245,6 +245,7 @@#include <common.h> #include <console.h> #include <g_dnl.h> +#include <dm/devres.h> #include <linux/err.h> #include <linux/usb/ch9.h>
drivers/usb/gadget/pxa25x_udc.c +1 -0
@@ -22,6 +22,7 @@#include <asm/system.h> #include <asm/mach-types.h> #include <asm/unaligned.h> +#include <dm/devres.h> #include <linux/compat.h> #include <malloc.h> #include <asm/io.h>
drivers/usb/gadget/udc/udc-core.c +1 -0
@@ -13,6 +13,7 @@* usb_ */ +#include <dm/devres.h> #include <linux/compat.h> #include <malloc.h> #include <asm/cache.h>
drivers/usb/host/ehci-generic.c +1 -0
@@ -5,6 +5,7 @@#include <common.h> #include <clk.h> +#include <dm/devres.h> #include <dm/ofnode.h> #include <generic-phy.h> #include <reset.h>
drivers/usb/host/ohci-da8xx.c +1 -0
@@ -7,6 +7,7 @@#include <asm/io.h> #include <clk.h> #include <dm.h> +#include <dm/devres.h> #include <dm/ofnode.h> #include <generic-phy.h> #include <reset.h>
drivers/usb/host/ohci-generic.c +1 -0
@@ -6,6 +6,7 @@#include <common.h> #include <clk.h> #include <dm.h> +#include <dm/devres.h> #include <dm/ofnode.h> #include <generic-phy.h> #include <reset.h>
drivers/usb/musb-new/am35x.c +1 -0
@@ -12,6 +12,7 @@*/ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/init.h> #include <linux/module.h> #include <linux/clk.h>
drivers/usb/musb-new/musb_core.c +1 -0
@@ -65,6 +65,7 @@*/ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/sched.h>
drivers/usb/musb-new/musb_dsps.c +1 -0
@@ -15,6 +15,7 @@*/ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/init.h> #include <linux/io.h> #include <linux/err.h>
drivers/usb/musb-new/musb_gadget.c +1 -0
@@ -9,6 +9,7 @@*/ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/kernel.h> #include <linux/list.h> #include <linux/timer.h>
drivers/usb/musb-new/musb_host.c +1 -0
@@ -9,6 +9,7 @@*/ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/delay.h>
drivers/usb/musb-new/musb_uboot.c +1 -0
@@ -1,6 +1,7 @@#include <common.h> #include <console.h> #include <watchdog.h> +#include <linux/err.h> #include <linux/errno.h> #include <linux/usb/ch9.h> #include <linux/usb/gadget.h>
drivers/usb/musb-new/omap2430.c +1 -0
@@ -13,6 +13,7 @@#include <serial.h> #include <dm/device-internal.h> #include <dm/lists.h> +#include <linux/err.h> #include <linux/usb/otg.h> #include <asm/omap_common.h> #include <asm/omap_musb.h>
drivers/video/exynos/exynos_mipi_dsi.c +1 -0
@@ -9,6 +9,7 @@#include <common.h> #include <malloc.h> #include <fdtdec.h> +#include <dm/devres.h> #include <linux/libfdt.h> #include <linux/compat.h> #include <linux/err.h>
drivers/video/mipi_dsi.c +1 -0
@@ -38,6 +38,7 @@#include <dm.h> #include <mipi_display.h> #include <mipi_dsi.h> +#include <dm/devres.h> /** * DOC: dsi helpers
drivers/video/rockchip/rk3288_mipi.c +1 -0
@@ -16,6 +16,7 @@#include <asm/gpio.h> #include <asm/io.h> #include <dm/uclass-internal.h> +#include <linux/err.h> #include <linux/kernel.h> #include <asm/arch-rockchip/clock.h> #include <asm/arch-rockchip/cru_rk3288.h>
drivers/video/rockchip/rk3399_mipi.c +1 -0
@@ -16,6 +16,7 @@#include <asm/gpio.h> #include <asm/io.h> #include <dm/uclass-internal.h> +#include <linux/err.h> #include <linux/kernel.h> #include <asm/arch-rockchip/clock.h> #include <asm/arch-rockchip/cru_rk3399.h>
drivers/video/rockchip/rk_vop.c +1 -0
@@ -19,6 +19,7 @@#include <asm/arch-rockchip/vop_rk3288.h> #include <dm/device-internal.h> #include <dm/uclass-internal.h> +#include <linux/err.h> #include <power/regulator.h> #include "rk_vop.h"
drivers/video/tegra124/sor.c +1 -0
@@ -15,6 +15,7 @@#include <asm/arch-tegra/dc.h> #include "displayport.h" #include "sor.h" +#include <linux/err.h> #define DEBUG_SOR 0
drivers/virtio/virtio_mmio.c +1 -0
@@ -13,6 +13,7 @@#include <virtio.h> #include <virtio_ring.h> #include <linux/compat.h> +#include <linux/err.h> #include <linux/io.h> #include "virtio_mmio.h"
drivers/virtio/virtio_pci_legacy.c +1 -0
@@ -13,6 +13,7 @@#include <virtio_ring.h> #include <dm/device.h> #include <linux/compat.h> +#include <linux/err.h> #include <linux/io.h> #include "virtio_pci.h"
drivers/virtio/virtio_pci_modern.c +1 -0
@@ -13,6 +13,7 @@#include <virtio_ring.h> #include <dm/device.h> #include <linux/compat.h> +#include <linux/err.h> #include <linux/io.h> #include "virtio_pci.h"
drivers/virtio/virtio_sandbox.c +1 -0
@@ -11,6 +11,7 @@#include <virtio.h> #include <virtio_ring.h> #include <linux/compat.h> +#include <linux/err.h> #include <linux/io.h> struct virtio_sandbox_priv {
drivers/watchdog/ast_wdt.c +1 -0
@@ -9,6 +9,7 @@#include <wdt.h> #include <asm/io.h> #include <asm/arch/wdt.h> +#include <linux/err.h> #define WDT_AST2500 2500#define WDT_AST2400 2400
drivers/watchdog/cdns_wdt.c +1 -0
@@ -11,6 +11,7 @@#include <wdt.h> #include <clk.h> #include <div64.h> +#include <linux/err.h> #include <linux/io.h> DECLARE_GLOBAL_DATA_PTR ;
drivers/watchdog/sp805_wdt.c +1 -0
@@ -13,6 +13,7 @@#include <linux/bitops.h> #include <watchdog.h> #include <wdt.h> +#include <linux/err.h> #define WDTLOAD 0x000#define WDTCONTROL 0x008
drivers/watchdog/xilinx_tb_wdt.c +1 -0
@@ -11,6 +11,7 @@#include <common.h> #include <dm.h> #include <wdt.h> +#include <linux/err.h> #include <linux/io.h> #define XWT_CSR0_WRS_MASK 0x00000008/* Reset status Mask */
fs/ubifs/debug.c +1 -0
@@ -16,6 +16,7 @@*/ #include <hexdump.h> +#include <dm/devres.h> #ifndef __UBOOT__#include <linux/module.h>
fs/ubifs/gc.c +1 -0
@@ -41,6 +41,7 @@* good, and GC takes extra care when moving them. */ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/slab.h> #include <linux/pagemap.h> #include <linux/list_sort.h>
fs/ubifs/io.c +1 -0
@@ -59,6 +59,7 @@*/ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/crc32.h> #include <linux/slab.h> #include <u-boot/crc.h>
fs/ubifs/log.c +1 -0
@@ -16,6 +16,7 @@*/ #ifdef __UBOOT__ +#include <dm/devres.h> #include <linux/err.h> #endif #include "ubifs.h"
fs/ubifs/lpt.c +1 -0
@@ -33,6 +33,7 @@#include "ubifs.h" #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/crc16.h> #include <linux/math64.h> #include <linux/slab.h>
fs/ubifs/lpt_commit.c +1 -0
@@ -14,6 +14,7 @@*/ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/crc16.h> #include <linux/slab.h> #include <linux/random.h>
fs/ubifs/master.c +1 -0
@@ -12,6 +12,7 @@#include "ubifs.h" #ifdef __UBOOT__ +#include <dm/devres.h> #include <linux/compat.h> #include <linux/err.h> #include <ubi_uboot.h>
fs/ubifs/orphan.c +1 -0
@@ -7,6 +7,7 @@* Author: Adrian Hunter */ +#include <dm/devres.h> #include <linux/err.h> #include "ubifs.h"
fs/ubifs/recovery.c +1 -0
@@ -36,6 +36,7 @@*/ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/crc32.h> #include <linux/slab.h> #include <u-boot/crc.h>
fs/ubifs/replay.c +1 -0
@@ -21,6 +21,7 @@*/ #ifdef __UBOOT__ +#include <dm/devres.h> #include <linux/compat.h> #include <linux/err.h> #endif
fs/ubifs/sb.c +1 -0
@@ -16,6 +16,7 @@#include "ubifs.h" #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/slab.h> #include <linux/random.h> #include <linux/math64.h>
fs/ubifs/scan.c +1 -0
@@ -17,6 +17,7 @@#ifdef __UBOOT__#include <hexdump.h> +#include <dm/devres.h> #include <linux/err.h> #endif #include "ubifs.h"
fs/ubifs/super.c +1 -0
@@ -15,6 +15,7 @@*/ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/init.h> #include <linux/slab.h> #include <linux/module.h>
fs/ubifs/tnc.c +1 -0
@@ -19,6 +19,7 @@*/ #ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/crc32.h> #include <linux/slab.h> #include <u-boot/crc.h>
fs/ubifs/tnc_misc.c +1 -0
@@ -16,6 +16,7 @@*/ #ifdef __UBOOT__ +#include <dm/devres.h> #include <linux/err.h> #endif #include "ubifs.h"
fs/ubifs/ubifs.c +1 -0
@@ -16,6 +16,7 @@#include <gzip.h> #include <memalign.h> #include "ubifs.h" +#include <dm/devres.h> #include <u-boot/zlib.h> #include <linux/compat.h>
fs/yaffs2/yaffs_allocator.c +1 -0
@@ -15,6 +15,7 @@#include "yaffs_guts.h" #include "yaffs_trace.h" #include "yportenv.h" +#include <dm/devres.h> /* * Each entry in yaffs_tnode_list and yaffs_obj_list hold blocks
fs/yaffs2/yaffs_checkptrw.c +1 -0
@@ -13,6 +13,7 @@#include "yaffs_checkptrw.h" #include "yaffs_getblockinfo.h" +#include <dm/devres.h> static int yaffs2_checkpt_space_ok (struct yaffs_dev *dev) {
fs/yaffs2/yaffs_guts.c +1 -0
@@ -13,6 +13,7 @@#include "yportenv.h" #include "yaffs_trace.h" +#include <dm/devres.h> #include "yaffs_guts.h" #include "yaffs_getblockinfo.h"
fs/yaffs2/yaffs_summary.c +1 -0
@@ -28,6 +28,7 @@#include "yaffs_nand.h" #include "yaffs_getblockinfo.h" #include "yaffs_bitmap.h" +#include <dm/devres.h> /* * The summary is built up in an array of summary tags.
fs/yaffs2/yaffs_yaffs1.c +1 -0
@@ -18,6 +18,7 @@#include "yaffs_getblockinfo.h" #include "yaffs_nand.h" #include "yaffs_attribs.h" +#include <dm/devres.h> int yaffs1_scan (struct yaffs_dev *dev) {
fs/yaffs2/yaffs_yaffs2.c +1 -0
@@ -21,6 +21,7 @@#include "yaffs_verify.h" #include "yaffs_attribs.h" #include "yaffs_summary.h" +#include <dm/devres.h> /* * Checkpoints are really no benefit on very small partitions.
fs/yaffs2/yaffsfs.c +1 -0
@@ -17,6 +17,7 @@#include "yaffscfg.h" #include "yportenv.h" #include "yaffs_trace.h" +#include <dm/devres.h> #define YAFFSFS_MAX_SYMLINK_DEREFERENCES 5
include/dm/device.h +0 -2
@@ -720,8 +720,6 @@ static inline bool device_is_on_pci_bus(struct udevice *dev)*/ int dm_scan_fdt_dev (struct udevice *dev); -#include <dm/devres.h> -/* * REVISIT: * remove the following after resolving conflicts with <linux/compat.h>
include/dm/devres.h +4 -0
@@ -11,6 +11,10 @@#ifndef _DM_DEVRES_H#define _DM_DEVRES_H +#include <linux/compat.h> + +struct udevice ; +/* device resource management */ typedef void (*dr_release_t )(struct udevice *dev,void *res);typedef int (*dr_match_t )(struct udevice *dev,void *res,void *match_data);
lib/bch.c +1 -0
@@ -56,6 +56,7 @@#ifndef USE_HOSTCC #include <common.h> #include <ubi_uboot.h> +#include <dm/devres.h> #include <linux/bitops.h> #else
lib/crypto/asymmetric_type.c +2 -0
@@ -7,6 +7,7 @@* Written by David Howells (dhowells at redhat.com) */ #ifndef __UBOOT__ +#include <dm/devres.h> #include <keys/asymmetric-subtype.h> #include <keys/asymmetric-parser.h> #endif
@@ -14,6 +15,7 @@#ifdef __UBOOT__#include <linux/compat.h> #include <linux/ctype.h> +#include <linux/err.h> #include <linux/string.h> #else #include <linux/seq_file.h>
lib/crypto/pkcs7_parser.c +1 -0
@@ -7,6 +7,7 @@#define pr_fmt (fmt) "PKCS7: "fmt#ifdef __UBOOT__ +#include <dm/devres.h> #include <linux/bitops.h> #include <linux/compat.h> #endif
lib/crypto/public_key.c +2 -0
@@ -9,7 +9,9 @@#define pr_fmt (fmt) "PKEY: "fmt#ifdef __UBOOT__ +#include <dm/devres.h> #include <linux/compat.h> +#include <linux/err.h> #else #include <linux/module.h> #include <linux/export.h>
lib/crypto/x509_cert_parser.c +1 -0
@@ -6,6 +6,7 @@*/ #define pr_fmt (fmt) "X.509: "fmt +#include <dm/devres.h> #include <linux/kernel.h> #ifndef __UBOOT__#include <linux/export.h>
lib/crypto/x509_public_key.c +2 -0
@@ -8,7 +8,9 @@#define pr_fmt (fmt) "X.509: "fmt#ifdef __UBOOT__#include <common.h> +#include <dm/devres.h> #include <linux/compat.h> +#include <linux/err.h> #include <linux/errno.h> #else #include <linux/module.h>
lib/list_sort.c +1 -0
@@ -1,4 +1,5 @@#ifndef __UBOOT__ +#include <dm/devres.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/slab.h>
test/dm/devres.c +1 -0
@@ -10,6 +10,7 @@#include <dm.h> #include <malloc.h> #include <dm/device-internal.h> +#include <dm/devres.h> #include <dm/test.h> #include <dm/uclass-internal.h> #include <test/ut.h>
test/dm/regmap.c +1 -0
@@ -10,6 +10,7 @@#include <syscon.h> #include <asm/test.h> #include <dm/test.h> +#include <linux/err.h> #include <test/ut.h> /* Base test of register maps */
test/dm/syscon.c +1 -0
@@ -9,6 +9,7 @@#include <regmap.h> #include <asm/test.h> #include <dm/test.h> +#include <linux/err.h> #include <test/ut.h> /* Base test of system controllers */
test/dm/test-fdt.c +1 -0
@@ -12,6 +12,7 @@#include <dm/test.h> #include <dm/root.h> #include <dm/device-internal.h> +#include <dm/devres.h> #include <dm/uclass-internal.h> #include <dm/util.h> #include <dm/lists.h>
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 29/33 dm: core: Require users of devres to include the header
Quoted 6 lines · On Sun, 12 Jan 2020 12:06:20 -0700 Simon Glass sjg at chromium.org wrote:
At present
devres.his included in all files that includedm.hbut few make use of it. Also this pulls in linux/compat which adds several more headers. Drop the automatic inclusion and require files to include devres themselves. This provides a good indication of which files use devres.Signed-off-by Simon Glass <[email protected]>
--
Anatolij
PATCH 30/33 dm: core: Create a new header file for 'compat' features
In reply to Simon GlassAt present dm/device.h includes the linux-compatible features. This requires including linux/compat.h which in turn includes a lot of headers. One of these is malloc.h which we thus end up including in every file in U-Boot. Apart from the inefficiency of this, it is problematic for sandbox which needs to use the system malloc() in some files.
Move the compatibility features into a separate header file.
---
arch/arm/mach-imx/cmd_nandbcb.c | 1 + arch/arm/mach-imx/imx8/image.c | 1 + arch/arm/mach-mvebu/mbus.c | 1 + arch/arm/mach-rockchip/rk3288/rk3288.c | 1 + arch/arm/mach-rockchip/rk3308/rk3308.c | 1 + arch/arm/mach-socfpga/clock_manager_agilex.c | 1 + arch/arm/mach-socfpga/clock_manager_arria10.c | 1 + arch/arm/mach-stm32mp/pwr_regulator.c | 1 + arch/arm/mach-tegra/cboot.c | 1 + arch/arm/mach-zynq/clk.c | 1 + arch/arm/mach-zynq/timer.c | 1 + arch/mips/mach-mtmips/cpu.c | 1 + arch/mips/mach-pic32/cpu.c | 1 + arch/sandbox/cpu/cpu.c | 1 + arch/x86/cpu/apollolake/fsp_s.c | 1 + arch/x86/cpu/apollolake/itss.c | 1 + arch/x86/cpu/apollolake/spl.c | 1 + arch/x86/cpu/apollolake/uart.c | 1 + arch/x86/cpu/qemu/e820.c | 1 + arch/x86/cpu/qfw_cpu.c | 1 + arch/x86/lib/coreboot_table.c | 1 + arch/x86/lib/fsp1/fsp_common.c | 1 + arch/x86/lib/mrccache.c | 1 + arch/x86/lib/tables.c | 1 + board/compulab/common/common.c | 1 + board/corscience/tricorder/tricorder.c | 1 + board/gardena/smart-gateway-mt7688/board.c | 1 + board/ge/common/vpd_reader.c | 1 + board/isee/igep003x/board.c | 1 + board/isee/igep00x0/igep00x0.c | 1 + board/menlo/m53menlo/m53menlo.c | 1 + board/microchip/pic32mzda/pic32mzda.c | 1 + board/overo/overo.c | 1 + board/siemens/common/board.c | 1 + board/siemens/pxm2/board.c | 1 + board/siemens/rut/board.c | 1 + board/st/stm32mp1/stm32mp1.c | 1 + board/synopsys/hsdk/clk-lib.c | 1 + board/technexion/tao3530/tao3530.c | 1 + board/ti/am335x/board.c | 1 + board/ti/am57xx/board.c | 1 + board/timll/devkit8000/devkit8000.c | 1 + cmd/bootefi.c | 1 + cmd/gpio.c | 1 + cmd/host.c | 1 + cmd/rng.c | 1 + cmd/tpm-common.c | 1 + cmd/ubi.c | 1 + cmd/usb_mass_storage.c | 1 + cmd/ximg.c | 1 + common/android_ab.c | 1 + common/autoboot.c | 1 + common/image-fdt.c | 1 + common/image.c | 1 + common/usb.c | 1 + common/usb_hub.c | 1 + drivers/adc/stm32-adc-core.c | 1 + drivers/adc/stm32-adc.c | 1 + drivers/axi/sandbox_store.c | 1 + drivers/block/blk-uclass.c | 1 + drivers/block/sandbox.c | 1 + drivers/clk/altera/clk-arria10.c | 2 + drivers/clk/at91/clk-generated.c | 1 + drivers/clk/at91/clk-h32mx.c | 1 + drivers/clk/at91/clk-peripheral.c | 1 + drivers/clk/clk-cdce9xx.c | 1 + drivers/clk/clk-ti-sci.c | 2 + drivers/clk/clk-uclass.c | 1 + drivers/clk/clk_sandbox.c | 1 + drivers/clk/clk_sandbox_ccf.c | 1 + drivers/clk/clk_sandbox_test.c | 2 + drivers/clk/clk_versal.c | 1 + drivers/clk/clk_vexpress_osc.c | 1 + drivers/clk/clk_zynq.c | 1 + drivers/clk/clk_zynqmp.c | 2 + drivers/clk/imx/clk-imx8.c | 1 + drivers/clk/mvebu/armada-37xx-periph.c | 1 + drivers/clk/mvebu/armada-37xx-tbg.c | 1 + drivers/clk/rockchip/clk_px30.c | 1 + drivers/clk/rockchip/clk_rk3036.c | 1 + drivers/clk/rockchip/clk_rk3128.c | 1 + drivers/clk/rockchip/clk_rk3188.c | 1 + drivers/clk/rockchip/clk_rk322x.c | 1 + drivers/clk/rockchip/clk_rk3288.c | 1 + drivers/clk/rockchip/clk_rk3308.c | 1 + drivers/clk/rockchip/clk_rk3328.c | 1 + drivers/clk/rockchip/clk_rk3368.c | 1 + drivers/clk/rockchip/clk_rk3399.c | 1 + drivers/clk/rockchip/clk_rv1108.c | 1 + drivers/clk/tegra/tegra-car-clk.c | 1 + drivers/clk/uniphier/clk-uniphier-core.c | 1 + drivers/core/devres.c | 1 + drivers/core/of_access.c | 1 + drivers/core/ofnode.c | 1 + drivers/core/syscon-uclass.c | 1 + drivers/ddr/altera/sdram_gen5.c | 1 + drivers/ddr/altera/sdram_soc64.c | 1 + drivers/dma/bcm6348-iudma.c | 1 + drivers/dma/dma-uclass.c | 1 + drivers/dma/sandbox-dma-test.c | 1 + drivers/dma/ti/k3-udma.c | 1 + drivers/firmware/ti_sci.c | 2 + drivers/fpga/fpga.c | 1 + drivers/gpio/74x164_gpio.c | 1 + drivers/gpio/adi_gpio2.c | 1 + drivers/gpio/at91_gpio.c | 1 + drivers/gpio/atmel_pio4.c | 1 + drivers/gpio/da8xx_gpio.c | 1 + drivers/gpio/dwapb_gpio.c | 1 + drivers/gpio/gpio-rcar.c | 2 + drivers/gpio/kona_gpio.c | 1 + drivers/gpio/mpc83xx_gpio.c | 1 + drivers/gpio/mscc_sgpio.c | 1 + drivers/gpio/mvgpio.c | 1 + drivers/gpio/mxs_gpio.c | 1 + drivers/gpio/pca953x_gpio.c | 1 + drivers/gpio/pca9698.c | 1 + drivers/gpio/sh_pfc.c | 1 + drivers/gpio/spear_gpio.c | 1 + drivers/gpio/stm32_gpio.c | 1 + drivers/hwspinlock/hwspinlock-uclass.c | 2 + drivers/hwspinlock/stm32_hwspinlock.c | 1 + drivers/i2c/at91_i2c.c | 1 + drivers/i2c/designware_i2c.c | 2 + drivers/i2c/i2c-uniphier-f.c | 1 + drivers/i2c/i2c-uniphier.c | 1 + drivers/i2c/imx_lpi2c.c | 1 + drivers/i2c/muxes/i2c-arb-gpio-challenge.c | 1 + drivers/i2c/muxes/i2c-mux-gpio.c | 1 + drivers/i2c/muxes/i2c-mux-uclass.c | 1 + drivers/i2c/muxes/pca954x.c | 1 + drivers/i2c/mxc_i2c.c | 1 + drivers/i2c/rcar_i2c.c | 1 + drivers/i2c/stm32f7_i2c.c | 1 + drivers/i2c/xilinx_xiic.c | 1 + drivers/led/led_gpio.c | 1 + drivers/mailbox/k3-sec-proxy.c | 2 + drivers/mailbox/mailbox-uclass.c | 1 + drivers/mailbox/sandbox-mbox-test.c | 1 + drivers/mailbox/sandbox-mbox.c | 1 + drivers/mailbox/stm32-ipcc.c | 2 + drivers/mailbox/tegra-hsp.c | 1 + drivers/mailbox/zynqmp-ipi.c | 1 + drivers/misc/imx8/scu_api.c | 1 + drivers/misc/k3_avs.c | 1 + drivers/misc/p2sb-uclass.c | 1 + drivers/misc/stm32_rcc.c | 1 + drivers/misc/tegra186_bpmp.c | 1 + drivers/misc/vexpress_config.c | 1 + drivers/mmc/am654_sdhci.c | 1 + drivers/mmc/arm_pl180_mmci.c | 1 + drivers/mmc/bcm2835_sdhost.c | 1 + drivers/mmc/fsl_esdhc.c | 1 + drivers/mmc/fsl_esdhc_imx.c | 1 + drivers/mmc/jz_mmc.c | 1 + drivers/mmc/mmc-uclass.c | 2 + drivers/mmc/msm_sdhci.c | 1 + drivers/mmc/mtk-sd.c | 1 + drivers/mmc/renesas-sdhi.c | 2 + drivers/mmc/sdhci-cadence.c | 1 + drivers/mmc/sh_mmcif.c | 1 + drivers/mmc/sh_sdhi.c | 1 + drivers/mmc/snps_dw_mmc.c | 1 + drivers/mmc/socfpga_dw_mmc.c | 1 + drivers/mmc/stm32_sdmmc2.c | 1 + drivers/mmc/tmio-common.c | 1 + drivers/mmc/uniphier-sd.c | 2 + drivers/mmc/zynq_sdhci.c | 1 + drivers/mtd/hbmc-am654.c | 1 + drivers/mtd/mtd_uboot.c | 1 + drivers/mtd/nand/core.c | 1 + drivers/mtd/nand/raw/atmel_nand.c | 1 + drivers/mtd/nand/raw/brcmnand/brcmnand.c | 1 + .../mtd/nand/raw/brcmnand/brcmnand_compat.c | 3 +- drivers/mtd/nand/raw/denali.c | 2 + drivers/mtd/nand/raw/denali_dt.c | 1 + drivers/mtd/nand/raw/pxa3xx_nand.c | 1 + drivers/mtd/nand/raw/sunxi_nand.c | 2 + drivers/mtd/nand/raw/tegra_nand.c | 1 + drivers/mtd/nand/raw/vf610_nfc.c | 1 + drivers/mtd/nand/spi/core.c | 1 + drivers/mtd/nand/spi/gigadevice.c | 1 + drivers/mtd/nand/spi/macronix.c | 1 + drivers/mtd/nand/spi/micron.c | 1 + drivers/mtd/nand/spi/winbond.c | 1 + drivers/mtd/renesas_rpc_hf.c | 2 + drivers/mtd/spi/sf-uclass.c | 1 + drivers/mtd/spi/spi-nor-core.c | 1 + drivers/mtd/spi/spi-nor-tiny.c | 1 + drivers/mtd/ubi/debug.c | 1 + drivers/mtd/ubi/misc.c | 1 + drivers/mtd/ubi/upd.c | 1 + drivers/net/bcm6348-eth.c | 1 + drivers/net/bcm6368-eth.c | 2 + drivers/net/designware.c | 1 + drivers/net/dwc_eth_qos.c | 1 + drivers/net/dwmac_socfpga.c | 1 + drivers/net/e1000.c | 1 + drivers/net/e1000_spi.c | 1 + drivers/net/fsl-mc/dpio/qbman_portal.c | 1 + drivers/net/fsl-mc/mc.c | 1 + drivers/net/fsl_enetc.c | 1 + drivers/net/ftgmac100.c | 2 + drivers/net/higmacv300.c | 1 + drivers/net/mscc_eswitch/jr2_switch.c | 1 + drivers/net/mscc_eswitch/luton_switch.c | 1 + drivers/net/mscc_eswitch/ocelot_switch.c | 1 + drivers/net/mscc_eswitch/serval_switch.c | 1 + drivers/net/mscc_eswitch/servalt_switch.c | 1 + drivers/net/mtk_eth.c | 1 + drivers/net/mvneta.c | 1 + drivers/net/mvpp2.c | 1 + drivers/net/pch_gbe.c | 1 + drivers/net/pfe_eth/pfe_driver.c | 1 + drivers/net/pfe_eth/pfe_eth.c | 1 + drivers/net/pfe_eth/pfe_firmware.c | 1 + drivers/net/pfe_eth/pfe_mdio.c | 1 + drivers/net/phy/fixed.c | 1 + drivers/net/pic32_eth.c | 1 + drivers/net/sandbox-raw-bus.c | 1 + drivers/net/sni_ave.c | 8 +- drivers/net/sun8i_emac.c | 1 + drivers/net/sunxi_emac.c | 1 + drivers/net/ti/am65-cpsw-nuss.c | 2 + drivers/net/ti/cpsw-common.c | 1 + drivers/net/ti/cpsw.c | 1 + drivers/net/ti/cpsw_mdio.c | 1 + drivers/net/zynq_gem.c | 1 + drivers/nvme/nvme.c | 2 + drivers/pci/pci-aardvark.c | 1 + drivers/pci/pci-uclass.c | 1 + drivers/pci/pci_mvebu.c | 1 + drivers/pci/pcie_dw_ti.c | 1 + drivers/pci/pcie_fsl.c | 1 + drivers/pci/pcie_imx.c | 1 + drivers/pci/pcie_intel_fpga.c | 1 + drivers/pci/pcie_mediatek.c | 1 + drivers/phy/allwinner/phy-sun4i-usb.c | 1 + drivers/phy/bcm6318-usbh-phy.c | 1 + drivers/phy/bcm6348-usbh-phy.c | 1 + drivers/phy/bcm6358-usbh-phy.c | 1 + drivers/phy/bcm6368-usbh-phy.c | 1 + drivers/phy/marvell/comphy_core.c | 1 + drivers/phy/meson-g12a-usb2.c | 1 + drivers/phy/meson-g12a-usb3-pcie.c | 1 + drivers/phy/meson-gxl-usb2.c | 1 + drivers/phy/meson-gxl-usb3.c | 1 + drivers/phy/phy-mtk-tphy.c | 2 + drivers/phy/phy-rcar-gen2.c | 2 + drivers/phy/phy-rcar-gen3.c | 1 + drivers/phy/phy-stm32-usbphyc.c | 1 + drivers/phy/phy-ti-am654.c | 1 + drivers/pinctrl/broadcom/pinctrl-bcm6838.c | 1 + drivers/pinctrl/intel/pinctrl.c | 1 + drivers/pinctrl/meson/pinctrl-meson.c | 2 + drivers/pinctrl/mscc/mscc-common.c | 1 + .../pinctrl/mtmips/pinctrl-mtmips-common.c | 1 + drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 2 + drivers/pinctrl/nxp/pinctrl-imx.c | 2 + drivers/pinctrl/nxp/pinctrl-mxs.c | 1 + drivers/pinctrl/pinctrl-generic.c | 1 + drivers/pinctrl/pinctrl-single.c | 1 + drivers/pinctrl/pinctrl-stmfx.c | 1 + drivers/pinctrl/pinctrl-uclass.c | 2 + drivers/pinctrl/pinctrl_stm32.c | 2 + drivers/pinctrl/renesas/pfc.c | 1 + .../pinctrl/uniphier/pinctrl-uniphier-core.c | 1 + drivers/power/domain/bcm6328-power-domain.c | 1 + .../power/domain/imx8-power-domain-legacy.c | 1 + drivers/power/domain/imx8-power-domain.c | 1 + drivers/power/domain/imx8m-power-domain.c | 1 + drivers/power/domain/meson-ee-pwrc.c | 1 + drivers/power/domain/meson-gx-pwrc-vpu.c | 1 + drivers/power/domain/mtk-power-domain.c | 1 + drivers/power/domain/power-domain-uclass.c | 1 + .../power/domain/sandbox-power-domain-test.c | 1 + drivers/power/domain/sandbox-power-domain.c | 1 + drivers/power/domain/tegra186-power-domain.c | 1 + drivers/power/domain/ti-sci-power-domain.c | 2 + drivers/power/pmic/fan53555.c | 1 + drivers/power/pmic/i2c_pmic_emul.c | 1 + drivers/power/pmic/stpmic1.c | 1 + drivers/power/regulator/pwm_regulator.c | 1 + drivers/power/regulator/stm32-vrefbuf.c | 1 + drivers/power/regulator/tps62360_regulator.c | 1 + drivers/ram/k3-am654-ddrss.c | 1 + drivers/ram/k3-j721e/k3-j721e-ddrss.c | 1 + drivers/ram/stm32_sdram.c | 1 + drivers/remoteproc/k3_system_controller.c | 1 + drivers/remoteproc/rproc-elf-loader.c | 3 +- drivers/remoteproc/stm32_copro.c | 1 + drivers/remoteproc/ti_k3_arm64_rproc.c | 1 + drivers/remoteproc/ti_k3_dsp_rproc.c | 2 + drivers/remoteproc/ti_k3_r5f_rproc.c | 2 + drivers/reset/reset-bcm6345.c | 1 + drivers/reset/reset-hisilicon.c | 1 + drivers/reset/reset-imx7.c | 1 + drivers/reset/reset-mediatek.c | 1 + drivers/reset/reset-meson.c | 1 + drivers/reset/reset-mtmips.c | 1 + drivers/reset/reset-rockchip.c | 1 + drivers/reset/reset-socfpga.c | 1 + drivers/reset/reset-sunxi.c | 1 + drivers/reset/reset-ti-sci.c | 2 + drivers/reset/reset-uclass.c | 1 + drivers/reset/reset-uniphier.c | 2 + drivers/reset/sandbox-reset-test.c | 1 + drivers/reset/sandbox-reset.c | 1 + drivers/reset/sti-reset.c | 1 + drivers/reset/stm32-reset.c | 1 + drivers/reset/tegra-car-reset.c | 1 + drivers/reset/tegra186-reset.c | 1 + drivers/rtc/ds3232.c | 1 + drivers/rtc/rv3029.c | 1 + drivers/rtc/stm32_rtc.c | 2 + drivers/serial/atmel_usart.c | 1 + drivers/serial/serial-uclass.c | 1 + drivers/serial/serial_bcm6345.c | 1 + drivers/serial/serial_lpuart.c | 1 + drivers/serial/serial_msm.c | 1 + drivers/serial/serial_pic32.c | 1 + drivers/serial/serial_stm32.c | 1 + drivers/serial/serial_zynq.c | 1 + drivers/smem/msm_smem.c | 1 + drivers/soc/ti/k3-navss-ringacc.c | 1 + drivers/sound/sound-uclass.c | 1 + drivers/spi/atmel-quadspi.c | 2 + drivers/spi/bcm63xx_hsspi.c | 1 + drivers/spi/bcm63xx_spi.c | 1 + drivers/spi/cadence_qspi.c | 1 + drivers/spi/designware_spi.c | 1 + drivers/spi/mvebu_a3700_spi.c | 1 + drivers/spi/mxc_spi.c | 1 + drivers/spi/spi-mem-nodm.c | 1 + drivers/spi/spi-mem.c | 1 + drivers/spi/spi-sunxi.c | 1 + drivers/spi/stm32_qspi.c | 1 + drivers/spi/stm32_spi.c | 2 + drivers/spi/uniphier_spi.c | 1 + drivers/spi/zynqmp_gqspi.c | 1 + drivers/spmi/spmi-msm.c | 1 + drivers/sysreset/sysreset-ti-sci.c | 1 + drivers/tee/optee/core.c | 1 + drivers/tee/optee/rpmb.c | 1 + drivers/tee/optee/supplicant.c | 1 + drivers/tee/tee-uclass.c | 3 +- drivers/timer/dw-apb-timer.c | 2 + drivers/timer/ostm_timer.c | 1 + drivers/timer/stm32_timer.c | 1 + drivers/ufs/cdns-platform.c | 1 + drivers/ufs/ti-j721e-ufs.c | 1 + drivers/ufs/ufs.c | 1 + drivers/usb/cdns3/cdns3-ti.c | 1 + drivers/usb/cdns3/core.c | 1 + drivers/usb/cdns3/drd.c | 1 + drivers/usb/cdns3/ep0.c | 1 + drivers/usb/cdns3/gadget.c | 1 + drivers/usb/dwc3/core.c | 1 + drivers/usb/dwc3/dwc3-omap.c | 1 + drivers/usb/dwc3/dwc3-uniphier.c | 1 + drivers/usb/dwc3/ep0.c | 1 + drivers/usb/dwc3/gadget.c | 1 + drivers/usb/dwc3/ti_usb_phy.c | 1 + drivers/usb/gadget/dwc2_udc_otg.c | 1 + drivers/usb/gadget/storage_common.c | 1 + drivers/usb/gadget/udc/udc-core.c | 1 + drivers/usb/host/dwc2.c | 1 + drivers/usb/host/ehci-atmel.c | 1 + drivers/usb/host/ehci-generic.c | 1 + drivers/usb/host/ehci-hcd.c | 1 + drivers/usb/host/ohci-da8xx.c | 2 + drivers/usb/host/ohci-generic.c | 1 + drivers/usb/host/r8a66597-hcd.c | 1 + drivers/usb/host/xhci-rcar.c | 2 + drivers/usb/musb-new/am35x.c | 1 + drivers/usb/musb-new/da8xx.c | 1 + drivers/usb/musb-new/musb_core.c | 1 + drivers/usb/musb-new/musb_dsps.c | 1 + drivers/usb/musb-new/musb_gadget.c | 1 + drivers/usb/musb-new/musb_gadget_ep0.c | 1 + drivers/usb/musb-new/musb_host.c | 1 + drivers/usb/musb-new/musb_uboot.c | 1 + drivers/usb/musb-new/omap2430.c | 1 + drivers/usb/musb-new/pic32.c | 1 + drivers/usb/musb-new/sunxi.c | 2 + drivers/usb/musb-new/ti-musb.c | 1 + drivers/usb/phy/omap_usb_phy.c | 1 + drivers/video/atmel_hlcdfb.c | 1 + drivers/video/console_truetype.c | 1 + drivers/video/da8xx-fb.c | 1 + drivers/video/dw_mipi_dsi.c | 1 + drivers/video/hitachi_tx18d42vm_lcd.c | 1 + drivers/video/mali_dp.c | 2 + drivers/video/mvebu_lcd.c | 1 + drivers/video/mxsfb.c | 1 + drivers/video/orisetech_otm8009a.c | 1 + drivers/video/pwm_backlight.c | 1 + drivers/video/raydium-rm68200.c | 1 + drivers/video/rockchip/rk3288_hdmi.c | 1 + drivers/video/rockchip/rk_edp.c | 1 + drivers/video/sandbox_osd.c | 1 + drivers/video/scf0403_lcd.c | 1 + drivers/video/ssd2828.c | 1 + drivers/video/stm32/stm32_dsi.c | 1 + drivers/video/stm32/stm32_ltdc.c | 1 + drivers/video/video-uclass.c | 1 + drivers/virtio/virtio-uclass.c | 1 + drivers/virtio/virtio_ring.c | 1 + drivers/w1-eeprom/ds2502.c | 1 + drivers/w1/mxc_w1.c | 1 + drivers/watchdog/armada-37xx-wdt.c | 1 + drivers/watchdog/cdns_wdt.c | 1 + fs/ext4/ext4_write.c | 1 + fs/ext4/ext4fs.c | 1 + fs/fat/fat_write.c | 1 + fs/sandbox/sandboxfs.c | 1 + fs/ubifs/lprops.c | 1 + fs/ubifs/ubifs.c | 1 + fs/yaffs2/yaffs_nandif.c | 1 + fs/yaffs2/yaffs_uboot_glue.c | 1 + include/dm/device.h | 71 --------------- include/dm/device_compat.h | 86 +++++++++++++++++++ include/linux/clk-provider.h | 1 + lib/bch.c | 1 + lib/binman.c | 1 + lib/bzip2/bzlib.c | 1 + lib/crypto/rsa_helper.c | 1 + lib/efi/efi.c | 1 + lib/efi/efi_app.c | 1 + lib/efi/efi_stub.c | 1 + lib/efi_driver/efi_block_device.c | 1 + lib/efi_driver/efi_uclass.c | 1 + lib/efi_loader/efi_console.c | 1 + lib/efi_loader/efi_runtime.c | 1 + lib/fdtdec.c | 1 + lib/libavb/avb_cmdline.c | 1 + lib/libavb/avb_descriptor.c | 1 + lib/libavb/avb_rsa.c | 1 + lib/libavb/avb_slot_verify.c | 1 + lib/libavb/avb_sysdeps_posix.c | 1 + lib/libavb/avb_util.c | 1 + lib/linux_compat.c | 1 + lib/lmb.c | 1 + lib/rsa/rsa-sign.c | 1 + lib/rsa/rsa-verify.c | 1 + lib/zstd/decompress.c | 1 + lib/zstd/zstd_common.c | 1 + net/mdio-uclass.c | 3 + post/post.c | 1 + test/dm/clk.c | 1 + test/dm/dma.c | 1 + test/dm/gpio.c | 1 + test/dm/mailbox.c | 1 + test/dm/power-domain.c | 1 + test/dm/reset.c | 1 + test/dm/spmi.c | 1 + test/dm/tee.c | 1 + test/dm/video.c | 1 + test/lib/lmb.c | 1 + test/unicode_ut.c | 1 + 460 files changed, 593 insertions(+), 77 deletions(-) create mode 100644 include/dm/device_compat.h
arch/arm/mach-imx/cmd_nandbcb.c +1 -0
@@ -10,6 +10,7 @@*/ #include <common.h> +#include <malloc.h> #include <nand.h> #include <dm/devres.h>
arch/arm/mach-imx/imx8/image.c +1 -0
@@ -5,6 +5,7 @@#include <common.h> #include <errno.h> +#include <malloc.h> #include <asm/io.h> #include <mmc.h> #include <spi_flash.h>
arch/arm/mach-mvebu/mbus.c +1 -0
@@ -47,6 +47,7 @@*/ #include <common.h> +#include <malloc.h> #include <linux/errno.h> #include <asm/io.h> #include <asm/arch/cpu.h>
arch/arm/mach-rockchip/rk3288/rk3288.c +1 -0
@@ -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>
arch/arm/mach-rockchip/rk3308/rk3308.c +1 -0
@@ -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>
arch/arm/mach-socfpga/clock_manager_agilex.c +1 -0
@@ -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>
arch/arm/mach-socfpga/clock_manager_arria10.c +1 -0
@@ -5,6 +5,7 @@#include <common.h> #include <fdtdec.h> +#include <malloc.h> #include <asm/io.h> #include <dm.h> #include <clk.h>
arch/arm/mach-stm32mp/pwr_regulator.c +1 -0
@@ -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>
arch/arm/mach-tegra/cboot.c +1 -0
@@ -7,6 +7,7 @@#include <env.h> #include <fdt_support.h> #include <fdtdec.h> +#include <malloc.h> #include <stdlib.h> #include <string.h>
arch/arm/mach-zynq/clk.c +1 -0
@@ -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 ;
arch/arm/mach-zynq/timer.c +1 -0
@@ -31,6 +31,7 @@#include <common.h> #include <div64.h> #include <dm.h> +#include <malloc.h> #include <asm/io.h> #include <asm/arch/hardware.h> #include <asm/arch/clk.h>
arch/mips/mach-mtmips/cpu.c +1 -0
@@ -5,6 +5,7 @@#include <common.h> #include <dm.h> +#include <malloc.h> #include <ram.h> #include <wdt.h> #include <asm/io.h>
arch/mips/mach-pic32/cpu.c +1 -0
@@ -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>
arch/sandbox/cpu/cpu.c +1 -0
@@ -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>
arch/x86/cpu/apollolake/fsp_s.c +1 -0
@@ -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>
arch/x86/cpu/apollolake/itss.c +1 -0
@@ -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/arch/itss.h>
arch/x86/cpu/apollolake/spl.c +1 -0
@@ -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>
arch/x86/cpu/apollolake/uart.c +1 -0
@@ -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>
arch/x86/cpu/qemu/e820.c +1 -0
@@ -8,6 +8,7 @@#include <common.h> #include <env_internal.h> +#include <malloc.h> #include <asm/e820.h> #include <asm/arch/qemu.h>
arch/x86/cpu/qfw_cpu.c +1 -0
@@ -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>
arch/x86/lib/coreboot_table.c +1 -0
@@ -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>
arch/x86/lib/fsp1/fsp_common.c +1 -0
@@ -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>
arch/x86/lib/mrccache.c +1 -0
@@ -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>
arch/x86/lib/tables.c +1 -0
@@ -4,6 +4,7 @@*/ #include <common.h> +#include <malloc.h> #include <smbios.h> #include <asm/sfi.h> #include <asm/mpspec.h>
board/compulab/common/common.c +1 -0
@@ -6,6 +6,7 @@*/ #include <common.h> +#include <malloc.h> #include <asm/bootm.h> #include <asm/gpio.h> #include <asm/setup.h>
board/corscience/tricorder/tricorder.c +1 -0
@@ -10,6 +10,7 @@* Frederik Kriewitz <[email protected]> */ #include <common.h> +#include <malloc.h> #include <twl4030.h> #include <status_led.h> #include <asm/io.h>
board/gardena/smart-gateway-mt7688/board.c +1 -0
@@ -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>
board/ge/common/vpd_reader.c +1 -0
@@ -4,6 +4,7 @@*/ #include "vpd_reader.h" +#include <malloc.h> #include <i2c.h> #include <linux/bch.h>
board/isee/igep003x/board.c +1 -0
@@ -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>
board/isee/igep00x0/igep00x0.c +1 -0
@@ -5,6 +5,7 @@*/ #include <common.h> #include <env.h> +#include <malloc.h> #include <status_led.h> #include <dm.h> #include <ns16550.h>
board/menlo/m53menlo/m53menlo.c +1 -0
@@ -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>
board/microchip/pic32mzda/pic32mzda.c +1 -0
@@ -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>
board/overo/overo.c +1 -0
@@ -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>
board/siemens/common/board.c +1 -0
@@ -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>
board/siemens/pxm2/board.c +1 -0
@@ -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>
board/siemens/rut/board.c +1 -0
@@ -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>
board/st/stm32mp1/stm32mp1.c +1 -0
@@ -15,6 +15,7 @@#include <i2c.h> #include <init.h> #include <led.h> +#include <malloc.h> #include <memalign.h> #include <misc.h> #include <mtd.h>
board/synopsys/hsdk/clk-lib.c +1 -0
@@ -5,6 +5,7 @@*/ #include <clk.h> +#include <malloc.h> #include <dm/device.h> #include "clk-lib.h"
board/technexion/tao3530/tao3530.c +1 -0
@@ -4,6 +4,7 @@* Tapani Utriainen <[email protected]> */ #include <common.h> +#include <malloc.h> #include <netdev.h> #include <twl4030.h> #include <asm/io.h>
board/ti/am335x/board.c +1 -0
@@ -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>
board/ti/am57xx/board.c +1 -0
@@ -10,6 +10,7 @@#include <common.h> #include <env.h> #include <init.h> +#include <malloc.h> #include <palmas.h> #include <sata.h> #include <serial.h>
board/timll/devkit8000/devkit8000.c +1 -0
@@ -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>
cmd/bootefi.c +1 -0
@@ -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>
cmd/gpio.c +1 -0
@@ -10,6 +10,7 @@#include <command.h> #include <errno.h> #include <dm.h> +#include <malloc.h> #include <asm/gpio.h> #include <linux/err.h>
cmd/host.c +1 -0
@@ -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 ;
cmd/rng.c +1 -0
@@ -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[])
cmd/tpm-common.c +1 -0
@@ -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>
cmd/ubi.c +1 -0
@@ -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>
cmd/usb_mass_storage.c +1 -0
@@ -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>
cmd/ximg.c +1 -0
@@ -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 )
common/android_ab.c +1 -0
@@ -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>
common/autoboot.c +1 -0
@@ -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>
common/image-fdt.c +1 -0
@@ -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>
common/image.c +1 -0
@@ -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>
common/usb.c +1 -0
@@ -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>
common/usb_hub.c +1 -0
@@ -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>
drivers/adc/stm32-adc-core.c +1 -0
@@ -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"
drivers/adc/stm32-adc.c +1 -0
@@ -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"
drivers/axi/sandbox_store.c +1 -0
@@ -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
drivers/block/blk-uclass.c +1 -0
@@ -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>
drivers/block/sandbox.c +1 -0
@@ -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>
drivers/clk/altera/clk-arria10.c +2 -0
@@ -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>
drivers/clk/at91/clk-generated.c +1 -0
@@ -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>
drivers/clk/at91/clk-h32mx.c +1 -0
@@ -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>
drivers/clk/at91/clk-peripheral.c +1 -0
@@ -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"
drivers/clk/clk-cdce9xx.c +1 -0
@@ -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
drivers/clk/clk-ti-sci.c +2 -0
@@ -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>
drivers/clk/clk-uclass.c +1 -0
@@ -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>
drivers/clk/clk_sandbox.c +1 -0
@@ -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 {
drivers/clk/clk_sandbox_ccf.c +1 -0
@@ -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>
drivers/clk/clk_sandbox_test.c +2 -0
@@ -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 {
drivers/clk/clk_versal.c +1 -0
@@ -5,6 +5,7 @@*/ #include <common.h> +#include <dm/device_compat.h> #include <linux/bitops.h> #include <linux/bitfield.h> #include <malloc.h>
drivers/clk/clk_vexpress_osc.c +1 -0
@@ -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>
drivers/clk/clk_zynq.c +1 -0
@@ -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>
drivers/clk/clk_zynqmp.c +2 -0
@@ -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>
drivers/clk/imx/clk-imx8.c +1 -0
@@ -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>
drivers/clk/mvebu/armada-37xx-periph.c +1 -0
@@ -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
drivers/clk/mvebu/armada-37xx-tbg.c +1 -0
@@ -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
drivers/clk/rockchip/clk_px30.c +1 -0
@@ -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>
drivers/clk/rockchip/clk_rk3036.c +1 -0
@@ -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>
drivers/clk/rockchip/clk_rk3128.c +1 -0
@@ -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>
drivers/clk/rockchip/clk_rk3188.c +1 -0
@@ -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>
drivers/clk/rockchip/clk_rk322x.c +1 -0
@@ -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>
drivers/clk/rockchip/clk_rk3288.c +1 -0
@@ -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>
drivers/clk/rockchip/clk_rk3308.c +1 -0
@@ -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>
drivers/clk/rockchip/clk_rk3328.c +1 -0
@@ -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>
drivers/clk/rockchip/clk_rk3368.c +1 -0
@@ -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>
drivers/clk/rockchip/clk_rk3399.c +1 -0
@@ -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>
drivers/clk/rockchip/clk_rv1108.c +1 -0
@@ -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>
drivers/clk/tegra/tegra-car-clk.c +1 -0
@@ -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>
drivers/clk/uniphier/clk-uniphier-core.c +1 -0
@@ -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>
drivers/core/devres.c +1 -0
@@ -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>
drivers/core/of_access.c +1 -0
@@ -20,6 +20,7 @@*/ #include <common.h> +#include <malloc.h> #include <linux/libfdt.h> #include <dm/of_access.h> #include <linux/ctype.h>
drivers/core/ofnode.c +1 -0
@@ -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>
drivers/core/syscon-uclass.c +1 -0
@@ -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>
drivers/ddr/altera/sdram_gen5.c +1 -0
@@ -14,6 +14,7 @@#include <asm/arch/sdram.h> #include <asm/arch/system_manager.h> #include <asm/io.h> +#include <dm/device_compat.h> #include "sequencer.h"
drivers/ddr/altera/sdram_soc64.c +1 -0
@@ -18,6 +18,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
drivers/dma/bcm6348-iudma.c +1 -0
@@ -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>
drivers/dma/dma-uclass.c +1 -0
@@ -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>
drivers/dma/sandbox-dma-test.c +1 -0
@@ -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>
drivers/dma/ti/k3-udma.c +1 -0
@@ -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>
drivers/firmware/ti_sci.c +2 -0
@@ -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>
drivers/fpga/fpga.c +1 -0
@@ -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
drivers/gpio/74x164_gpio.c +1 -0
@@ -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>
drivers/gpio/adi_gpio2.c +1 -0
@@ -8,6 +8,7 @@*/ #include <common.h> +#include <malloc.h> #include <linux/errno.h> #include <asm/gpio.h>
drivers/gpio/at91_gpio.c +1 -0
@@ -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>
drivers/gpio/atmel_pio4.c +1 -0
@@ -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>
drivers/gpio/da8xx_gpio.c +1 -0
@@ -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>
drivers/gpio/dwapb_gpio.c +1 -0
@@ -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>
drivers/gpio/gpio-rcar.c +2 -0
@@ -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>
drivers/gpio/kona_gpio.c +1 -0
@@ -4,6 +4,7 @@*/ #include <common.h> +#include <malloc.h> #include <asm/io.h> #include <asm/arch/sysmap.h>
drivers/gpio/mpc83xx_gpio.c +1 -0
@@ -4,6 +4,7 @@*/ #include <common.h> +#include <malloc.h> #include <mpc83xx.h> #include <asm/gpio.h> #include <asm/io.h>
drivers/gpio/mscc_sgpio.c +1 -0
@@ -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
drivers/gpio/mvgpio.c +1 -0
@@ -9,6 +9,7 @@*/ #include <common.h> +#include <malloc.h> #include <asm/io.h> #include <linux/errno.h> #include "mvgpio.h"
drivers/gpio/mxs_gpio.c +1 -0
@@ -7,6 +7,7 @@*/ #include <common.h> +#include <malloc.h> #include <linux/errno.h> #include <asm/io.h> #include <asm/arch/iomux.h>
drivers/gpio/pca953x_gpio.c +1 -0
@@ -27,6 +27,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
drivers/gpio/pca9698.c +1 -0
@@ -10,6 +10,7 @@#include <common.h> #include <i2c.h> +#include <malloc.h> #include <linux/errno.h> #include <pca9698.h>
drivers/gpio/sh_pfc.c +1 -0
@@ -10,6 +10,7 @@*/ #include <common.h> +#include <malloc.h> #include <asm/bitops.h> #include <asm/io.h> #include <sh_pfc.h>
drivers/gpio/spear_gpio.c +1 -0
@@ -8,6 +8,7 @@*/ #include <common.h> +#include <malloc.h> #include <asm/arch/hardware.h> #include <asm/gpio.h> #include <asm/io.h>
drivers/gpio/stm32_gpio.c +1 -0
@@ -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>
drivers/hwspinlock/hwspinlock-uclass.c +2 -0
@@ -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)
drivers/hwspinlock/stm32_hwspinlock.c +1 -0
@@ -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)
drivers/i2c/at91_i2c.c +1 -0
@@ -5,6 +5,7 @@* (C) Copyright 2016 Songjun Wu <[email protected]> */ +#include <malloc.h> #include <asm/io.h> #include <common.h> #include <clk.h>
drivers/i2c/designware_i2c.c +2 -0
@@ -8,10 +8,12 @@#include <common.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
drivers/i2c/i2c-uniphier-f.c +1 -0
@@ -5,6 +5,7 @@* Author: Masahiro Yamada <[email protected]> */ +#include <dm/device_compat.h> #include <linux/errno.h> #include <linux/io.h> #include <linux/iopoll.h>
drivers/i2c/i2c-uniphier.c +1 -0
@@ -5,6 +5,7 @@* Author: Masahiro Yamada <[email protected]> */ +#include <dm/device_compat.h> #include <linux/delay.h> #include <linux/errno.h> #include <linux/io.h>
drivers/i2c/imx_lpi2c.c +1 -0
@@ -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
drivers/i2c/muxes/i2c-arb-gpio-challenge.c +1 -0
@@ -8,6 +8,7 @@#include <dm.h> #include <errno.h> #include <i2c.h> +#include <malloc.h> #include <asm/gpio.h> DECLARE_GLOBAL_DATA_PTR ;
drivers/i2c/muxes/i2c-mux-gpio.c +1 -0
@@ -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>
drivers/i2c/muxes/i2c-mux-uclass.c +1 -0
@@ -8,6 +8,7 @@#include <dm.h> #include <errno.h> #include <i2c.h> +#include <malloc.h> #include <dm/lists.h> #include <dm/root.h>
drivers/i2c/muxes/pca954x.c +1 -0
@@ -9,6 +9,7 @@#include <dm.h> #include <errno.h> #include <i2c.h> +#include <malloc.h> #include <asm-generic/gpio.h>
drivers/i2c/mxc_i2c.c +1 -0
@@ -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>
drivers/i2c/rcar_i2c.c +1 -0
@@ -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 */
drivers/i2c/stm32f7_i2c.c +1 -0
@@ -7,6 +7,7 @@#include <clk.h> #include <dm.h> #include <i2c.h> +#include <malloc.h> #include <reset.h> #include <dm/device.h>
drivers/i2c/xilinx_xiic.c +1 -0
@@ -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;
drivers/led/led_gpio.c +1 -0
@@ -8,6 +8,7 @@#include <dm.h> #include <errno.h> #include <led.h> +#include <malloc.h> #include <asm/gpio.h> #include <dm/lists.h>
drivers/mailbox/k3-sec-proxy.c +2 -0
@@ -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>
drivers/mailbox/mailbox-uclass.c +1 -0
@@ -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)
drivers/mailbox/sandbox-mbox-test.c +1 -0
@@ -6,6 +6,7 @@#include <common.h> #include <dm.h> #include <mailbox.h> +#include <malloc.h> #include <asm/io.h> struct sandbox_mbox_test {
drivers/mailbox/sandbox-mbox.c +1 -0
@@ -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>
drivers/mailbox/stm32-ipcc.c +2 -0
@@ -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
drivers/mailbox/tegra-hsp.c +1 -0
@@ -4,6 +4,7 @@*/ #include <common.h> +#include <malloc.h> #include <asm/io.h> #include <dm.h> #include <mailbox-uclass.h>
drivers/mailbox/zynqmp-ipi.c +1 -0
@@ -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>
drivers/misc/imx8/scu_api.c +1 -0
@@ -6,6 +6,7 @@*/ #include <common.h> +#include <malloc.h> #include <asm/io.h> #include <dm.h> #include <asm/arch/sci/sci.h>
drivers/misc/k3_avs.c +1 -0
@@ -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))
drivers/misc/p2sb-uclass.c +1 -0
@@ -8,6 +8,7 @@#include <common.h> #include <dm.h> +#include <malloc.h> #include <mapmem.h> #include <p2sb.h> #include <spl.h>
drivers/misc/stm32_rcc.c +1 -0
@@ -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 = {
drivers/misc/tegra186_bpmp.c +1 -0
@@ -5,6 +5,7 @@#include <common.h> #include <dm.h> +#include <malloc.h> #include <time.h> #include <dm/lists.h> #include <dm/root.h>
drivers/misc/vexpress_config.c +1 -0
@@ -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>
drivers/mmc/am654_sdhci.c +1 -0
@@ -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 */
drivers/mmc/arm_pl180_mmci.c +1 -0
@@ -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>
drivers/mmc/bcm2835_sdhost.c +1 -0
@@ -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>
drivers/mmc/fsl_esdhc.c +1 -0
@@ -22,6 +22,7 @@#include <fdt_support.h> #include <asm/io.h> #include <dm.h> +#include <dm/device_compat.h> DECLARE_GLOBAL_DATA_PTR ;
drivers/mmc/fsl_esdhc_imx.c +1 -0
@@ -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>
drivers/mmc/jz_mmc.c +1 -0
@@ -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>
drivers/mmc/mmc-uclass.c +2 -0
@@ -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,
drivers/mmc/msm_sdhci.c +1 -0
@@ -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>
drivers/mmc/mtk-sd.c +1 -0
@@ -15,6 +15,7 @@#include <stdbool.h> #include <watchdog.h> #include <asm/gpio.h> +#include <dm/device_compat.h> #include <dm/pinctrl.h> #include <linux/bitops.h> #include <linux/io.h>
drivers/mmc/renesas-sdhi.c +2 -0
@@ -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>
drivers/mmc/sdhci-cadence.c +1 -0
@@ -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>
drivers/mmc/sh_mmcif.c +1 -0
@@ -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>
drivers/mmc/sh_sdhi.c +1 -0
@@ -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>
drivers/mmc/snps_dw_mmc.c +1 -0
@@ -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>
drivers/mmc/socfpga_dw_mmc.c +1 -0
@@ -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>
drivers/mmc/stm32_sdmmc2.c +1 -0
@@ -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>
drivers/mmc/tmio-common.c +1 -0
@@ -10,6 +10,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>
drivers/mmc/uniphier-sd.c +2 -0
@@ -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>
drivers/mmc/zynq_sdhci.c +1 -0
@@ -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>
drivers/mtd/hbmc-am654.c +1 -0
@@ -8,6 +8,7 @@#include <dm.h> #include <regmap.h> #include <syscon.h> +#include <dm/device_compat.h> #define FSS_SYSC_REG 0x4
drivers/mtd/mtd_uboot.c +1 -0
@@ -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>
drivers/mtd/nand/core.c +1 -0
@@ -11,6 +11,7 @@#include <common.h> #ifndef __UBOOT__ +#include <linux/compat.h> #include <linux/module.h> #endif #include <linux/mtd/nand.h>
drivers/mtd/nand/raw/atmel_nand.c +1 -0
@@ -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>
drivers/mtd/nand/raw/brcmnand/brcmnand.c +1 -0
@@ -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>
drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c +2 -1
@@ -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)
drivers/mtd/nand/raw/denali.c +2 -0
@@ -7,7 +7,9 @@#include <cpu_func.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>
drivers/mtd/nand/raw/denali_dt.c +1 -0
@@ -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>
drivers/mtd/nand/raw/pxa3xx_nand.c +1 -0
@@ -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>
drivers/mtd/nand/raw/sunxi_nand.c +2 -0
@@ -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>
drivers/mtd/nand/raw/tegra_nand.c +1 -0
@@ -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>
drivers/mtd/nand/raw/vf610_nfc.c +1 -0
@@ -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>
drivers/mtd/nand/spi/core.c +1 -0
@@ -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
drivers/mtd/nand/spi/gigadevice.c +1 -0
@@ -7,6 +7,7 @@*/ #ifndef __UBOOT__ +#include <malloc.h> #include <linux/device.h> #include <linux/kernel.h> #endif
drivers/mtd/nand/spi/macronix.c +1 -0
@@ -6,6 +6,7 @@*/ #ifndef __UBOOT__ +#include <malloc.h> #include <linux/device.h> #include <linux/kernel.h> #endif
drivers/mtd/nand/spi/micron.c +1 -0
@@ -7,6 +7,7 @@*/ #ifndef __UBOOT__ +#include <malloc.h> #include <linux/device.h> #include <linux/kernel.h> #endif
drivers/mtd/nand/spi/winbond.c +1 -0
@@ -8,6 +8,7 @@*/ #ifndef __UBOOT__ +#include <malloc.h> #include <linux/device.h> #include <linux/kernel.h> #endif
drivers/mtd/renesas_rpc_hf.c +2 -0
@@ -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>
drivers/mtd/spi/sf-uclass.c +1 -0
@@ -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>
drivers/mtd/spi/spi-nor-core.c +1 -0
@@ -10,6 +10,7 @@*/ #include <common.h> +#include <dm/device_compat.h> #include <dm/devres.h> #include <linux/err.h> #include <linux/errno.h>
drivers/mtd/spi/spi-nor-tiny.c +1 -0
@@ -10,6 +10,7 @@*/ #include <common.h> +#include <dm/device_compat.h> #include <linux/err.h> #include <linux/errno.h> #include <linux/log2.h>
drivers/mtd/ubi/debug.c +1 -0
@@ -6,6 +6,7 @@*/ #include <hexdump.h> +#include <malloc.h> #include <ubi_uboot.h> #include "ubi.h" #ifndef __UBOOT__
drivers/mtd/ubi/misc.c +1 -0
@@ -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"
drivers/mtd/ubi/upd.c +1 -0
@@ -26,6 +26,7 @@*/ #ifndef __UBOOT__ +#include <malloc.h> #include <linux/uaccess.h> #else #include <div64.h>
drivers/net/bcm6348-eth.c +1 -0
@@ -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>
drivers/net/bcm6368-eth.c +2 -0
@@ -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"
drivers/net/designware.c +1 -0
@@ -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>
drivers/net/dwc_eth_qos.c +1 -0
@@ -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>
drivers/net/dwmac_socfpga.c +1 -0
@@ -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>
drivers/net/e1000.c +1 -0
@@ -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"
drivers/net/e1000_spi.c +1 -0
@@ -1,6 +1,7 @@#include <common.h> #include <console.h> #include "e1000.h" +#include <malloc.h> #include <linux/compiler.h> /*-----------------------------------------------------------------------
drivers/net/fsl-mc/dpio/qbman_portal.c +1 -0
@@ -3,6 +3,7 @@* Copyright (C) 2014 Freescale Semiconductor */ +#include <malloc.h> #include <asm/arch/clock.h> #include "qbman_portal.h"
drivers/net/fsl-mc/mc.c +1 -0
@@ -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>
drivers/net/fsl_enetc.c +1 -0
@@ -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>
drivers/net/ftgmac100.c +2 -0
@@ -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>
drivers/net/higmacv300.c +1 -0
@@ -4,6 +4,7 @@*/ #include <cpu_func.h> +#include <malloc.h> #include <asm/io.h> #include <common.h> #include <console.h>
drivers/net/mscc_eswitch/jr2_switch.c +1 -0
@@ -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>
drivers/net/mscc_eswitch/luton_switch.c +1 -0
@@ -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>
drivers/net/mscc_eswitch/ocelot_switch.c +1 -0
@@ -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>
drivers/net/mscc_eswitch/serval_switch.c +1 -0
@@ -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>
drivers/net/mscc_eswitch/servalt_switch.c +1 -0
@@ -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>
drivers/net/mtk_eth.c +1 -0
@@ -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>
drivers/net/mvneta.c +1 -0
@@ -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>
drivers/net/mvpp2.c +1 -0
@@ -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>
drivers/net/pch_gbe.c +1 -0
@@ -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>
drivers/net/pfe_eth/pfe_driver.c +1 -0
@@ -4,6 +4,7 @@* Copyright 2017 NXP */ +#include <malloc.h> #include <net/pfe_eth/pfe_eth.h> #include <net/pfe_eth/pfe_firmware.h>
drivers/net/pfe_eth/pfe_eth.c +1 -0
@@ -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>
drivers/net/pfe_eth/pfe_firmware.c +1 -0
@@ -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
drivers/net/pfe_eth/pfe_mdio.c +1 -0
@@ -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>
drivers/net/phy/fixed.c +1 -0
@@ -7,6 +7,7 @@#include <config.h> #include <common.h> +#include <malloc.h> #include <phy.h> #include <dm.h> #include <fdt_support.h>
drivers/net/pic32_eth.c +1 -0
@@ -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>
drivers/net/sandbox-raw-bus.c +1 -0
@@ -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>
drivers/net/sni_ave.c +5 -3
@@ -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
drivers/net/sun8i_emac.c +1 -0
@@ -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>
drivers/net/sunxi_emac.c +1 -0
@@ -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>
drivers/net/ti/am65-cpsw-nuss.c +2 -0
@@ -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>
drivers/net/ti/cpsw-common.c +1 -0
@@ -10,6 +10,7 @@#include <fdt_support.h> #include <asm/io.h> #include <cpsw.h> +#include <dm/device_compat.h> DECLARE_GLOBAL_DATA_PTR ;
drivers/net/ti/cpsw.c +1 -0
@@ -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>
drivers/net/ti/cpsw_mdio.c +1 -0
@@ -6,6 +6,7 @@*/ #include <common.h> +#include <malloc.h> #include <asm/io.h> #include <miiphy.h> #include <wait_bit.h>
drivers/net/zynq_gem.c +1 -0
@@ -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>
drivers/nvme/nvme.c +2 -0
@@ -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
drivers/pci/pci-aardvark.c +1 -0
@@ -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 */
drivers/pci/pci-uclass.c +1 -0
@@ -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>
drivers/pci/pci_mvebu.c +1 -0
@@ -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>
drivers/pci/pcie_dw_ti.c +1 -0
@@ -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 ;
drivers/pci/pcie_fsl.c +1 -0
@@ -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);
drivers/pci/pcie_imx.c +1 -0
@@ -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>
drivers/pci/pcie_intel_fpga.c +1 -0
@@ -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
drivers/pci/pcie_mediatek.c +1 -0
@@ -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>
drivers/phy/allwinner/phy-sun4i-usb.c +1 -0
@@ -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
drivers/phy/bcm6318-usbh-phy.c +1 -0
@@ -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>
drivers/phy/bcm6348-usbh-phy.c +1 -0
@@ -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>
drivers/phy/bcm6358-usbh-phy.c +1 -0
@@ -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>
drivers/phy/bcm6368-usbh-phy.c +1 -0
@@ -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>
drivers/phy/marvell/comphy_core.c +1 -0
@@ -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>
drivers/phy/meson-g12a-usb2.c +1 -0
@@ -8,6 +8,7 @@*/ #include <common.h> +#include <malloc.h> #include <asm/io.h> #include <bitfield.h> #include <dm.h>
drivers/phy/meson-g12a-usb3-pcie.c +1 -0
@@ -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>
drivers/phy/meson-gxl-usb2.c +1 -0
@@ -8,6 +8,7 @@*/ #include <common.h> +#include <malloc.h> #include <asm/io.h> #include <bitfield.h> #include <dm.h>
drivers/phy/meson-gxl-usb3.c +1 -0
@@ -8,6 +8,7 @@*/ #include <common.h> +#include <malloc.h> #include <asm/io.h> #include <bitfield.h> #include <dm.h>
drivers/phy/phy-mtk-tphy.c +2 -0
@@ -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>
drivers/phy/phy-rcar-gen2.c +2 -0
@@ -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>
drivers/phy/phy-rcar-gen3.c +1 -0
@@ -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>
drivers/phy/phy-stm32-usbphyc.c +1 -0
@@ -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>
drivers/phy/phy-ti-am654.c +1 -0
@@ -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>
drivers/pinctrl/broadcom/pinctrl-bcm6838.c +1 -0
@@ -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
drivers/pinctrl/intel/pinctrl.c +1 -0
@@ -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>
drivers/pinctrl/meson/pinctrl-meson.c +2 -0
@@ -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>
drivers/pinctrl/mscc/mscc-common.c +1 -0
@@ -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>
drivers/pinctrl/mtmips/pinctrl-mtmips-common.c +1 -0
@@ -7,6 +7,7 @@#include <common.h> #include <dm.h> +#include <malloc.h> #include <dm/pinctrl.h> #include <linux/io.h>
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c +2 -0
@@ -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>
drivers/pinctrl/nxp/pinctrl-imx.c +2 -0
@@ -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>
drivers/pinctrl/nxp/pinctrl-mxs.c +1 -0
@@ -5,6 +5,7 @@*/ #include <common.h> +#include <dm/device_compat.h> #include <dm/devres.h> #include <linux/io.h> #include <linux/err.h>
drivers/pinctrl/pinctrl-generic.c +1 -0
@@ -5,6 +5,7 @@#include <common.h> #include <dm.h> +#include <dm/device_compat.h> #include <linux/compat.h> #include <dm/pinctrl.h>
drivers/pinctrl/pinctrl-single.c +1 -0
@@ -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>
drivers/pinctrl/pinctrl-stmfx.c +1 -0
@@ -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>
drivers/pinctrl/pinctrl-uclass.c +2 -0
@@ -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>
drivers/pinctrl/pinctrl_stm32.c +2 -0
@@ -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>
drivers/pinctrl/renesas/pfc.c +1 -0
@@ -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>
drivers/pinctrl/uniphier/pinctrl-uniphier-core.c +1 -0
@@ -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>
drivers/power/domain/bcm6328-power-domain.c +1 -0
@@ -5,6 +5,7 @@#include <common.h> #include <dm.h> +#include <malloc.h> #include <power-domain-uclass.h> #include <asm/io.h>
drivers/power/domain/imx8-power-domain-legacy.c +1 -0
@@ -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>
drivers/power/domain/imx8-power-domain.c +1 -0
@@ -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>
drivers/power/domain/imx8m-power-domain.c +1 -0
@@ -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>
drivers/power/domain/meson-ee-pwrc.c +1 -0
@@ -6,6 +6,7 @@#include <common.h> #include <dm.h> +#include <malloc.h> #include <power-domain-uclass.h> #include <regmap.h> #include <syscon.h>
drivers/power/domain/meson-gx-pwrc-vpu.c +1 -0
@@ -8,6 +8,7 @@#include <common.h> #include <dm.h> +#include <malloc.h> #include <power-domain-uclass.h> #include <regmap.h> #include <syscon.h>
drivers/power/domain/mtk-power-domain.c +1 -0
@@ -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>
drivers/power/domain/power-domain-uclass.c +1 -0
@@ -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>
drivers/power/domain/sandbox-power-domain-test.c +1 -0
@@ -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>
drivers/power/domain/sandbox-power-domain.c +1 -0
@@ -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>
drivers/power/domain/tegra186-power-domain.c +1 -0
@@ -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>
drivers/power/domain/ti-sci-power-domain.c +2 -0
@@ -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>
drivers/power/pmic/fan53555.c +1 -0
@@ -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>
drivers/power/pmic/i2c_pmic_emul.c +1 -0
@@ -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>
drivers/power/pmic/stpmic1.c +1 -0
@@ -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>
drivers/power/regulator/pwm_regulator.c +1 -0
@@ -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 ;
drivers/power/regulator/stm32-vrefbuf.c +1 -0
@@ -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>
drivers/power/regulator/tps62360_regulator.c +1 -0
@@ -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
drivers/ram/k3-am654-ddrss.c +1 -0
@@ -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"
drivers/ram/k3-j721e/k3-j721e-ddrss.c +1 -0
@@ -12,6 +12,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"
drivers/ram/stm32_sdram.c +1 -0
@@ -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
drivers/remoteproc/k3_system_controller.c +1 -0
@@ -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
drivers/remoteproc/rproc-elf-loader.c +2 -1
@@ -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
drivers/remoteproc/stm32_copro.c +1 -0
@@ -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
drivers/remoteproc/ti_k3_arm64_rproc.c +1 -0
@@ -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"
drivers/remoteproc/ti_k3_dsp_rproc.c +2 -0
@@ -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"
drivers/remoteproc/ti_k3_r5f_rproc.c +2 -0
@@ -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>
drivers/reset/reset-bcm6345.c +1 -0
@@ -9,6 +9,7 @@#include <common.h> #include <dm.h> #include <errno.h> +#include <malloc.h> #include <reset-uclass.h> #include <asm/io.h>
drivers/reset/reset-hisilicon.c +1 -0
@@ -3,6 +3,7 @@* Copyright (c) 2019, Linaro Limited */ +#include <malloc.h> #include <asm/io.h> #include <common.h> #include <dm.h>
drivers/reset/reset-imx7.c +1 -0
@@ -3,6 +3,7 @@* Copyright (c) 2017, Impinj, Inc. */ +#include <malloc.h> #include <asm/io.h> #include <common.h> #include <dm.h>
drivers/reset/reset-mediatek.c +1 -0
@@ -8,6 +8,7 @@#include <common.h> #include <dm.h> +#include <malloc.h> #include <dm/lists.h> #include <regmap.h> #include <reset-uclass.h>
drivers/reset/reset-meson.c +1 -0
@@ -8,6 +8,7 @@#include <common.h> #include <dm.h> +#include <malloc.h> #include <reset-uclass.h> #include <regmap.h>
drivers/reset/reset-mtmips.c +1 -0
@@ -8,6 +8,7 @@#include <common.h> #include <dm.h> #include <errno.h> +#include <malloc.h> #include <reset-uclass.h> #include <linux/io.h>
drivers/reset/reset-rockchip.c +1 -0
@@ -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>
drivers/reset/reset-socfpga.c +1 -0
@@ -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>
drivers/reset/reset-sunxi.c +1 -0
@@ -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>
drivers/reset/reset-ti-sci.c +2 -0
@@ -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>
drivers/reset/reset-uclass.c +1 -0
@@ -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>
drivers/reset/reset-uniphier.c +2 -0
@@ -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>
drivers/reset/sandbox-reset-test.c +1 -0
@@ -5,6 +5,7 @@#include <common.h> #include <dm.h> +#include <malloc.h> #include <reset.h> #include <asm/io.h> #include <asm/reset.h>
drivers/reset/sandbox-reset.c +1 -0
@@ -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>
drivers/reset/sti-reset.c +1 -0
@@ -6,6 +6,7 @@#include <common.h> #include <errno.h> +#include <malloc.h> #include <wait_bit.h> #include <dm.h> #include <reset-uclass.h>
drivers/reset/stm32-reset.c +1 -0
@@ -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>
drivers/reset/tegra-car-reset.c +1 -0
@@ -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>
drivers/reset/tegra186-reset.c +1 -0
@@ -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>
drivers/rtc/ds3232.c +1 -0
@@ -8,6 +8,7 @@#include <dm.h> #include <i2c.h> #include <rtc.h> +#include <dm/device_compat.h> /* * RTC register addresses
drivers/rtc/rv3029.c +1 -0
@@ -13,6 +13,7 @@#include <eeprom.h> #include <i2c.h> #include <rtc.h> +#include <dm/device_compat.h> #define RTC_RV3029_PAGE_LEN 7
drivers/rtc/stm32_rtc.c +2 -0
@@ -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
drivers/serial/atmel_usart.c +1 -0
@@ -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>
drivers/serial/serial-uclass.c +1 -0
@@ -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>
drivers/serial/serial_bcm6345.c +1 -0
@@ -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>
drivers/serial/serial_lpuart.c +1 -0
@@ -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>
drivers/serial/serial_msm.c +1 -0
@@ -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>
drivers/serial/serial_pic32.c +1 -0
@@ -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>
drivers/serial/serial_stm32.c +1 -0
@@ -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,
drivers/serial/serial_zynq.c +1 -0
@@ -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>
drivers/smem/msm_smem.c +1 -0
@@ -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>
drivers/soc/ti/k3-navss-ringacc.c +1 -0
@@ -11,6 +11,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>
drivers/sound/sound-uclass.c +1 -0
@@ -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
drivers/spi/atmel-quadspi.c +2 -0
@@ -9,12 +9,14 @@* Author: Piotr Bugalski <[email protected]> */ +#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>
drivers/spi/bcm63xx_hsspi.c +1 -0
@@ -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>
drivers/spi/bcm63xx_spi.c +1 -0
@@ -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>
drivers/spi/cadence_qspi.c +1 -0
@@ -11,6 +11,7 @@#include <malloc.h> #include <reset.h> #include <spi.h> +#include <dm/device_compat.h> #include <linux/err.h> #include <linux/errno.h> #include "cadence_qspi.h"
drivers/spi/designware_spi.c +1 -0
@@ -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>
drivers/spi/mvebu_a3700_spi.c +1 -0
@@ -12,6 +12,7 @@#include <clk.h> #include <wait_bit.h> #include <asm/io.h> +#include <dm/device_compat.h> DECLARE_GLOBAL_DATA_PTR ;
drivers/spi/mxc_spi.c +1 -0
@@ -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>
drivers/spi/spi-mem-nodm.c +1 -0
@@ -3,6 +3,7 @@* Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/ */ +#include <malloc.h> #include <spi.h> #include <spi-mem.h>
drivers/spi/spi-mem.c +1 -0
@@ -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
drivers/spi/spi-sunxi.c +1 -0
@@ -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>
drivers/spi/stm32_qspi.c +1 -0
@@ -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>
drivers/spi/stm32_spi.c +2 -0
@@ -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>
drivers/spi/uniphier_spi.c +1 -0
@@ -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>
drivers/spi/zynqmp_gqspi.c +1 -0
@@ -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)
drivers/spmi/spmi-msm.c +1 -0
@@ -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 ;
drivers/sysreset/sysreset-ti-sci.c +1 -0
@@ -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>
drivers/tee/optee/core.c +1 -0
@@ -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>
drivers/tee/optee/rpmb.c +1 -0
@@ -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"
drivers/tee/optee/supplicant.c +1 -0
@@ -5,6 +5,7 @@#include <common.h> #include <log.h> +#include <malloc.h> #include <tee.h> #include <linux/types.h>
drivers/tee/tee-uclass.c +2 -1
@@ -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
drivers/timer/dw-apb-timer.c +2 -0
@@ -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>
drivers/timer/ostm_timer.c +1 -0
@@ -6,6 +6,7 @@*/ #include <common.h> +#include <malloc.h> #include <asm/io.h> #include <dm.h> #include <clk.h>
drivers/timer/stm32_timer.c +1 -0
@@ -9,6 +9,7 @@#include <dm.h> #include <fdtdec.h> #include <timer.h> +#include <dm/device_compat.h> #include <asm/io.h>
drivers/ufs/cdns-platform.c +1 -0
@@ -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"
drivers/ufs/ti-j721e-ufs.c +1 -0
@@ -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
drivers/ufs/ufs.c +1 -0
@@ -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>
drivers/usb/cdns3/cdns3-ti.c +1 -0
@@ -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>
drivers/usb/cdns3/core.c +1 -0
@@ -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>
drivers/usb/cdns3/drd.c +1 -0
@@ -11,6 +11,7 @@* */ #include <dm.h> +#include <dm/device_compat.h> #include <linux/delay.h> #include <linux/iopoll.h> #include <linux/kernel.h>
drivers/usb/cdns3/ep0.c +1 -0
@@ -11,6 +11,7 @@*/ #include <cpu_func.h> +#include <dm/device_compat.h> #include <linux/usb/composite.h> #include <linux/iopoll.h>
drivers/usb/cdns3/gadget.c +1 -0
@@ -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>
drivers/usb/dwc3/core.c +1 -0
@@ -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>
drivers/usb/dwc3/dwc3-omap.c +1 -0
@@ -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>
drivers/usb/dwc3/dwc3-uniphier.c +1 -0
@@ -7,6 +7,7 @@*/ #include <dm.h> +#include <dm/device_compat.h> #include <linux/bitops.h> #include <linux/errno.h> #include <linux/io.h>
drivers/usb/dwc3/ep0.c +1 -0
@@ -14,6 +14,7 @@*/ #include <common.h> #include <cpu_func.h> +#include <dm/device_compat.h> #include <linux/kernel.h> #include <linux/list.h>
drivers/usb/dwc3/gadget.c +1 -0
@@ -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>
drivers/usb/dwc3/ti_usb_phy.c +1 -0
@@ -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>
drivers/usb/gadget/dwc2_udc_otg.c +1 -0
@@ -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>
drivers/usb/gadget/storage_common.c +1 -0
@@ -269,6 +269,7 @@ struct device_attribute { int i; };#define ETOOSMALL 525#include <usb_mass_storage.h> +#include <dm/device_compat.h> /*-------------------------------------------------------------------------*/
drivers/usb/gadget/udc/udc-core.c +1 -0
@@ -13,6 +13,7 @@* usb_ */ +#include <dm/device_compat.h> #include <dm/devres.h> #include <linux/compat.h> #include <malloc.h>
drivers/usb/host/dwc2.c +1 -0
@@ -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>
drivers/usb/host/ehci-atmel.c +1 -0
@@ -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>
drivers/usb/host/ehci-generic.c +1 -0
@@ -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>
drivers/usb/host/ehci-hcd.c +1 -0
@@ -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"
drivers/usb/host/ohci-da8xx.c +2 -0
@@ -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>
drivers/usb/host/ohci-generic.c +1 -0
@@ -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>
drivers/usb/host/r8a66597-hcd.c +1 -0
@@ -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>
drivers/usb/host/xhci-rcar.c +2 -0
@@ -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"
drivers/usb/musb-new/am35x.c +1 -0
@@ -12,6 +12,7 @@*/ #ifndef __UBOOT__ +#include <dm/device_compat.h> #include <dm/devres.h> #include <linux/init.h> #include <linux/module.h>
drivers/usb/musb-new/da8xx.c +1 -0
@@ -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>
drivers/usb/musb-new/musb_core.c +1 -0
@@ -65,6 +65,7 @@*/ #ifndef __UBOOT__ +#include <dm/device_compat.h> #include <dm/devres.h> #include <linux/module.h> #include <linux/kernel.h>
drivers/usb/musb-new/musb_dsps.c +1 -0
@@ -15,6 +15,7 @@*/ #ifndef __UBOOT__ +#include <dm/device_compat.h> #include <dm/devres.h> #include <linux/init.h> #include <linux/io.h>
drivers/usb/musb-new/musb_gadget.c +1 -0
@@ -9,6 +9,7 @@*/ #ifndef __UBOOT__ +#include <dm/device_compat.h> #include <dm/devres.h> #include <linux/kernel.h> #include <linux/list.h>
drivers/usb/musb-new/musb_gadget_ep0.c +1 -0
@@ -9,6 +9,7 @@*/ #ifndef __UBOOT__ +#include <dm/device_compat.h> #include <linux/kernel.h> #include <linux/list.h> #include <linux/timer.h>
drivers/usb/musb-new/musb_host.c +1 -0
@@ -9,6 +9,7 @@*/ #ifndef __UBOOT__ +#include <dm/device_compat.h> #include <dm/devres.h> #include <linux/module.h> #include <linux/kernel.h>
drivers/usb/musb-new/musb_uboot.c +1 -0
@@ -1,5 +1,6 @@#include <common.h> #include <console.h> +#include <malloc.h> #include <watchdog.h> #include <linux/err.h> #include <linux/errno.h>
drivers/usb/musb-new/omap2430.c +1 -0
@@ -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>
drivers/usb/musb-new/pic32.c +1 -0
@@ -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"
drivers/usb/musb-new/sunxi.c +2 -0
@@ -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>
drivers/usb/musb-new/ti-musb.c +1 -0
@@ -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>
drivers/usb/phy/omap_usb_phy.c +1 -0
@@ -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>
drivers/video/atmel_hlcdfb.c +1 -0
@@ -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>
drivers/video/console_truetype.c +1 -0
@@ -5,6 +5,7 @@#include <common.h> #include <dm.h> +#include <malloc.h> #include <video.h> #include <video_console.h>
drivers/video/da8xx-fb.c +1 -0
@@ -13,6 +13,7 @@*/ #include <common.h> +#include <malloc.h> #include <memalign.h> #include <video_fb.h> #include <linux/list.h>
drivers/video/dw_mipi_dsi.c +1 -0
@@ -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>
drivers/video/hitachi_tx18d42vm_lcd.c +1 -0
@@ -6,6 +6,7 @@*/ #include <common.h> +#include <malloc.h> #include <asm/gpio.h> #include <errno.h>
drivers/video/mali_dp.c +2 -0
@@ -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
drivers/video/mvebu_lcd.c +1 -0
@@ -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>
drivers/video/mxsfb.c +1 -0
@@ -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>
drivers/video/orisetech_otm8009a.c +1 -0
@@ -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
drivers/video/pwm_backlight.c +1 -0
@@ -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>
drivers/video/raydium-rm68200.c +1 -0
@@ -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 ***/
drivers/video/rockchip/rk3288_hdmi.c +1 -0
@@ -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>
drivers/video/rockchip/rk_edp.c +1 -0
@@ -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>
drivers/video/sandbox_osd.c +1 -0
@@ -6,6 +6,7 @@#include <common.h> #include <display.h> #include <dm.h> +#include <malloc.h> #include <video_osd.h> #include "sandbox_osd.h"
drivers/video/scf0403_lcd.c +1 -0
@@ -14,6 +14,7 @@*/ #include <common.h> +#include <malloc.h> #include <asm/gpio.h> #include <spi.h>
drivers/video/ssd2828.c +1 -0
@@ -10,6 +10,7 @@*/ #include <common.h> +#include <malloc.h> #include <mipi_display.h> #include <asm/arch/gpio.h> #include <asm/gpio.h>
drivers/video/stm32/stm32_dsi.c +1 -0
@@ -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>
drivers/video/stm32/stm32_ltdc.c +1 -0
@@ -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;
drivers/video/video-uclass.c +1 -0
@@ -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>
drivers/virtio/virtio-uclass.c +1 -0
@@ -17,6 +17,7 @@#include <common.h> #include <dm.h> +#include <malloc.h> #include <virtio_types.h>
Lines of this file are not shown. View the raw message.
include/dm/device.h +0 -71
71 lines not on this page · raw message
include/dm/device_compat.h new file +86 -0
86 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
Part of the diff is not shown here. View the raw message.
PATCH 31/33 dm: core: Drop the inclusion of linux/compat.h in dm.h
In reply to Simon GlassMost files don't need this header and it pulls in quite of lots of stuff, malloc() in particular. Drop it.
---
board/hisilicon/poplar/poplar.c | 2 +- include/dm/device.h | 1 - include/linux/compat.h | 3 +++ include/phy.h | 1 + 4 files changed, 5 insertions(+), 2 deletions(-)
board/hisilicon/poplar/poplar.c +1 -1
@@ -4,8 +4,8 @@* Jorge Ramirez-Ortiz <[email protected]> */ -#include <dm.h> #include <common.h> +#include <dm.h> #include <asm/io.h> #include <dm/platform_data/serial_pl01x.h> #include <asm/arch/hi3798cv200.h>
include/dm/device.h +0 -1
@@ -14,7 +14,6 @@#include <dm/uclass-id.h> #include <fdtdec.h> #include <linker_lists.h> -#include <linux/compat.h> #include <linux/kernel.h> #include <linux/list.h> #include <linux/printk.h>
include/linux/compat.h +3 -0
@@ -123,7 +123,10 @@ static inline void kmem_cache_destroy(struct kmem_cache *cachep)#define KERNEL_VERSION (a,b,c) (((a) << 16) + ((b) << 8) + (c)) +/* This is also defined in ARMv8's mmu.h */ +#ifndef PAGE_SIZE #define PAGE_SIZE 4096 +#endif /* drivers/char/random.c */ #define get_random_bytes (...)
include/phy.h +1 -0
@@ -10,6 +10,7 @@#define _PHY_H#include <dm.h> +#include <linux/errno.h> #include <linux/list.h> #include <linux/mii.h> #include <linux/ethtool.h>
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog
PATCH 32/33 sandbox: Complete migration away from os_malloc()
In reply to Simon GlassNow that we can use direct access to the system malloc() in sandbox, drop the remaining uses of os_malloc().
The only one remaining now is for the RAM buffer, which we do want to be at a known adress, so this is intended.
---
drivers/misc/cros_ec_sandbox.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/misc/cros_ec_sandbox.c +4 -4
@@ -11,10 +11,10 @@#include <ec_commands.h> #include <errno.h> #include <hash.h> -#include <malloc.h> #include <os.h> #include <u-boot/sha256.h> #include <spi.h> +#include <asm/malloc.h> #include <asm/state.h> #include <asm/sdl.h> #include <linux/input.h>
@@ -115,7 +115,7 @@ static int cros_ec_read_state(const void *blob, int node) prop =fdt_getprop (blob, node,"flash-data" , &len);if (prop) { ec->flash_data_len = len; - ec->flash_data =os_malloc (len); + ec->flash_data =malloc (len);if (!ec->flash_data)return -ENOMEM ;memcpy (ec->flash_data, prop, len);
@@ -545,14 +545,14 @@ int cros_ec_probe(struct udevice *dev) ec->flash_data_len != ec->ec_config.flash.length) {printf ("EC data length is %x, expected %x, discarding data\n" , ec->flash_data_len, ec->ec_config.flash.length); -os_free (ec->flash_data); +free (ec->flash_data); ec->flash_data =NULL ; }/* Otherwise allocate the memory */ if (!ec->flash_data) { ec->flash_data_len = ec->ec_config.flash.length; - ec->flash_data =os_malloc (ec->flash_data_len); + ec->flash_data =malloc (ec->flash_data_len);if (!ec->flash_data)return -ENOMEM ; }
Signature · 1 line
2.25.0.rc1.283.g88dfdc4193-goog