On 5/27/24 23:12, Jeuk Kim wrote:
From: Minwoo Im <minwoo...@samsung.com>
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...@samsung.com>
Reviewed-by: Jeuk Kim <jeuk20....@samsung.com>
Message-Id: <20240528023106.856777-3-minwoo...@samsung.com>
Signed-off-by: Jeuk Kim <jeuk20....@samsung.com>
---
hw/ufs/trace-events | 17 ++
hw/ufs/ufs.c | 475 ++++++++++++++++++++++++++++++++++++++++++--
hw/ufs/ufs.h | 98 ++++++++-
include/block/ufs.h | 23 ++-
4 files changed, 593 insertions(+), 20 deletions(-)
Fails build:
https://gitlab.com/qemu-project/qemu/-/jobs/6960270722
In file included from trace/trace-hw_ufs.c:5:
../hw/ufs/trace-events:28:24: error: format specifies type 'unsigned char' but the
argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
, cqid, addr);
^~~~
../hw/ufs/trace-events:25:112: error: format specifies type 'unsigned char' but the
argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
qemu_log("ufs_err_dma_write_cq " "failed to write cq entry. cqid %"PRIu8",
hwaddr %"PRIu64"" "\n", cqid, addr);
~~~~~~~
^~~~
2 errors generated.
r~