[U-Boot] [PATCH v2 00/40] dm: sata: Complete driver-model support for SATA

Simon Glass sjg at chromium.org
Sat Jul 29 17:34:51 UTC 2017


Note: This series is rebased to u-boot-mmc/master with a fix-up patch
for a broken patch there.

This series completes the conversion of SATA to driver model.

Previous work converted SCSI including the SCSI-based SATA driver. This
series converts the AHCI uclass itself, adding operations and adjusting
the 'sata' command to work correctly.

An existing board (Compulab Utilite) is used for this work. It uses SATA
without the SCSI layer. Unfortunately this board does not currently use
driver model for MMC or USB, nor does it include a device tree. Therefore
additional patches are included in this series to convert this over. Note
that USB is rendered inoperative since the relevant device-tree nodes are
disabled. Further work is needed here (e.g. by the board maintainer) but
it is well beyond the objective of this series.

A long-standing niggle with MMC has been the CONFIG_DM_MMC_OPS option.
This was introduced to allow driver model to handle MMC operations rather
than having them in struct mmc. This was needed since the original uclass
did not have support for operations.

At present i.MX is the only SoC that defines CONFIG_DM_MMC without
CONFIG_DM_MMC_OPS. With this driver converted, the option is no longer
necessary so this series takes the opportunity to drop that option.

Changes in v2:
- Add new patch to avoid calling dm_scan_fdt_dev() with of-platdata
- Rebase to u-boot-mmc/master

Simon Glass (40):
  dm: core: Avoid calling dm_scan_fdt_dev() with of-platdata
  dm: blk: Add a function to find an interface-type name
  dm: blk: Add a generic function for block device commands
  dm: sata: Adjust the 'sata' command to use blk_common_cmd()
  dm: scsi: Adjust the 'scsi' command to use blk_common_cmd()
  dm: ide: Adjust the 'ide' command to use blk_common_cmd()
  dm: usb: Adjust the 'usb' command to use blk_common_cmd()
  dm: blk: Update return value in blk_create_devicef()
  dm: core: Add a comment about the device_remove() flags
  dm: sata: dwc_ahsata: Make functions static
  dm: sata: dw_sata: Drop dwc_ahsata_rw_ncq_cmd()
  dm: sata: dw_sata: Move exported functions to the end
  dm: sata: dw_sata: Rename 'probe_ent' to uc_priv
  dm: sata: dw_sata: Drop unnecessary casts
  dm: sata: dw_sata: Pass uc_priv to internal functions
  dm: sata: dw_sata: Drop unnecessary brackets
  dm: sata: dw_sata: Sort #include directives
  dm: sata: dw_sata: Rename the dwc_ahsata private header
  dm: sata: dw_sata: Drop is_ready
  dm: sata: dw_sata: More ahci_init_one() futher down
  dm: sata: dw_sata: Set up common versions of operations
  dm: sata: Support driver model with the 'sata' command
  dm: sata: imx: Allow driver model to be used for sata
  dm: sata: Update the AHCI uclass to support operations
  dm: sata: dwc_ahsata: Add support for driver model
  dm: mmc: fsl_esdhc: Pass private data to internal functions
  dm: mmc: fsl_esdhc: Set up common versions of operations
  dm: mmc: fsl_esdhc: Detect reset failure
  dm: mmc: fsl_esdhc: Detect init failure
  dm: mmc: fsl_esdhc: Set up platform data
  dm: mmc: fsl_esdhc: Drop mmc_init() call from fsl_esdhc_init()
  dm: mmc: fsl_esdhc: Update to support livetree
  dm: mmc: fsl_esdhc: Update to support MMC operations
  dm: imx: cm_fx6: Support driver model for SATA
  dm: imx: cm_fx6: Add device tree for cm_fx6
  dm: imx: cm_fx6: Add MMC support for CONFIG_BLK
  dm: imx: cm_fx6: Enable more driver model support
  dm: imx: Move i.MX devices to use CONFIG_DM_MMC_OPS
  dm: mmc: Correct Kconfig condition for SPL_DM_MMC_OPS
  dm: mmc: Drop CONFIG_DM_MMC_OPS

 arch/arm/Kconfig                                |   2 -
 arch/arm/dts/Makefile                           |   1 +
 arch/arm/dts/imx6q-cm-fx6.dts                   | 115 ++++
 arch/arm/mach-imx/cpu.c                         |   2 +-
 board/compulab/cm_fx6/cm_fx6.c                  |  80 +++
 cmd/Makefile                                    |   1 +
 cmd/blk_common.c                                | 104 ++++
 cmd/ide.c                                       | 107 +---
 cmd/sata.c                                      | 178 +++---
 cmd/scsi.c                                      |  79 +--
 cmd/usb.c                                       | 111 +---
 common/splash_source.c                          |   2 +-
 configs/Linksprite_pcDuino3_defconfig           |   3 -
 configs/cm_fx6_defconfig                        |   8 +-
 configs/imx6q_logic_defconfig                   |   1 -
 configs/imx6qdl_icore_mmc_defconfig             |   1 -
 configs/imx6qdl_icore_rqs_defconfig             |   1 -
 configs/imx6ul_geam_mmc_defconfig               |   1 -
 configs/imx6ul_geam_nand_defconfig              |   1 -
 configs/imx6ul_isiot_emmc_defconfig             |   1 -
 configs/imx6ul_isiot_mmc_defconfig              |   1 -
 configs/imx6ul_isiot_nand_defconfig             |   1 -
 configs/ls1012aqds_qspi_defconfig               |   1 -
 configs/ls1012ardb_qspi_defconfig               |   1 -
 configs/mx6slevk_defconfig                      |   1 -
 configs/mx6slevk_spinor_defconfig               |   1 -
 configs/mx6sllevk_defconfig                     |   1 -
 configs/mx6sllevk_plugin_defconfig              |   1 -
 configs/mx6sxsabreauto_defconfig                |   1 -
 configs/mx6ull_14x14_evk_defconfig              |   1 -
 configs/mx6ull_14x14_evk_plugin_defconfig       |   1 -
 configs/mx7dsabresd_defconfig                   |   1 -
 configs/mx7dsabresd_secure_defconfig            |   1 -
 configs/mx7ulp_evk_defconfig                    |   1 -
 configs/mx7ulp_evk_plugin_defconfig             |   1 -
 configs/opos6uldev_defconfig                    |   1 -
 drivers/ata/dwc_ahsata.c                        | 797 +++++++++++++-----------
 drivers/ata/{dwc_ahsata.h => dwc_ahsata_priv.h} |   6 +-
 drivers/ata/sata.c                              |  37 ++
 drivers/block/blk-uclass.c                      |   7 +-
 drivers/block/blk_legacy.c                      |   7 +
 drivers/core/syscon-uclass.c                    |   2 +
 drivers/mmc/Kconfig                             |  39 +-
 drivers/mmc/dw_mmc.c                            |   8 +-
 drivers/mmc/fsl_esdhc.c                         | 261 +++++---
 drivers/mmc/mmc-uclass.c                        |   4 -
 drivers/mmc/mmc.c                               |  12 +-
 drivers/mmc/mmc_legacy.c                        |   2 +-
 drivers/mmc/sdhci.c                             |   8 +-
 include/ahci.h                                  |  54 ++
 include/blk.h                                   |  20 +
 include/configs/am335x_evm.h                    |   1 -
 include/configs/am335x_shc.h                    |   1 -
 include/configs/chiliboard.h                    |   1 -
 include/configs/omap3_logic.h                   |   1 -
 include/dm/device-internal.h                    |   2 +-
 include/dwc_ahsata.h                            |  16 +
 include/dwmmc.h                                 |   2 +-
 include/mmc.h                                   |   6 +-
 include/sata.h                                  |   5 +-
 include/sdhci.h                                 |   2 +-
 61 files changed, 1195 insertions(+), 921 deletions(-)
 create mode 100644 arch/arm/dts/imx6q-cm-fx6.dts
 create mode 100644 cmd/blk_common.c
 rename drivers/ata/{dwc_ahsata.h => dwc_ahsata_priv.h} (99%)
 create mode 100644 include/dwc_ahsata.h

-- 
2.14.0.rc0.400.g1c36432dff-goog



More information about the U-Boot mailing list