FROMLIST: 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@quicinc.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Bug: 285631559 Link: https://lore.kernel.org/linux-scsi/4e6f7f5a15000cdae77c3014b477264f57bf572c.1685396241.git.quic_nguyenb@quicinc.com/ Change-Id: Ia976d86b0c8b9e31fd5cd784191ea3eb4eb5c130 Signed-off-by: SEO HOYOUNG <hy50.seo@samsung.com>
This commit is contained in:
parent
8326170bb6
commit
0866848447
2 changed files with 4 additions and 8 deletions
|
|
@ -3906,10 +3906,8 @@ static void ufshcd_host_memory_configure(struct ufs_hba *hba)
|
||||||
/* Configure UTRD with command descriptor base address */
|
/* Configure UTRD with command descriptor base address */
|
||||||
cmd_desc_element_addr =
|
cmd_desc_element_addr =
|
||||||
(cmd_desc_dma_addr + (cmd_desc_size * i));
|
(cmd_desc_dma_addr + (cmd_desc_size * i));
|
||||||
utrdlp[i].command_desc_base_addr_lo =
|
utrdlp[i].command_desc_base_addr =
|
||||||
cpu_to_le32(lower_32_bits(cmd_desc_element_addr));
|
cpu_to_le64(cmd_desc_element_addr);
|
||||||
utrdlp[i].command_desc_base_addr_hi =
|
|
||||||
cpu_to_le32(upper_32_bits(cmd_desc_element_addr));
|
|
||||||
|
|
||||||
/* Response upiu and prdt offset should be in double words */
|
/* Response upiu and prdt offset should be in double words */
|
||||||
if (hba->quirks & UFSHCD_QUIRK_PRDT_BYTE_GRAN) {
|
if (hba->quirks & UFSHCD_QUIRK_PRDT_BYTE_GRAN) {
|
||||||
|
|
|
||||||
|
|
@ -503,8 +503,7 @@ struct request_desc_header {
|
||||||
/**
|
/**
|
||||||
* struct utp_transfer_req_desc - UTP Transfer Request Descriptor (UTRD)
|
* struct utp_transfer_req_desc - UTP Transfer Request Descriptor (UTRD)
|
||||||
* @header: UTRD header DW-0 to DW-3
|
* @header: UTRD header DW-0 to DW-3
|
||||||
* @command_desc_base_addr_lo: UCD base address low DW-4
|
* @command_desc_base_addr: UCD base address DW 4-5
|
||||||
* @command_desc_base_addr_hi: UCD base address high DW-5
|
|
||||||
* @response_upiu_length: response UPIU length DW-6
|
* @response_upiu_length: response UPIU length DW-6
|
||||||
* @response_upiu_offset: response UPIU offset DW-6
|
* @response_upiu_offset: response UPIU offset DW-6
|
||||||
* @prd_table_length: Physical region descriptor length DW-7
|
* @prd_table_length: Physical region descriptor length DW-7
|
||||||
|
|
@ -516,8 +515,7 @@ struct utp_transfer_req_desc {
|
||||||
struct request_desc_header header;
|
struct request_desc_header header;
|
||||||
|
|
||||||
/* DW 4-5*/
|
/* DW 4-5*/
|
||||||
__le32 command_desc_base_addr_lo;
|
__le64 command_desc_base_addr;
|
||||||
__le32 command_desc_base_addr_hi;
|
|
||||||
|
|
||||||
/* DW 6 */
|
/* DW 6 */
|
||||||
__le16 response_upiu_length;
|
__le16 response_upiu_length;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue