]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: ufs: ufs-qcom: Streamline UFS MCQ resource mapping
authorNitin Rawat <quic_nitirawa@quicinc.com>
Wed, 3 Sep 2025 07:48:14 +0000 (13:18 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 10 Sep 2025 02:52:03 +0000 (22:52 -0400)
commit2b9887b17ebe942cbef7cffc4e19fa2aa5fed4c8
tree3e05493bf8d36f78907b2353781dbf2ffadcc292
parent8f5ae30d69d7543eee0d70083daf4de8fe15d585
scsi: ufs: ufs-qcom: Streamline UFS MCQ resource mapping

The current MCQ resource configuration involves multiple resource
mappings and dynamic resource allocation.

Simplify the resource mapping by directly mapping the single "mcq"
resource from device tree to hba->mcq_base instead of mapping multiple
separate resources (RES_UFS, RES_MCQ, RES_MCQ_SQD, RES_MCQ_VS).

It also uses predefined offsets for MCQ doorbell registers (SQD, CQD,
SQIS, CQIS) relative to the MCQ base,providing clearer memory layout
clarity.

Additionally update vendor-specific register offset UFS_MEM_CQIS_VS
offset from 0x8 to 0x4008 to align with the hardware programming guide.

The new approach assumes the device tree provides a single "mcq"
resource that encompasses the entire MCQ configuration space, making the
driver more maintainable and less prone to resource mapping errors.

The change aligns the driver implementation with the device tree binding
specification, which defines a single 'mcq' memory region rather than
multiple separate regions.

Co-developed-by: Ram Kumar Dwivedi <quic_rdwivedi@quicinc.com>
Signed-off-by: Ram Kumar Dwivedi <quic_rdwivedi@quicinc.com>
Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/host/ufs-qcom.c
drivers/ufs/host/ufs-qcom.h