Skip to content

dm: mmc: Add driver-model support for MMC operations

Simon Glass u-boot 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest13 patches 0 repliesNew
  2. v127 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- Add missing struct ehci_ctrl to struct zynq_ehci_priv
- Add new dm_scan_fdt_dev() function and convert the code
- Add new patch to bring in dm_scan_fdt_dev()
- Add new patch to make use of dm_scan_fdt_dev()
- Add new patch to show early-malloc() usage in bdinfo
- Add new patch to support CONFIG_BLK with socfpga
- Add new patch to support raw partitions with CONFIG_BLK
- Add new patch to use blk_dread/write() instead of direct calls
- Add new patch to use dm_scan_fdt_dev() directly where possible
- Drop patches previously applied to u-boot-dm/next
- Fix sign-off tag

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13dm: core: Add a function to bind child devicesdrivers/core/root.c include/dm/device.h+25 -00 replies
1/13dm: core: Add a function to bind child devices+0 -00 replies
2/13dm: Convert users from dm_scan_fdt_node() to dm_scan_fdt_dev()arch/x86/lib/lpc-uclass.c common/usb_hub.c drivers/core/simple-bus.c +17 more+20 -500 replies
2/13dm: Convert users from dm_scan_fdt_node() to dm_scan_fdt_dev()+0 -01 reply
2/13dm: Convert users from dm_scan_fdt_node() to dm_scan_fdt_dev()+0 -01 reply
3/13dm: Use dm_scan_fdt_dev() directly where possiblearch/x86/lib/lpc-uclass.c common/usb_hub.c drivers/i2c/i2c-uclass.c +14 more+21 -1230 replies
3/13dm: Use dm_scan_fdt_dev() directly where possible+0 -00 replies
4/13arm: Show early-malloc() usage in bdinfocmd/bdinfo.c+5 -00 replies
4/13arm: Show early-malloc() usage in bdinfo+0 -00 replies
5/13net: phy: marvell: Add a missing errno.h headerdrivers/net/phy/marvell.c+1 -00 replies
5/13net: phy: marvell: Add a missing errno.h header+0 -00 replies
6/13zynq: Increase the early malloc() sizearch/arm/cpu/armv8/zynqmp/Kconfig arch/arm/mach-zynq/Kconfig+7 -00 replies
6/13zynq: Increase the early malloc() size+0 -00 replies
7/13dm: zynq: usb: Convert to CONFIG_DM_USBarch/arm/Kconfig drivers/usb/host/ehci-zynq.c+53 -520 replies
7/13dm: zynq: usb: Convert to CONFIG_DM_USB+0 -00 replies
8/13dm: mmc: zynq: Convert zynq to use driver model for MMCarch/arm/Kconfig drivers/mmc/zynq_sdhci.c+39 -51 reply
8/13dm: mmc: zynq: Convert zynq to use driver model for MMC+0 -00 replies
9/13dm: socfpga: mmc: Support CONFIG_BLKdrivers/mmc/socfpga_dw_mmc.c+31 -10 replies
9/13dm: socfpga: mmc: Support CONFIG_BLK+0 -00 replies
10/13dm: usb: Use blk_dread/write() instead of direct callscmd/usb_mass_storage.c+2 -20 replies
10/13dm: usb: Use blk_dread/write() instead of direct calls+0 -00 replies
11/13dm: spl: mmc: Support raw partitions with CONFIG_BLKcommon/spl/spl_mmc.c+1 -10 replies
11/13dm: spl: mmc: Support raw partitions with CONFIG_BLK+0 -00 replies
12/13dm: mmc: Enable DM_MMC_OPS by default with DM_MMCdrivers/mmc/Kconfig+1 -00 replies
12/13dm: mmc: Enable DM_MMC_OPS by default with DM_MMC+0 -00 replies
12/13dm: mmc: Enable DM_MMC_OPS by default with DM_MMC+0 -00 replies
13/13dm: blk: Enable CONFIG_BLK if DM_MMC is enableddrivers/block/Kconfig+1 -00 replies
13/13dm: blk: Enable CONFIG_BLK if DM_MMC is enabled+0 -00 replies
13/13dm: blk: Enable CONFIG_BLK if DM_MMC is enabled+0 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [U-Boot] [PATCH v2 00/13] dm: mmc: Add driver-model support for MMC operations

At present MMC does not use driver model for its operations. It uses its own structure and passes a struct mmc instead of a struct udevice.

This series addresses this by adding driver-model operations for MMC. The conversion process is also started, with patches for rockchip, zynq and qualcomm.

While testing the v1 series a problem was found where simple-bus would bind all child devices prior to relocation, even those not marked for pre-relocation use. This caused Zynq boards to run out of memory with DM_USB enabled.

This is caused by the 'false' value passed to dm_scan_fdt_node() by simple-bus. To fix this a new dm_scan_fdt_dev() function is created which passes the correct flag value. Existing users of dm_scan_fdt_node() are converted.

Changes in v2:
- Add missing struct ehci_ctrl to struct zynq_ehci_priv
- Add new dm_scan_fdt_dev() function and convert the code
- Add new patch to bring in dm_scan_fdt_dev()
- Add new patch to make use of dm_scan_fdt_dev()
- Add new patch to show early-malloc() usage in bdinfo
- Add new patch to support CONFIG_BLK with socfpga
- Add new patch to support raw partitions with CONFIG_BLK
- Add new patch to use blk_dread/write() instead of direct calls
- Add new patch to use dm_scan_fdt_dev() directly where possible
- Drop patches previously applied to u-boot-dm/next
- Fix sign-off tag

Simon Glass (13):
dm: core: Add a function to bind child devices
dm: Convert users from dm_scan_fdt_node() to dm_scan_fdt_dev()
dm: Use dm_scan_fdt_dev() directly where possible
arm: Show early-malloc() usage in bdinfo
net: phy: marvell: Add a missing errno.h header
zynq: Increase the early malloc() size
dm: zynq: usb: Convert to CONFIG_DM_USB
dm: mmc: zynq: Convert zynq to use driver model for MMC
dm: socfpga: mmc: Support CONFIG_BLK
dm: usb: Use blk_dread/write() instead of direct calls
dm: spl: mmc: Support raw partitions with CONFIG_BLK
dm: mmc: Enable DM_MMC_OPS by default with DM_MMC
dm: blk: Enable CONFIG_BLK if DM_MMC is enabled

 arch/arm/Kconfig                          |   7 ++
 arch/arm/cpu/armv8/zynqmp/Kconfig         |   4 ++
 arch/arm/mach-zynq/Kconfig                |   3 +
 arch/x86/lib/lpc-uclass.c                 |  15 +----
 cmd/bdinfo.c                              |   5 ++
 cmd/usb_mass_storage.c                    |   4 +-
 common/spl/spl_mmc.c                      |   2 +-
 common/usb_hub.c                          |   9 +--
 drivers/block/Kconfig                     |   1 +
 drivers/core/root.c                       |   9 +++
 drivers/core/simple-bus.c                 |   3 +-
 drivers/i2c/i2c-uclass.c                  |   8 +--
 drivers/i2c/sandbox_i2c.c                 |   4 +-
 drivers/misc/cros_ec.c                    |   9 +--
 drivers/mmc/Kconfig                       |   1 +
 drivers/mmc/socfpga_dw_mmc.c              |  32 +++++++++-
 drivers/mmc/zynq_sdhci.c                  |  39 +++++++++--
 drivers/net/phy/marvell.c                 |   1 +
 drivers/pch/pch-uclass.c                  |  15 +----
 drivers/pci/pci-uclass.c                  |  24 +------
 drivers/pci/pci_sandbox.c                 |  11 +---
 drivers/pinctrl/pinctrl_pic32.c           |   9 +--
 drivers/pinctrl/rockchip/pinctrl_rk3036.c |   9 +--
 drivers/pinctrl/rockchip/pinctrl_rk3288.c |   9 +--
 drivers/power/pmic/pm8916.c               |   9 +--
 drivers/power/regulator/Kconfig           |   2 +-
 drivers/spi/spi-uclass.c                  |   9 +--
 drivers/spmi/spmi-uclass.c                |   8 +--
 drivers/usb/emul/usb-emul-uclass.c        |   9 +--
 drivers/usb/host/ehci-zynq.c              | 103 +++++++++++++++---------------
 drivers/usb/host/usb-uclass.c             |   9 +--
 include/dm/device.h                       |  16 +++++
 include/power/regulator.h                 |   2 +-
 test/dm/bus.c                             |   3 +-
 test/dm/i2c.c                             |   4 +-
 test/dm/spi.c                             |   4 +-
 36 files changed, 192 insertions(+), 219 deletions(-)
Signature · 1 line
2.8.0.rc3.226.g39d4020