[PATCH 00/26] dm: Preparation for enhanced of-platdata (part C)

Simon Glass
2020-12-19T17:39:52Z

At present various driver model data structures are accessed outside the
core driver mode code. This makes it harder to adjust how certain values
are stored, which is needed for of-platdata.

This series updates several a few more fields so that they are only
accessed via functions.

This series also includes some changes to sandbox and x86 drivers to get
them ready for the new of-platdata.

It is available at u-boot-dm/prepc-working

Simon Glass (26):
sandbox: serial: Move priv into a header file
sandbox: i2c: Move priv into a header file
sandbox: Add a compatible string for spltest
sandbox: Update dts files to reduce SPL size
x86: apl: Move priv/plat structs to headers
x86: Move priv/plat structs for intel_common to headers
x86: spl: Move priv/plat structs to headers
spi: Tidy up get/set of device node
spi: Tweak a few strange SPI NOR features for of-platdata
x86: apl: Use struct spi_nor instead of struct spi_flash
dm: core: Move priv/plat structs for simple_bus to headers
x86: sysreset: Move priv/plat structs to headers
x86: apl: Adjust how the UART gets its platform data
x86: coral: Remove unwanted nodes from SPL/TPL
x86: Drop rtc from SPL
dm: core: Split out alloc code into a new function
dm: core: Rename sqq to seq_
dm: core: Access device flags through functions
dm: core: Rename device flags to indicate it is private
dm: core: Rename dev_has_of_node() to dev_has_ofnode()
dm: core: Use dev_has_ofnode() instead of dev_of_valid()
dm: core: Access device ofnode through functions
dm: core: Rename device node to indicate it is private
dm: core: Split out scanning code to dm_scan()
dm: core: Allow the uclass list to move
dm: core: Add logging when lists_bind_fdt() fails

arch/arm/mach-stm32mp/pwr_regulator.c | 2 +-
arch/sandbox/dts/sandbox.dts | 4 +-
arch/sandbox/dts/sandbox.dtsi | 11 +-
arch/sandbox/include/asm/i2c.h | 14 ++
arch/sandbox/include/asm/serial.h | 30 ++++
arch/x86/cpu/apollolake/hostbridge.c | 20 +--
arch/x86/cpu/apollolake/pmc.c | 8 +-
arch/x86/cpu/apollolake/spl.c | 2 +-
arch/x86/cpu/apollolake/uart.c | 43 +++---
arch/x86/cpu/intel_common/itss.c | 19 ---
arch/x86/cpu/intel_common/p2sb.c | 9 +-
arch/x86/dts/chromebook_coral.dts | 17 ++-
arch/x86/dts/rtc.dtsi | 2 +-
arch/x86/include/asm/arch-apollolake/gpio.h | 18 +++
.../include/asm/arch-apollolake/hostbridge.h | 28 ++++
arch/x86/include/asm/arch-apollolake/pmc.h | 16 +++
arch/x86/include/asm/arch-apollolake/uart.h | 19 ++-
arch/x86/include/asm/itss.h | 21 +++
arch/x86/include/asm/p2sb.h | 18 +++
arch/x86/include/asm/sysreset.h | 18 +++
board/synopsys/hsdk/clk-lib.c | 2 +-
cmd/remoteproc.c | 2 +-
drivers/ata/mtk_ahci.c | 3 +-
drivers/clk/clk-uclass.c | 2 +-
drivers/clk/clk.c | 2 +-
drivers/clk/meson/axg.c | 2 +-
drivers/clk/meson/g12a.c | 2 +-
drivers/clk/meson/gxbb.c | 2 +-
drivers/core/device-remove.c | 18 +--
drivers/core/device.c | 135 ++++++++++--------
drivers/core/devres.c | 4 +-
drivers/core/dump.c | 6 +-
drivers/core/lists.c | 2 +-
drivers/core/root.c | 58 +++++---
drivers/core/simple-bus.c | 7 +-
drivers/core/uclass.c | 12 +-
drivers/gpio/mpc8xxx_gpio.c | 4 +-
drivers/gpio/octeon_gpio.c | 2 +-
drivers/gpio/sandbox.c | 2 +-
drivers/i2c/designware_i2c_pci.c | 4 +-
drivers/i2c/i2c-uclass.c | 2 +-
drivers/i2c/sandbox_i2c.c | 5 +-
drivers/misc/spltest_sandbox.c | 6 +
drivers/misc/swap_case.c | 2 +-
drivers/mmc/octeontx_hsmmc.c | 25 ++--
drivers/mmc/pci_mmc.c | 2 +-
drivers/mtd/nand/raw/octeontx_nand.c | 4 +-
drivers/mtd/nand/spi/core.c | 2 +-
drivers/mtd/spi/sf-uclass.c | 2 +-
drivers/mtd/spi/sf_probe.c | 2 +-
drivers/net/fm/eth.c | 4 +-
drivers/net/fsl_enetc.c | 8 +-
drivers/net/fsl_enetc_mdio.c | 2 +-
drivers/net/mdio-ipq4019.c | 4 +-
drivers/net/mdio_mux_i2creg.c | 2 +-
drivers/net/mvmdio.c | 4 +-
drivers/net/octeontx/smi.c | 2 +-
drivers/net/tsec.c | 3 +-
drivers/pci/pci-uclass.c | 8 +-
drivers/phy/phy-ti-am654.c | 2 +-
drivers/pinctrl/intel/pinctrl_apl.c | 12 --
drivers/pinctrl/pinctrl-uclass.c | 4 +-
drivers/power/domain/meson-ee-pwrc.c | 4 +-
drivers/power/domain/meson-gx-pwrc-vpu.c | 4 +-
drivers/power/regulator/pbias_regulator.c | 3 +-
drivers/pwm/pwm-meson.c | 9 +-
drivers/remoteproc/rproc-uclass.c | 2 +-
drivers/reset/reset-socfpga.c | 2 +-
drivers/serial/sandbox.c | 16 +--
drivers/serial/serial-uclass.c | 2 +-
drivers/spi/fsl_dspi.c | 6 +-
drivers/spi/ich.c | 11 --
drivers/spi/ich.h | 11 ++
drivers/spi/spi-uclass.c | 2 +-
drivers/sysreset/sysreset_sandbox.c | 2 +-
drivers/sysreset/sysreset_x86.c | 5 +-
drivers/tee/optee/core.c | 2 +-
drivers/timer/timer-uclass.c | 2 +-
drivers/usb/cdns3/core.c | 4 +-
drivers/usb/dwc3/core.c | 2 +-
drivers/usb/dwc3/dwc3-generic.c | 6 +-
drivers/usb/dwc3/dwc3-meson-g12a.c | 2 +-
drivers/usb/dwc3/dwc3-meson-gxl.c | 2 +-
drivers/usb/gadget/dwc2_udc_otg.c | 4 +-
drivers/usb/host/dwc3-octeon-glue.c | 2 +-
drivers/usb/host/dwc3-sti-glue.c | 5 +-
drivers/usb/host/ehci-mx6.c | 2 +-
drivers/usb/host/usb-uclass.c | 4 +-
drivers/usb/host/xhci-dwc3.c | 2 +-
drivers/usb/mtu3/mtu3_core.c | 2 +-
drivers/usb/mtu3/mtu3_plat.c | 4 +-
drivers/usb/musb-new/ti-musb.c | 2 +-
drivers/video/nexell_display.c | 2 +-
drivers/video/rockchip/rk_mipi.c | 2 +-
include/asm-generic/global_data.h | 8 +-
include/dm/device-internal.h | 1 +
include/dm/device.h | 74 ++++++++--
include/dm/read.h | 18 +--
include/dm/simple_bus.h | 15 ++
include/linux/mtd/mtd.h | 9 +-
include/linux/mtd/nand.h | 14 ++
include/linux/mtd/spi-nor.h | 6 +-
include/linux/mtd/spinand.h | 15 ++
include/virtio.h | 2 +-
net/mdio-mux-uclass.c | 2 +-
net/mdio-uclass.c | 8 +-
test/dm/bus.c | 10 +-
test/dm/core.c | 26 ++--
test/dm/cpu.c | 2 +-
test/dm/pci.c | 6 +-
test/dm/test-fdt.c | 20 +--
test/dm/virtio.c | 2 +-
112 files changed, 655 insertions(+), 410 deletions(-)
create mode 100644 arch/sandbox/include/asm/i2c.h
create mode 100644 arch/sandbox/include/asm/serial.h
create mode 100644 arch/x86/include/asm/arch-apollolake/hostbridge.h
create mode 100644 arch/x86/include/asm/arch-apollolake/pmc.h
create mode 100644 arch/x86/include/asm/p2sb.h
create mode 100644 arch/x86/include/asm/sysreset.h
create mode 100644 include/dm/simple_bus.h

--
2.29.2.684.gfbc64c5ab5-goog