
+Simon
On Tue, Oct 15, 2019 at 8:59 PM Faiz Abbas faiz_abbas@ti.com wrote:
Add Support for UFS Host Controller Interface (UFSHCI) for communicating with Universal Flash Storage (UFS) devices. The steps to initialize the host controller interface are the following:
- Initiate the Host Controller Initialization process by writing to the
Host controller enable register.
- Configure the Host Controller base address registers by allocating a
host memory space and related data structures.
- Unipro link startup procedure
- Check for connected device
- Configure UFS host controller to process requests
Also register this host controller as a SCSI host controller.
Taken from Linux Kernel v5.2 (drivers/scsi/ufs/ufshcd.c) and ported to U-boot.
nits: U-Boot
Signed-off-by: Faiz Abbas faiz_abbas@ti.com
MAINTAINERS | 5 + drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/ufs/Kconfig | 9 + drivers/ufs/Makefile | 6 + drivers/ufs/ufs-uclass.c | 16 + drivers/ufs/ufs.c | 1968 ++++++++++++++++++++++++++++++++++++++ drivers/ufs/ufs.h | 918 ++++++++++++++++++ drivers/ufs/unipro.h | 270 ++++++ include/dm/uclass-id.h | 1 + include/ufs.h | 29 + 11 files changed, 3225 insertions(+) create mode 100644 drivers/ufs/Kconfig create mode 100644 drivers/ufs/Makefile create mode 100644 drivers/ufs/ufs-uclass.c create mode 100644 drivers/ufs/ufs.c create mode 100644 drivers/ufs/ufs.h create mode 100644 drivers/ufs/unipro.h create mode 100644 include/ufs.h
I think we will need a sandbox ufs driver and test cases for testing dm ufs.
Regards, Bin