From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean-Jacques Hiblot Date: Fri, 14 Apr 2017 13:13:44 +0200 Subject: [U-Boot] [PATCH 00/11] OMAP: Move SATA to use block driver model In-Reply-To: <1492168089-15437-1-git-send-email-jjhiblot@ti.com> References: <1492168089-15437-1-git-send-email-jjhiblot@ti.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi all, This is the VERSION 3 of the series. Sorry for the confusion, I messed up while preparing the patches. Jean-Jacques On 14/04/2017 13:07, Jean-Jacques Hiblot wrote: > This series adds support for SATA using the driver model on omap platforms. > It is based on the work of Mugunthan V N in Feb 2016 > > The first 2 patches are preparatory work. > The 3rd patch adds a new framework to handle PHYs in a generic manner. The idea > is to move the phy initialization out of the board-specific code into a proper > driver. The link between the phy device and the controller device is done in > by device-tree as it's done in linux. The API to control a phy has been copied > from linux, excpet that the functions are prefixed by 'generic_phy_' instead of > just 'phy_' because phy_reset() is already used to handle the Ethernet phys. > The 5th patch adds a phy driver for the pipe3 sata phy found in the > omaps/am5x/dra7x SOCs. > The 6th patch allows the device under the node ocp2scp at 4a090000 to be probed. > The 7th patch implements a driver for the SATA controller found in the > omaps/am5x/dra7x SOCs. > The 8th patch is cosmetic and changes the interface of scsi_detect_dev() > The 9th patch moves the call to part_init() out of scsi_detect_dev(). This is > a preparatory work path #10. > The 10th patches fix a divide-by-0 error that happens in scsi_scan() > when DM is used and split scsi_scan() in 2 functions for clarity. > The last patch enables the DM sata by default for the dra7 platforms. > > changes since v2: > * Added unit tests for generic PHY uclass. > * Changed the generic phy API to use a 'struct udevice*' to reference the phy > device. > * Don't modify anymore the root Makefile. > * Updated the Kconfig with more details on the PHY framework. > * Use a Unique Lincense Identifier (SPDX) > * Use omap5-u-boot.dtsi to mark the ocp2scp bus as compatible with "simple-bus" > * Split scsi_scan() in 2 for clarity. The function was becoming too long. > > changes since v1: > * changed the way the 'old' sata code is compiled out when DM_SCSI is enabled. > * added a new framework for PHY management. > * added a new driver for the PIPE3 phy and use it in the dwc_ahci driver. > * changed the interface of scsi_detect_dev() and moved the call part_init() out > of it. > * modified the fix to scsi_scan() in order to call scsi_detect_dev() only once. > * the max_lun and max_id parameters are now taken from the device-tree. > * Updated the defconfig changes to include the PHY driver and its dependencies. > > Jean-Jacques Hiblot (11): > arm: omap: sata: move enable sata clocks to enable_basic_clocks() > arm: omap: sata: compile out board-level sata code when CONFIG_DM_SCSI > is defined > drivers: phy: add generic PHY framework > dm: test: Add tests for the generic PHY uclass > drivers: phy: add PIPE3 phy driver > dra7: dtsi: mark ocp2scp bus compatible with "simple-bus" > drivers: block: dwc_ahci: Implement a driver for Synopsys DWC sata > device > scsi: make the LUN a parameter of scsi_detect_dev() > scsi: move the partition initialization out of the scsi detection > dm: scsi: fix divide-by-0 error in scsi_scan() > defconfig: dra7xx_evm: enable CONFIG_BLK and disk driver model for > SCSI > > arch/arm/dts/omap5-u-boot.dtsi | 4 + > arch/arm/mach-omap2/Makefile | 2 + > arch/arm/mach-omap2/omap5/hw_data.c | 12 ++ > arch/arm/mach-omap2/sata.c | 23 --- > arch/sandbox/dts/test.dts | 9 + > common/scsi.c | 98 +++++----- > configs/dra7xx_evm_defconfig | 12 +- > configs/dra7xx_hs_evm_defconfig | 11 +- > configs/sandbox_defconfig | 2 + > configs/sandbox_noblk_defconfig | 2 + > configs/sandbox_spl_defconfig | 3 + > drivers/Kconfig | 2 + > drivers/Makefile | 1 + > drivers/block/Kconfig | 10 + > drivers/block/Makefile | 1 + > drivers/block/dwc_ahci.c | 100 ++++++++++ > drivers/phy/Kconfig | 59 ++++++ > drivers/phy/Makefile | 4 + > drivers/phy/phy-uclass.c | 64 +++++++ > drivers/phy/sandbox-phy.c | 78 ++++++++ > drivers/phy/ti-pipe3-phy.c | 365 ++++++++++++++++++++++++++++++++++++ > include/dm/uclass-id.h | 1 + > include/generic-phy.h | 36 ++++ > test/dm/Makefile | 1 + > test/dm/generic_phy.c | 89 +++++++++ > 25 files changed, 922 insertions(+), 67 deletions(-) > create mode 100644 drivers/block/dwc_ahci.c > create mode 100644 drivers/phy/Kconfig > create mode 100644 drivers/phy/Makefile > create mode 100644 drivers/phy/phy-uclass.c > create mode 100644 drivers/phy/sandbox-phy.c > create mode 100644 drivers/phy/ti-pipe3-phy.c > create mode 100644 include/generic-phy.h > create mode 100644 test/dm/generic_phy.c >