Re: [PATCH v2 0/5] [SCSI] ufshcd: UFS Host Controller Driver

From: Namjae Jeon
Date: Sat Feb 25 2012 - 06:39:36 EST


Hi. Santosh.

The whole patch-set looks good to me.

Reviewed-by: Namjae Jeon <linkinjeon@xxxxxxxxx>

2012/2/24 Santosh Y <santoshsy@xxxxxxxxx>:
> From: Santosh Yaraganavi <santoshsy@xxxxxxxxx>
>
> UFS:
> Universal Flash Storage is a storage specification for flash devices.
> It is aimed to provide a universal storage interface for both
> embedded and removable flash memory based storage in mobile
> devices such as smart phones and tablet computers. The specification
> is defined by JEDEC Solid State Technology Association. UFS is based
> on MIPI M-PHY physical layer standard. UFS uses MIPI M-PHY as the
> physical layer and MIPI Unipro as the link layer.
>
> The main goals of UFS is to provide,
> Â- Optimized performance:
> Â For UFS version 1.0 and 1.1 the target performance is as follows,
> Â Support for Gear1 is mandatory (rate A: 1248Mbps, rate B: 1457.6Mbps)
> Â Support for Gear2 is optional (rate A: 2496Mbps, rate B: 2915.2Mbps)
> Â Future version of the standard,
> Â Gear3 (rate A: 4992Mbps, rate B: 5830.4Mbps)
> Â- Low power consumption
> Â- High random IOPs and low latency
>
> UFS Architecture Overview:
> UFS has a layered communication architecture which is based on SCSI
> SAM-5 architectural model.
>
> UFS communication architecture consists of following layers,
>
> * Application Layer: It is composed of UFS command set layer(UCS),
> ÂTask Manager and Device manager. The UFS interface is designed to be
> Âprotocol agnostic, however SCSI has been selected as a baseline
> Âprotocol for versions 1.0 and 1.1 of UFS protocol Âlayer.
> ÂUFS supports subset of SCSI commands defined by SPC-4 and SBC-3.
> Â- UCS: It handles SCSI commands supported by UFS specification.
> Â- Task manager: It handles task management functions defined by the
> Â ÂUFS which are meant for command queue control.
> Â- Device manager: It handles device level operations and device
> Â Âconfiguration operations. Device level operations mainly involve
> Â Âdevice power management operations and commands to Interconnect
> Â Âlayers. Device level configurations involve handling of query
> Â Ârequests which are used to modify and retrieve configuration
> Â Âinformation of the device.
>
> * UFS Transport Protocol(UTP) layer: UTP layer provides services for
> Âthe higher layers through Service Access Points. UTP defines 3
> Âservice access points for higher layers.
> Â- UDM_SAP: Device manager service access point is exposed to device
> Â Âmanager for device level operations. These device level operations
> Â Âare done through query requests.
> Â- UTP_CMD_SAP: Command service access point is exposed to UFS command
> Â Âset layer(UCS) to transport commands.
> Â- UTP_TM_SAP: Task management service access point is exposed to task
> Â Âmanager to transport task management functions.
> ÂUTP transports messages through UFS protocol information unit(UPIU).
>
> * UFS Interconnect Layer(UIC): This is the lowest layer of UFS layered
> Âarchitecture. It handles connection between UFS host and UFS device.
> ÂUIC consists of MIPI UniPro and MIPI M-PHY. UIC provides 2 service
> Âaccess points to upper layer,
> Â- UIC_SAP: To transport UPIU between UFS host and UFS device.
> Â- UIO_SAP: To issue commands to Unipro layers.
>
> UFSHCD:
> The UFS host controller driver is based on Linux SCSI Framework.
> UFSHCD is a low level device driver which acts as an interface between
> SCSI Midlayer and PCIe based UFS host controllers.
>
> The current UFSHCD implementation supports following functionality,
> Â- UFS controller initialization: The initialization module brings UFS
> Â host controller to active state and prepares the controller to
> Â transfer commands/response between UFSHCD and UFS device.
> Â- UTP Transfer requests: Transfer request handling module of UFSHCD
> Â receives SCSI commands from SCSI Midlayer, forms UPIUs and issues
> Â the UPIUs to UFS Host controller. Also, the module decodes responses
> Â received from UFS host controller in the form of UPIUs and intimates
> Â the SCSI Midlayer of the status of the command.
> Â- UFS error handling: Error handling module handles Host controller
> Â fatal errors, Device fatal errors and UIC interconnect layer related
> Â errors.
> Â- SCSI Error handling: This is done through UFSHCD SCSI error handling
> Â routines registered with SCSI Midlayer. Examples of some of the error
> Â handling commands issues by SCSI Midlayer are Abort task, Lun reset
> Â and host reset. UFSHCD Routines to perform these tasks are registered
> Â with SCSI Midlayer through .eh_abort_handler, .eh_device_reset_handler
> Â and .eh_host_reset_handler.
>
> In this version of UFSHCD Query requests and power management
> functionality are not implemented.
>
> This patchset is successfully applied on 3.3-rc4
>
> UFS Specifications can be found at,
> UFS - http://www.jedec.org/sites/default/files/docs/JESD220.pdf
> UFSHCI - http://www.jedec.org/sites/default/files/docs/JESD223.pdf
>
> Santosh Yaraganavi (5):
> Â[SCSI] ufshcd: UFS Host controller driver
> Â[SCSI] ufshcd: UFS UTP Transfer requests handling
> Â[SCSI] ufshcd: UFSHCI error handling
> Â[SCSI] ufshcd: SCSI error handling
> ÂDocumentation: UFS Host Controller Driver
>
> ÂDocumentation/scsi/00-INDEX | Â Â2 +
> ÂDocumentation/scsi/ufs.txt Â| Â 89 ++
> Âdrivers/scsi/Kconfig    Â|  Â1 +
> Âdrivers/scsi/Makefile    |  Â1 +
> Âdrivers/scsi/ufs/Kconfig  Â|  49 ++
> Âdrivers/scsi/ufs/Makefile  |  Â2 +
> Âdrivers/scsi/ufs/ufs.h   Â| Â207 +++++
> Âdrivers/scsi/ufs/ufshcd.c  | 1985 +++++++++++++++++++++++++++++++++++++++++++
> Âdrivers/scsi/ufs/ufshci.h  | Â376 ++++++++
> Â9 files changed, 2712 insertions(+), 0 deletions(-)
> Âcreate mode 100644 Documentation/scsi/ufs.txt
> Âcreate mode 100644 drivers/scsi/ufs/Kconfig
> Âcreate mode 100644 drivers/scsi/ufs/Makefile
> Âcreate mode 100644 drivers/scsi/ufs/ufs.h
> Âcreate mode 100644 drivers/scsi/ufs/ufshcd.c
> Âcreate mode 100644 drivers/scsi/ufs/ufshci.h
>
> --
> 1.7.5.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at Âhttp://vger.kernel.org/majordomo-info.html
> Please read the FAQ at Âhttp://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/