[<prev] [next>] [day] [month] [year] [list]
Message-ID: <0972259fefe5c3c4e223e9d2406eaa673220ff41.1684825500.git.quic_nguyenb@quicinc.com>
Date: Tue, 23 May 2023 00:28:09 -0700
From: "Bao D. Nguyen" <quic_nguyenb@...cinc.com>
To: <quic_asutoshd@...cinc.com>, <quic_cang@...cinc.com>,
<bvanassche@....org>, <mani@...nel.org>,
<stanley.chu@...iatek.com>, <adrian.hunter@...el.com>,
<beanhuo@...ron.com>, <avri.altman@....com>,
<martin.petersen@...cle.com>
CC: <linux-scsi@...r.kernel.org>,
"Bao D. Nguyen" <quic_nguyenb@...cinc.com>,
Alim Akhtar <alim.akhtar@...sung.com>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
Arthur Simchaev <Arthur.Simchaev@....com>,
Kiwoong Kim <kwmad.kim@...sung.com>,
Eric Biggers <ebiggers@...gle.com>,
open list <linux-kernel@...r.kernel.org>
Subject: [PATCH v6 1/7] ufs: core: Combine 32-bit command_desc_base_addr_lo/hi
The UTP command descriptor base address is a 57-bit field in the
UTP transfer request descriptor. Combine the two 32-bit
command_desc_base_addr_lo/hi fields into a 64-bit for better handling
of this field.
Signed-off-by: Bao D. Nguyen <quic_nguyenb@...cinc.com>
---
drivers/ufs/core/ufshcd.c | 6 ++----
include/ufs/ufshci.h | 6 ++----
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 9434328..5527d45 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -3875,10 +3875,8 @@ static void ufshcd_host_memory_configure(struct ufs_hba *hba)
/* Configure UTRD with command descriptor base address */
cmd_desc_element_addr =
(cmd_desc_dma_addr + (cmd_desc_size * i));
- utrdlp[i].command_desc_base_addr_lo =
- cpu_to_le32(lower_32_bits(cmd_desc_element_addr));
- utrdlp[i].command_desc_base_addr_hi =
- cpu_to_le32(upper_32_bits(cmd_desc_element_addr));
+ utrdlp[i].command_desc_base_addr =
+ cpu_to_le64(cmd_desc_element_addr);
/* Response upiu and prdt offset should be in double words */
if (hba->quirks & UFSHCD_QUIRK_PRDT_BYTE_GRAN) {
diff --git a/include/ufs/ufshci.h b/include/ufs/ufshci.h
index 11424bb..7c5a76b 100644
--- a/include/ufs/ufshci.h
+++ b/include/ufs/ufshci.h
@@ -503,8 +503,7 @@ struct request_desc_header {
/**
* struct utp_transfer_req_desc - UTP Transfer Request Descriptor (UTRD)
* @header: UTRD header DW-0 to DW-3
- * @command_desc_base_addr_lo: UCD base address low DW-4
- * @command_desc_base_addr_hi: UCD base address high DW-5
+ * @command_desc_base_addr: UCD base address DW 4-5
* @response_upiu_length: response UPIU length DW-6
* @response_upiu_offset: response UPIU offset DW-6
* @prd_table_length: Physical region descriptor length DW-7
@@ -516,8 +515,7 @@ struct utp_transfer_req_desc {
struct request_desc_header header;
/* DW 4-5*/
- __le32 command_desc_base_addr_lo;
- __le32 command_desc_base_addr_hi;
+ __le64 command_desc_base_addr;
/* DW 6 */
__le16 response_upiu_length;
--
2.7.4
Powered by blists - more mailing lists