Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6795096rwr; Tue, 9 May 2023 22:31:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Jd5wrIDy1y6pt81sJUrhvMrwRbVDqx4yD752vqthiRO7DVieJV2e0Y6dIuua7bnjEcKUt X-Received: by 2002:a17:902:c40b:b0:1aa:fd48:f5e2 with SMTP id k11-20020a170902c40b00b001aafd48f5e2mr21951741plk.32.1683696671759; Tue, 09 May 2023 22:31:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683696671; cv=none; d=google.com; s=arc-20160816; b=c6hHfoEasMzsBVaPPvMqjKQxgpZSUzcYhgo5xwBuvkFkFURgdkvEf2j8J0JrLk35oc imk6gPzIHfIfXc4j5dDRSySp+qk23eq35HjuKkF1+AoZDyRElCZiWqGanX3X1OsMG3Am CoJf1b5xUQexHVmEt4S9kl33uAiFhs45Sf/QbPW+AU58LkuMIMmxJVJNJ262jD/9UAr+ xr4XbI8txVR26sCyhjWZuITXu+hQa07KVaRPOn3wnLbskjiF8nTW6d9nu+fsgH3rzPZp qVN56o9CvUefhip54Qzz/aeBAVTypk/RCA1GEfFe03scKhIVCEVAkjpnjDUESXYUb22U KH7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=uEG9NCAeHkYxw7zM+ehn1ThstYlWo7xMCJyDEpC9A+Y=; b=gxT8ZFjZyMSujg++g1EZOm3szZlNVnHbV/B+uvYV5XgEU12rI22yk6H7fYWLHLwxl3 dHqhf+UACI8SLdIcZC/LTeHFzNvc22H/Qqf/Kj7R0sC2rE94I19bpfSWrcb54T9sAy7m Tgh1XfDFWJx6Ui50hVBxmEhwWiXWwxOU19phm7/4XR+AY9hDh0W/jiCl2gvNJ8N0YoCq 8Ngp+Xlzt187Uwm5zFOyadKf4l3J2grDiu0eY4XPeZatbqG6k0lZSVU3+UA7FzwXg5JB gBTKv7kXSmot0INgtTbaPoexV8AJgLRJrekMzq/1sYRClpXXl8LlQeF5z/9C1f8/orQu +tqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=NsFUKqnV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k8-20020a170902ba8800b001a979141a24si3093326pls.214.2023.05.09.22.30.56; Tue, 09 May 2023 22:31:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=NsFUKqnV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235326AbjEJFZw (ORCPT + 99 others); Wed, 10 May 2023 01:25:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234887AbjEJFZu (ORCPT ); Wed, 10 May 2023 01:25:50 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 752FEE53; Tue, 9 May 2023 22:25:47 -0700 (PDT) Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34A2iO8h025142; Wed, 10 May 2023 05:25:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=uEG9NCAeHkYxw7zM+ehn1ThstYlWo7xMCJyDEpC9A+Y=; b=NsFUKqnVyhOiKXNvp0oG3HEgrK/Jr+6hZ4wbToVcMQlkKsAdaVqBuS5QxqPKnmaMIK0P h9iTgt54YktyVOuFpo00lQDgwerTQJGSCQdaDYGhN4p8D6VZl6eDD1lxyQqZCSbV4+Z8 eKUBiCR2gP1mfkPglvLx4BTWFSOwZBpD8v3FfR52OOPpwa1Gfu0kd6yBOLWEyvon1oyl CoShXggWR/LM6sEVFlEvwIXevMLDoE1aPKjHSn3I2B0Ga/ugGJyB1zc4fA9mQPT+8th5 WdZvNgqIKQPgSCRaqJlMvmF7JP7cBVojHcORo6J86gu7ahjdCBM4+od5sYiC+evqc7/U qA== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qfsxj95sn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 May 2023 05:25:33 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 34A5PWtQ021630 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 May 2023 05:25:32 GMT Received: from stor-berry.qualcomm.com (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Tue, 9 May 2023 22:25:31 -0700 From: "Bao D. Nguyen" To: , , , , , , , , CC: , "Bao D. Nguyen" , Alim Akhtar , "James E.J. Bottomley" , Eric Biggers , open list Subject: [PATCH v3 1/7] ufs: core: Combine 32-bit command_desc_base_addr_lo/hi Date: Tue, 9 May 2023 22:24:22 -0700 Message-ID: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: BFCH8wCEvVB0KzW8emNXLg_P8Jw3Rva1 X-Proofpoint-GUID: BFCH8wCEvVB0KzW8emNXLg_P8Jw3Rva1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-10_02,2023-05-05_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxlogscore=999 phishscore=0 spamscore=0 suspectscore=0 clxscore=1015 impostorscore=0 bulkscore=0 priorityscore=1501 mlxscore=0 lowpriorityscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305100042 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The utp command descriptor base address is a 57-bit field in the utp 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 --- 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