Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp436071lqb; Wed, 17 Apr 2024 00:05:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV/o1TQIGk7GJkNFhn9T2ZV19zh6rY4fQyt0u3NMDo48hBSeAzaRObmBJ7Vx/it8QVYKf1+bB/JCAYYcD+2/gWVQml6Fcn3n/Q6PmEP0w== X-Google-Smtp-Source: AGHT+IH+8YO4/hqsChs4+YQHCpk6qzfDOOj+NBvbL1Az9TRwTHg5pn7Fl+yXVjapsLQu5R0ZkpRi X-Received: by 2002:a17:903:2405:b0:1e5:5041:b18a with SMTP id e5-20020a170903240500b001e55041b18amr20499759plo.40.1713337548216; Wed, 17 Apr 2024 00:05:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713337548; cv=pass; d=google.com; s=arc-20160816; b=0Y9EDLWsaTxZfgAJc09z4cvTYZZFEiwDuF21RfH2HLJ0t7BiATIDxLQR3BbMS7yyWS /6PUwoVeM8jx0Z9pDO7oCwYBjcpMe4yiCfCJOV1I9wZwsEyKIMYO9EJ5d5z3Crhw5L5K //S+81mdSm1tE/azGw8IihDMJSDl9B2ZONsBUraTPzFu+ZgiYq5AKZjWJ4QZbv5A9XH6 /AUSqIht+MFIno0CtAVVX5GeEGPC5kH5M9rWzed/VM2tHXRcWYkvA5bswrkkGOOoxuAo 7ggs2PUjIIl0OMbzgWVogKS0ia3ecgCyFs7jcwkFL/BFfo26i4FrxvJr71bgW41e7zQ9 68sA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=nT6tFhvCySxWh9JfwI+ew2P3H0H+myzNUarVTSp+pTw=; fh=MaRTjw6TuNSzpO/bvHqFi87N3ysfoKnDovz7hrH9nhE=; b=oAwt+vmyFcHKbn6X0kZBqsc5hqjWpf20WO7T3EgN8SautLfpNCvy6H2WlXz0KTxgdO lMc2DyTnghAyP8C3xfhS2vtAIzqGeRYz5n3Bl1JlxqCmzLpDE4rU17VsRr5eA0lthNfM xR+GIAFKvdi6Ifge5Ap1Pf2YaHir3gyOr18LI2J4LAHXiVE6NQYYTJlHO+fR99x+hqkQ 07jCnWHwXuoRRp9FYPPi+sLleVMnw7BtaHBpdwfza25sgBPz+pTVSxSsg+HK5VzhO5GI W8L7fGcTbe3SW4dzQgWRL7rMtTKIRFvdfo3+uBT65lK+bNWdq4oKh+VHcI2MYj2MLkJe L1Ig==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GHPwHfOD; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-148025-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148025-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u2-20020a17090282c200b001e2a5dbf0cbsi10809541plz.334.2024.04.17.00.05.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 00:05:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-148025-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GHPwHfOD; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-148025-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148025-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 37C482820BD for ; Wed, 17 Apr 2024 07:05:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4F35E6A357; Wed, 17 Apr 2024 07:05:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="GHPwHfOD" Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 83E406A329 for ; Wed, 17 Apr 2024 07:05:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713337534; cv=none; b=LaN6+MJsQRSaGndfB1e5FpquNRBoOgafKGSGyDY7M74s3cMNdHRVtPFJk1QNySTxAwu/8phWioBTMmrCPlqAfC/5DKilZtH0NjzAQM3xYoJIuq81J0GehXPrqyKPiujgmI2CQrnaDWSMCnnD8ENuAWJL87LtKbYbY4489VrppKw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713337534; c=relaxed/simple; bh=bPEa0MkxN7S2larn21dK+8bkmH9iV2RJi0htA1d/rBU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uuhDQ8Yfbq5yJWXlPya1kCw8RpI8kyrB1zEY2m1sAqjNpSKEjae7V0+GP+jgQvwm+ROSgGDYz5cFrPv1omOHI29huQ9qhqFG1a8OihAtq6PAqlQ0XQVU1jdeiThAJ7nxSzcL8pijRnixcnUW2lprRvh263+iMwayalRem2LCbWE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=GHPwHfOD; arc=none smtp.client-ip=209.85.216.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-2aa67da7a1dso1737905a91.3 for ; Wed, 17 Apr 2024 00:05:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713337531; x=1713942331; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=nT6tFhvCySxWh9JfwI+ew2P3H0H+myzNUarVTSp+pTw=; b=GHPwHfODLy+t5EHgMZzCnTCW66IoAfDPVnLeKv4Sx5HELRxYyrh7DcV9f5xpcUGI1c TOLV47kOzcPzbAC8VflvLs9KsjVlfEm8nkitQCsHexYbyMz+YcHySrP1u+soRHL7Ql8O juhqN3KlOcBs7Q/4uI/NEsdE/3oekQ0eYQgxEtQpjmM2oQb8+wMJpHH0jwdEaXFhmc/k M8vzsZHFj6FwD6V6yPjo9EjgejN8t0CzYrnt5yFwQe5O2baHcQbIrc9vyGMSzyJ6TgzQ v9yw5JyuUP17Plofd1NiGs85WkAnnJMhjrmkB4aMAuWRfmijnTafyQgemQxmTWWRuswz /JWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713337531; x=1713942331; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nT6tFhvCySxWh9JfwI+ew2P3H0H+myzNUarVTSp+pTw=; b=d3xgqoUWnSe0Z91KU3tKErIpPVsWm7ynzGxeGqMBacynCHFa6AOLpg4yYrou/+rfO4 uuWMCsHVE40ko0Qdy6JhyJTLGMERq22bb4A/wdAirDY64A0+No3rMJP5hTe1fROmdNfN nT6NXCZnzy9LIVv4Q5CXW9OETJVDu3qsiwfNmaeGWxzVQ5ZNbrzvx8O21z1i6Vg5jG4C 4q7cO5kFLJ9t+IOe216QwHlGSXnqKPJCEMUAEYs1Auagcv8mmzD5oYfo/r1yBGCDM9KB o52n9IM2bw9tm1DssDxJ3jX/RyT2/AAWO7WaFH96EjjToAjhv59F2G/p2qdgzdttAkrD SX/Q== X-Forwarded-Encrypted: i=1; AJvYcCUjlvGkgXjTOU90m0ibKzEL+3nCeKGas+Rb9LgCufV6JDOXzi+Dc2LzY0/y3ps3IGX9o7+NE4AsWUSf1RZLMoMa1knQ+CtqHYWXxYZV X-Gm-Message-State: AOJu0YzRVjFuNs8jRJ7jl4cXKnsBO+pyQ1l6VetUvKQjhrNrKdDhB4dp u5AorqGQW4iJUb0QwIlKtolK+ZYNT0dr2pbptQscgGskL6zJGuAejvewLHwwNQ== X-Received: by 2002:a17:90b:1b4b:b0:2a2:73e9:c3bf with SMTP id nv11-20020a17090b1b4b00b002a273e9c3bfmr14427402pjb.20.1713337530516; Wed, 17 Apr 2024 00:05:30 -0700 (PDT) Received: from thinkpad ([120.60.54.9]) by smtp.gmail.com with ESMTPSA id in17-20020a17090b439100b002a20c0dcebbsm699083pjb.31.2024.04.17.00.05.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 00:05:30 -0700 (PDT) Date: Wed, 17 Apr 2024 12:35:17 +0530 From: Manivannan Sadhasivam To: Konrad Dybcio Cc: Alexandru Gagniuc , Bjorn Andersson , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 4/7] PCI: qcom: Add support for IPQ9574 Message-ID: <20240417070517.GA3894@thinkpad> References: <20240409190833.3485824-1-mr.nuke.me@gmail.com> <20240409190833.3485824-5-mr.nuke.me@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Wed, Apr 10, 2024 at 01:50:26PM +0200, Konrad Dybcio wrote: > > > On 4/9/24 21:08, Alexandru Gagniuc wrote: > > Add support for the PCIe on IPQ9574. The main difference from ipq6018 > > is that the "iface" clock is not necessarry. Add a special case in > > qcom_pcie_get_resources_2_9_0() to handle this. > > > > Signed-off-by: Alexandru Gagniuc > > Cc: Krzysztof Kozlowski > > --- > > drivers/pci/controller/dwc/pcie-qcom.c | 13 +++++++++---- > > 1 file changed, 9 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c > > index 14772edcf0d3..10560d6d6336 100644 > > --- a/drivers/pci/controller/dwc/pcie-qcom.c > > +++ b/drivers/pci/controller/dwc/pcie-qcom.c > > @@ -1101,15 +1101,19 @@ static int qcom_pcie_get_resources_2_9_0(struct qcom_pcie *pcie) > > struct qcom_pcie_resources_2_9_0 *res = &pcie->res.v2_9_0; > > struct dw_pcie *pci = pcie->pci; > > struct device *dev = pci->dev; > > - int ret; > > + int ret, num_clks = ARRAY_SIZE(res->clks) - 1; > > - res->clks[0].id = "iface"; > > + res->clks[0].id = "rchng"; > > res->clks[1].id = "axi_m"; > > res->clks[2].id = "axi_s"; > > res->clks[3].id = "axi_bridge"; > > - res->clks[4].id = "rchng"; > > - ret = devm_clk_bulk_get(dev, ARRAY_SIZE(res->clks), res->clks); > > + if (!of_device_is_compatible(dev->of_node, "qcom,pcie-ipq9574")) { > > + res->clks[4].id = "iface"; > > + num_clks++; > > Or use devm_clk_bulk_get_optional and rely on the bindings to sanity-check. > > Mani, thoughts? > I'd prefer to use devm_clk_bulk_get_all() and just rely on DT schema to do the validation. There was a patch hanging in my branch for some time and I sent it now: https://lore.kernel.org/linux-pci/20240417-pci-qcom-clk-bulk-v1-1-52ca19b3d6b2@linaro.org/ - Mani -- மணிவண்ணன் சதாசிவம்