From: Nitin Rawat <nitin.rawat@oss.qualcomm.com>
To: mani@kernel.org, James.Bottomley@HansenPartnership.com,
martin.petersen@oracle.com
Cc: krzk+dt@kernel.org, linux-arm-msm@vger.kernel.org,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
Nitin Rawat <nitin.rawat@oss.qualcomm.com>
Subject: [PATCH V4 0/2] Simplify MCQ resource mapping
Date: Wed, 3 Sep 2025 13:18:13 +0530 [thread overview]
Message-ID: <20250903074815.8176-1-nitin.rawat@oss.qualcomm.com> (raw)
The patch series simplifies the UFS MCQ (Multi Circular Queue) resource
mapping in the Qualcomm UFS host controller driver by replacing the complex
multi-resource approach with a streamlined single-resource implementation.
The current MCQ implementation uses multiple separate resource mappings
(RES_UFS, RES_MCQ, RES_MCQ_SQD, RES_MCQ_VS) with dynamic resource
allocation, which increases code complexity and potential for resource
mapping errors. This approach also doesn't align with the device tree
binding specification that defines a single 'mcq' memory region.
Replace the multi-resource mapping with a single "mcq" resource that
encompasses the entire MCQ configuration space. The doorbell registers
(SQD, CQD, SQIS, CQIS) are accessed using predefined offsets relative
to the MCQ base address, providing clearer memory layout organization.
Tested on Qualcomm platforms SM8650 and SM8750 with UFS MCQ enabled.
Changes from v3:
1. Addressed Krzysztof comment to separate device tree and driver
patch independently in different patch series. This series caters
driver changes.
2. Addressed Manivannan's change to update commit text and remove
redundant null check in mcq code.
3. Addressed Manivannan's to Update few offsets as fixed definition
instead of enum.
Changes from v2:
1. Removed dt-bindings patch as existing binding supports required
reg-names format.
2. Added patch to refactor MCQ register dump logic for new resource
mapping.
3. Added patch to remove unused ufshcd_res_info structure from UFS core.
4. Changed reg-names from "ufs_mem" to "std" in device tree patches.
5. Reordered patches with driver changes first, then device tree changes.
6. Updated SM8750 MCQ region size from 0x2000 to 0x15000
Nitin Rawat (2):
ufs: ufs-qcom: Streamline UFS MCQ resource mapping
ufs: ufs-qcom: Refactor MCQ register dump logic
drivers/ufs/host/ufs-qcom.c | 174 +++++++++++++-----------------------
drivers/ufs/host/ufs-qcom.h | 26 +++++-
include/ufs/ufshcd.h | 25 ------
3 files changed, 85 insertions(+), 140 deletions(-)
--
2.50.1
next reply other threads:[~2025-09-03 7:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-03 7:48 Nitin Rawat [this message]
2025-09-03 7:48 ` [PATCH V4 1/2] ufs: ufs-qcom: Streamline UFS MCQ resource mapping Nitin Rawat
2025-09-03 7:48 ` [PATCH V4 2/2] ufs: ufs-qcom: Refactor MCQ register dump logic Nitin Rawat
2025-09-03 15:24 ` Bart Van Assche
2025-09-05 13:10 ` [PATCH V4 0/2] Simplify MCQ resource mapping Manivannan Sadhasivam
2025-09-10 2:54 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250903074815.8176-1-nitin.rawat@oss.qualcomm.com \
--to=nitin.rawat@oss.qualcomm.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mani@kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox