[PATCH 00/31] dm: Avoid including dm.h in header files

Simon Glass sjg at chromium.org
Sun Jul 19 18:15:30 CEST 2020


At present a small number of header files include the dm.h header file.
The intent with driver model is for C files that use it to define dm.h
themselves. This helps indicate that driver model is supported and also
reduces the amount of code pointlessly included and relying on header
guards. Ultimately (combined with the reduction in size of common.h)
this should speed up U-Boot compilation.

This series removes all uses of dm.h in header files and adds a warning
to avert more such activity.


Simon Glass (31):
  spi: Allow separate control of SPI_FLASH_TINY for SPL/TPL
  mtd: spi-nor: Tidy up error handling / debug code
  wdt: Drop dm.h header file
  mtd: spi-mem: Drop dm.h header file
  mtd: spi: Drop SPI_XFER_MMAP*
  dm: core: Drop dm.h header file from dm-demo.h
  dm: core: Drop header files from dm/test.h
  fs: fs-loader: Drop dm.h header file
  net: Drop dm.h header file from phy.h
  sf: Drop dm.h header file from spi_flash.h
  thermal: Drop dm.h header file
  w1: Drop dm.h header file
  efi: Tidy up header includes
  power: Tidy up inclusion of regulator_common.h
  mmc: Drop duplicate dm.h inclusion
  spi: Drop duplicate dm.h inclusion
  ti: am654: Drop duplicate dm.h inclusion
  liebherr: Drop duplicate dm.h inclusion
  pci: Drop dm.h inclusion from header file
  mediatek: Drop dm.h header file
  mscc: Drop dm.h header file
  adc: Drop dm.h header file
  nand: Drop dm.h header file
  ufs: Drop dm.h header file
  usb: Drop dm.h header file
  clk: Drop dm.h header file in clk-provider.h
  net: Drop dm.h header file in eth_phy.h
  net: Drop duplicate include of dm.h in pcnet.c
  dm: core: Guard against including dm.h in header files
  patman: Fix up the test comments
  checkpatch: Don't allow common.h and dm.h in headers

 arch/arm/include/asm/arch-mediatek/reset.h    |  2 +-
 arch/arm/mach-imx/cpu.c                       |  1 +
 arch/arm/mach-k3/sysfw-loader.c               |  1 +
 .../cmd_stm32prog/stm32prog_serial.c          |  1 +
 arch/mips/mach-mscc/include/mach/jr2/jr2.h    |  3 --
 .../mips/mach-mscc/include/mach/luton/luton.h |  3 --
 .../mach-mscc/include/mach/ocelot/ocelot.h    |  3 --
 .../mach-mscc/include/mach/serval/serval.h    |  3 --
 .../mach-mscc/include/mach/servalt/servalt.h  |  3 --
 arch/x86/cpu/ivybridge/sdram.c                |  1 +
 board/atmel/common/board.c                    |  1 +
 board/liebherr/display5/display5.c            |  1 -
 board/mscc/servalt/servalt.c                  |  2 +
 board/st/common/stm32mp_dfu.c                 |  1 +
 cmd/demo.c                                    |  1 +
 cmd/mdio.c                                    |  1 +
 cmd/mii.c                                     |  1 +
 cmd/w1.c                                      |  1 +
 common/spl/Kconfig                            | 10 +++++
 drivers/adc/stm32-adc-core.c                  |  1 +
 drivers/adc/stm32-adc-core.h                  |  4 +-
 drivers/adc/stm32-adc.c                       |  1 +
 drivers/clk/clk-uclass.c                      |  5 +++
 drivers/clk/kendryte/bypass.c                 |  7 ++-
 drivers/clk/kendryte/pll.c                    | 10 +++--
 drivers/fpga/socfpga_arria10.c                |  1 +
 drivers/mmc/sdhci.c                           |  1 -
 .../mtd/nand/raw/brcmnand/brcmnand_compat.c   |  1 +
 .../mtd/nand/raw/brcmnand/brcmnand_compat.h   |  4 +-
 drivers/mtd/spi/Makefile                      |  2 +-
 drivers/mtd/spi/sf_probe.c                    |  2 +-
 drivers/mtd/spi/spi-nor-core.c                |  2 +-
 drivers/mtd/spi/spi-nor-tiny.c                |  4 +-
 drivers/net/pcnet.c                           |  1 -
 drivers/pci/pcie_layerscape.h                 |  1 -
 drivers/pci/pcie_layerscape_fixup.c           |  1 +
 drivers/pci/pcie_layerscape_gen4.h            |  1 -
 drivers/pci/pcie_layerscape_gen4_fixup.c      |  1 +
 drivers/power/regulator/fixed.c               |  3 +-
 drivers/power/regulator/gpio-regulator.c      |  3 +-
 drivers/power/regulator/regulator_common.c    |  4 +-
 drivers/power/regulator/regulator_common.h    |  2 -
 drivers/ram/k3-am654-ddrss.c                  |  1 -
 drivers/spi/mscc_bb_spi.c                     |  1 -
 drivers/spi/spi-mem.c                         |  7 ++-
 drivers/spi/spi-sifive.c                      |  1 +
 drivers/spi/stm32_qspi.c                      |  2 +
 drivers/ufs/cdns-platform.c                   |  1 +
 drivers/ufs/ufs.c                             |  3 +-
 drivers/ufs/ufs.h                             |  5 +--
 drivers/usb/musb-new/musb_uboot.c             | 37 +++++++++++++++
 drivers/usb/musb-new/pic32.c                  |  1 +
 drivers/usb/musb-new/usb-compat.h             | 45 ++++---------------
 include/dm-demo.h                             |  2 -
 include/dm.h                                  |  4 ++
 include/dm/read.h                             |  1 +
 include/dm/test.h                             |  3 --
 include/efi_driver.h                          |  2 -
 include/eth_phy.h                             |  3 +-
 include/fs_loader.h                           |  2 +-
 include/kendryte/bypass.h                     |  2 +-
 include/linux/clk-provider.h                  |  8 ++--
 include/phy.h                                 |  9 ++--
 include/phy_interface.h                       |  2 +
 include/spi-mem.h                             |  5 +--
 include/spi.h                                 |  2 -
 include/spi_flash.h                           |  3 +-
 include/test/ut.h                             |  1 +
 include/thermal.h                             |  2 +-
 include/w1.h                                  |  2 +-
 include/wdt.h                                 |  4 +-
 lib/efi_driver/efi_block_device.c             |  1 +
 lib/efi_driver/efi_uclass.c                   |  2 +
 net/eth_legacy.c                              |  1 +
 scripts/checkpatch.pl                         | 10 ++++-
 test/dm/adc.c                                 |  1 +
 test/dm/audio.c                               |  1 +
 test/dm/axi.c                                 |  3 +-
 test/dm/blk.c                                 |  1 +
 test/dm/board.c                               |  1 +
 test/dm/bootcount.c                           |  1 +
 test/dm/bus.c                                 |  1 +
 test/dm/clk.c                                 |  1 +
 test/dm/clk_ccf.c                             |  1 +
 test/dm/core.c                                |  1 +
 test/dm/cpu.c                                 |  1 +
 test/dm/dma.c                                 |  1 +
 test/dm/dsi_host.c                            |  1 +
 test/dm/eth.c                                 |  3 +-
 test/dm/firmware.c                            |  1 +
 test/dm/gpio.c                                |  3 +-
 test/dm/hwspinlock.c                          |  1 +
 test/dm/i2c.c                                 |  1 +
 test/dm/i2s.c                                 |  3 +-
 test/dm/led.c                                 |  1 +
 test/dm/mailbox.c                             |  1 +
 test/dm/mdio.c                                |  5 ++-
 test/dm/mdio_mux.c                            |  5 ++-
 test/dm/misc.c                                |  1 +
 test/dm/mmc.c                                 |  1 +
 test/dm/nop.c                                 |  1 +
 test/dm/ofnode.c                              |  1 +
 test/dm/osd.c                                 |  5 ++-
 test/dm/panel.c                               |  3 +-
 test/dm/pch.c                                 |  1 +
 test/dm/pci.c                                 |  1 +
 test/dm/pci_ep.c                              |  5 ++-
 test/dm/phy.c                                 |  1 +
 test/dm/pmic.c                                |  5 ++-
 test/dm/power-domain.c                        |  1 +
 test/dm/pwm.c                                 |  1 +
 test/dm/ram.c                                 |  1 +
 test/dm/regmap.c                              |  1 +
 test/dm/regulator.c                           |  1 +
 test/dm/remoteproc.c                          |  2 +
 test/dm/reset.c                               |  1 +
 test/dm/rtc.c                                 |  1 +
 test/dm/serial.c                              |  1 +
 test/dm/sf.c                                  |  1 +
 test/dm/smem.c                                |  1 +
 test/dm/sound.c                               |  1 +
 test/dm/spi.c                                 |  1 +
 test/dm/spmi.c                                |  1 +
 test/dm/syscon.c                              |  1 +
 test/dm/sysreset.c                            |  1 +
 test/dm/tee.c                                 |  1 +
 test/dm/test-driver.c                         |  3 +-
 test/dm/test-fdt.c                            |  1 +
 test/dm/test-main.c                           |  2 +
 test/dm/test-uclass.c                         |  1 +
 test/dm/timer.c                               |  1 +
 test/dm/usb.c                                 |  1 +
 test/dm/video.c                               |  1 +
 test/dm/virtio.c                              |  3 +-
 test/dm/wdt.c                                 |  1 +
 test/lib/lmb.c                                |  2 +
 tools/patman/test_checkpatch.py               | 17 ++++---
 137 files changed, 254 insertions(+), 138 deletions(-)

-- 
2.28.0.rc0.105.gf9edc3c819-goog



More information about the U-Boot mailing list