Message ID | 20230315064255.15591-13-manivannan.sadhasivam@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2171091wrd; Tue, 14 Mar 2023 23:45:57 -0700 (PDT) X-Google-Smtp-Source: AK7set/XEQSLAMettrKAD1iPGXBR6y4S76OVpdA5aekECl1fbQbda1moOhrFnJF/VxIRDrJbpKxO X-Received: by 2002:a17:902:e54a:b0:19e:76c4:2d30 with SMTP id n10-20020a170902e54a00b0019e76c42d30mr1617960plf.61.1678862756897; Tue, 14 Mar 2023 23:45:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678862756; cv=none; d=google.com; s=arc-20160816; b=U8aLlSYvdWKILvuQKkqbkW1/8SydYiCxl6Z8lrRTdnzUfZQlEjHWHjkzQ7ux98pnFJ vU0iT3FkjMRBlGJaoQ+0L+wH7UvjQrNTbWRWFks9Bc/yxsr+JmrwblSPNWAr7eiY/Dgc VC3Op1XJA45rBl50VvdM5OCWyJR24sV1jwtg5Pru4wgMSbAfb0hfnv4RFZ5YWAiXP5rS SMuyXAIBlv67eaC4LKhpaIxJcSk+H7YeXlXv89wQ7v6PYdCVWK3axZe1XFtQiDnNRAzJ 0n1zpHe1QyZeca77C6lpQ4vmTlP8vNjt0dyBrZog7oMqNyDmw7EXfkN2XpRtn3v3ywmp 70pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gtO470wsQrdefT/eZbqt8rDglQCA1uZJNkLG9oF8ql8=; b=ziNa7IwwMY7h0Pa9mDWPjqFRad1OoE/3MmhmKgRVD47tqiJecw5hFjuesqzEukd3mz 1TIz8dH/JTRqoJIKSM4NCGPstH4d9eu/xBsyCsq23TTx+kLXCIJq9mhV9h9j5DqZq0+5 /t5/lA+NrXkQHbb2y28+fh7kJdK50NyWno1nzLTJBTyAgOnkkIyCtkY09ccnnhHkKEv9 XTcBiUf+QjF4UsT/WjUL17p4aB/YJVi0N89pM+HFUKZR36vxxuNnmcKhcFJJFj70c2vR 6XzpBaV/eAr15JEqM1+2MxyQRj9MuRQybSn+CEMg4+kC7URW4m7Q4snkIeHhcgWFQTHq 9ajQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BglwtNw4; 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=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lm8-20020a170903298800b0019611a98665si4198205plb.112.2023.03.14.23.45.41; Tue, 14 Mar 2023 23:45:56 -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=@linaro.org header.s=google header.b=BglwtNw4; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231542AbjCOGor (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Wed, 15 Mar 2023 02:44:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231523AbjCOGoa (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 15 Mar 2023 02:44:30 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 749C734F4E for <linux-kernel@vger.kernel.org>; Tue, 14 Mar 2023 23:43:56 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id gp15-20020a17090adf0f00b0023d1bbd9f9eso866042pjb.0 for <linux-kernel@vger.kernel.org>; Tue, 14 Mar 2023 23:43:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678862636; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gtO470wsQrdefT/eZbqt8rDglQCA1uZJNkLG9oF8ql8=; b=BglwtNw4Zw6GRh3NfHk6LEm2Oj4z0BeFL1WzXqTChOCWXXCvoVhqsILwu5lTCJaVZy 93EsJxt7kBmAuDAwQ7YV2Yz+JIA04ptQGXp6hGztSQBDZxpQEqigCtyrelB2F2VAZ3Ym D2HJzz8bGeUKno2mdhEU4ik5q8qvsN7utfXw5621DCemgdRgxyfjLv82CVsmxvaGStlZ 2HlwoAGv/I9vMqeNsZEYpAbHSlwASAFT/cYjT5HvZgMOr31XtkyIoY1VRynL43L8syfT vWIdqjYCLYlcPFlGopijzR3YkC7gnrNWqCWbNty94EIcE+Uc0vlIeSwWBtR5QJWaS9aF VIdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678862636; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gtO470wsQrdefT/eZbqt8rDglQCA1uZJNkLG9oF8ql8=; b=DfXoZDTneWblx4q+dJU7h1qmRPGgzon8HIs5I6Divs2R8F89+94zWHE6VBhDbwCynV uzmgnHN+KKlOCF7r8NVCXynBCCt5I6bqOoL7ALVjmgkjCQ5EbYNHy69yCJzUea3ua2AU 4woDWqnqmtl9gKBImcwtLnWPoeb9LdShghsvGlrbKKvFiDm75Yn3bOFq0He+rRST60xk jLfPtPiztQy5uG03qqUJ1sHTsMszEur6O1rlGQmFrQ0BPQLKoOnLuquaUV/ZqSbtKwds MinspRTNsXZ+7deMf/eptgNY94sa1DRa0wzdxgHPqVCDR+NXXUz7NYhieTBjd4hhoL3l ZOmw== X-Gm-Message-State: AO0yUKVg+UVTql5aTX6uHUEl3JC/4K6sjHSwlutJYCoGPtC+WztBpJiF SZzRPosIrPT//G6OWhV48+p/ X-Received: by 2002:a17:90b:1e06:b0:237:4170:f63 with SMTP id pg6-20020a17090b1e0600b0023741700f63mr42945455pjb.18.1678862636155; Tue, 14 Mar 2023 23:43:56 -0700 (PDT) Received: from localhost.localdomain ([117.217.182.35]) by smtp.gmail.com with ESMTPSA id u4-20020a17090a6a8400b002367325203fsm550747pjj.50.2023.03.14.23.43.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 23:43:55 -0700 (PDT) From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> To: andersson@kernel.org, lpieralisi@kernel.org, kw@linux.com, krzysztof.kozlowski+dt@linaro.org, robh@kernel.org Cc: konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, quic_srichara@quicinc.com, Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Subject: [PATCH v4 12/18] PCI: qcom: Use macros for defining total no. of clocks & supplies Date: Wed, 15 Mar 2023 12:12:49 +0530 Message-Id: <20230315064255.15591-13-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230315064255.15591-1-manivannan.sadhasivam@linaro.org> References: <20230315064255.15591-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760415194214521350?= X-GMAIL-MSGID: =?utf-8?q?1760415194214521350?= |
Series |
Qcom PCIe cleanups and improvements
|
|
Commit Message
Manivannan Sadhasivam
March 15, 2023, 6:42 a.m. UTC
To keep uniformity, let's use macros to define the total number of clocks
and supplies in qcom_pcie_resources_{2_7_0/2_9_0} structs.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
drivers/pci/controller/dwc/pcie-qcom.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c index ed43e03b972f..e1180c84f0fa 100644 --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c @@ -185,16 +185,18 @@ struct qcom_pcie_resources_2_4_0 { int num_resets; }; -/* 6 clocks typically, 7 for sm8250 */ +#define QCOM_PCIE_2_7_0_MAX_CLOCKS 12 +#define QCOM_PCIE_2_7_0_MAX_SUPPLIES 2 struct qcom_pcie_resources_2_7_0 { - struct clk_bulk_data clks[12]; + struct clk_bulk_data clks[QCOM_PCIE_2_7_0_MAX_CLOCKS]; int num_clks; - struct regulator_bulk_data supplies[2]; + struct regulator_bulk_data supplies[QCOM_PCIE_2_7_0_MAX_SUPPLIES]; struct reset_control *pci_reset; }; +#define QCOM_PCIE_2_9_0_MAX_CLOCKS 5 struct qcom_pcie_resources_2_9_0 { - struct clk_bulk_data clks[5]; + struct clk_bulk_data clks[QCOM_PCIE_2_9_0_MAX_CLOCKS]; struct reset_control *rst; };