Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3691710rwd; Mon, 29 May 2023 15:16:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Yx6FhuDXwrbxQ+fib6JsjFaU8ZeFhw3XYlhQROdBnnGKJsn7k22nkhcQMdq3yFDxxvbQb X-Received: by 2002:a17:90a:fc97:b0:256:3cd5:4fde with SMTP id ci23-20020a17090afc9700b002563cd54fdemr362867pjb.44.1685398586491; Mon, 29 May 2023 15:16:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685398586; cv=none; d=google.com; s=arc-20160816; b=Fdz1bB2TvQAFWGwrG+KOTWNVBJMethmYFIpsdvL7AVub4nIPT+TcKHYJeiCxugynIH 9xLrVTX8o9Q4vDnqfXnsde1RQJau1VjVBA+YIO2xDr7ITpSBXv9anGPZHNB9Ecpn80R8 esmOqqLjz3U851JLXHi5uOOzJwQtnnyCiFIs4QEF4Cz6AoUIfvCsAgjjmSioEFML56kb 7ImO/vM8gUKlO6L6iBp6GDtL5lJ0rugSjhfJ+4fSpDjmkvcC8a0uhn2cUq5+h79dBe2W yVjbIB5iwqlin22LFz7+W5z975iy2RxL7LbN63Svzb+RgjE6d6/IoFdq4mGVmMhu3EWA zIBg== 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=9bLEPsjTRRAd4Wz3bNJyfQ1fNSAz0puW01axUG8//u8=; b=SV75kiDwxfq2+ikRtSnLt7KlJHLT+C5F8K/d9Fh8Ynf/Yk76RLd/XaouTlLWkd8PIR OhDZ6S06WtCTumLMNSnS6WFth/0zrnJmnd6sgI4WKeghtiWka5bpvp4PkxD1X6Cnrdge 4BV46dS3pMta77VfZZ9GW5vfUFFnRfVhtAaVHjQETOcgj7A3plyDbkAKQkITen8tmj5/ 18SBFT2EgP62Xhw7acJCvAw5T0KALyrVknN+DLY9JwTXDPPkHI0nNv7kCIAHZiTeLxWG EusoaquA1VhUBDN2QwirKelCnmx7AGMVav64fBQrqbo6NXQAFnYsA7KpGWsRaBC3I9Dr JzlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=noWb7stl; 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 jx20-20020a17090b46d400b0024e5ed38294si53983pjb.66.2023.05.29.15.16.12; Mon, 29 May 2023 15:16:26 -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=noWb7stl; 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 S229513AbjE2WNL (ORCPT + 99 others); Mon, 29 May 2023 18:13:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbjE2WNJ (ORCPT ); Mon, 29 May 2023 18:13:09 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE8A4DB; Mon, 29 May 2023 15:13:08 -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 34TM7tPq017186; Mon, 29 May 2023 22:12:46 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=9bLEPsjTRRAd4Wz3bNJyfQ1fNSAz0puW01axUG8//u8=; b=noWb7stlCBxGOMNnUxkljhkJWk2NXpsHVa9cqv+1eRPOfA5sszQqML4sXGpwIommNJjk 9ovojeo7HK0H9nJwQAMpaFGXTq1+X/9EcpmuK93xWxbtdtmsmec7kmxhTwgcxDZJoiX9 rchnzomrSzeQYT/Z7FgKMhziN6j6iEmlF0VmhupIJ0j7/G4JcAD3db2kCEW1tdv+JjOY 5ERdLMEFiiokelW+SiTwnlmARrFK5r6Via5fmMn7im74dKj4xw2DWHIz1qsswtIXsKvy sPLMmhDWEQFy/tpZ1QRtQ9G123lJjVXYhcBX+0N9jCeepazk1viL6Ff8toMS5pW2TmNP Lw== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3quarb4ac3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 May 2023 22:12:46 +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 34TMCjrK028744 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 May 2023 22:12:45 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; Mon, 29 May 2023 15:12:45 -0700 From: "Bao D. Nguyen" To: , , , , , , , , CC: , "Bao D. Nguyen" , Alim Akhtar , "James E.J. Bottomley" , Arthur Simchaev , Eric Biggers , Kiwoong Kim , open list Subject: [PATCH v7 1/7] ufs: core: Combine 32-bit command_desc_base_addr_lo/hi Date: Mon, 29 May 2023 15:12:20 -0700 Message-ID: <4e6f7f5a15000cdae77c3014b477264f57bf572c.1685396241.git.quic_nguyenb@quicinc.com> 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: nasanex01a.na.qualcomm.com (10.52.223.231) 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-GUID: rlzMM4dxawgpBe8bSQ_d045GW1zLQGHf X-Proofpoint-ORIG-GUID: rlzMM4dxawgpBe8bSQ_d045GW1zLQGHf X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-05-29_12,2023-05-29_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 spamscore=0 impostorscore=0 clxscore=1015 malwarescore=0 adultscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 priorityscore=1501 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305290187 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 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 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 Reviewed-by: Bart Van Assche --- 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