hw/ufs: Add support MCQ of UFSHCI 4.0
authorMinwoo Im <minwoo.im@samsung.com>
Tue, 28 May 2024 02:31:06 +0000 (11:31 +0900)
committerJeuk Kim <jeuk20.kim@samsung.com>
Mon, 3 Jun 2024 07:20:42 +0000 (16:20 +0900)
commit5c079578d2e46df626d13eeb629c7d761a5c4e44
tree1e2dcd5a19216a0d8829843660de126fed02d259
parentcdba3b901ac0b480eb9d940219113f0be80cc4e1
hw/ufs: Add support MCQ of UFSHCI 4.0

This patch adds support for MCQ defined in UFSHCI 4.0.  This patch
utilized the legacy I/O codes as much as possible to support MCQ.

MCQ operation & runtime register is placed at 0x1000 offset of UFSHCI
register statically with no spare space among four registers (48B):

UfsMcqSqReg, UfsMcqSqIntReg, UfsMcqCqReg, UfsMcqCqIntReg

The maxinum number of queue is 32 as per spec, and the default
MAC(Multiple Active Commands) are 32 in the device.

Example:
-device ufs,serial=foo,id=ufs0,mcq=true,mcq-maxq=8

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
Reviewed-by: Jeuk Kim <jeuk20.kim@samsung.com>
Message-Id: <20240528023106.856777-3-minwoo.im@samsung.com>
Signed-off-by: Jeuk Kim <jeuk20.kim@samsung.com>
hw/ufs/trace-events
hw/ufs/ufs.c
hw/ufs/ufs.h
include/block/ufs.h