Received: by 2002:ab2:4a89:0:b0:1f4:a8b6:6e69 with SMTP id w9csp81297lqj; Wed, 10 Apr 2024 04:54:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUVKMqxsnH1TfdjvAemLVaJVv7HQV/VnJUAbK9s7q4hPMwSBLq3oXSguu2CDK7vLgamPiEb1hP3vWLH2hcMaUXpbhwZpy+Tqm9rU8fYUA== X-Google-Smtp-Source: AGHT+IEiuSIXobwZ96YXXQCa/zYJQGjf3YYekglV4XIEEwc5OmK3BUGKsD8nnDLeCKmP7CAP1WrE X-Received: by 2002:a05:6358:90c2:b0:186:29ce:397d with SMTP id e2-20020a05635890c200b0018629ce397dmr2657483rwe.20.1712750079577; Wed, 10 Apr 2024 04:54:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712750079; cv=pass; d=google.com; s=arc-20160816; b=cSzzcNY2BIivB9wrGyNbuDRqiFSOU2bch4Cujiq170pRFoQ/7dNOjI4GTHq/xK2u8Q cwAxOmvXPW4cbnG9HtsZFJYS4MFCtpSp1tBdlhZZOH//xBPg7XPePmOEfFL7sBE2bT/d 3+anHsoO5XLEegGoCnZm+o5ICBXyfdBa16qxGHPI0EykHBJTlG6yx4KbG5tDMQB0ECdg VmD6IkDLC4BPx3sDjsULJskHembkNKG71us8eiFnZV5UwYbRe8qD5CednFucQp8mDDeS wxGBiCHhaphSmtaEw1b4C/b4bfAjoMJ0okc1gecRAPp0hVqcOTLfw1BJyXnaCs8AJMo4 vJ4g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=/AHVovJjaRrYuJwPpCH1ehDBd4Vwot0WGnmrkIqnd/o=; fh=79oq0SkNeqQPpAXz9rWxndM3kz6A8QYFZT101P9U3cI=; b=x3t5GRzUMH9puLlkEMBEJvahCtBjOe9zqs27n8XILILZnghl4csYH77i/cB3lteiQB Fz/q+whaTzdpKab2Q6B2oS4NJfwhFc6Tm1DQ3Xx14d1wpdYd4fNGEKWh0XgOQZGQXbvQ OVA9h6KgNGL5xyjA4RbkPWR2l3xn/oh8ZQGKT2Aiz9nv7u8l+pAUn9yfEKvXBtlqCXrf vLgUwtEbapKLy/QLsSZ7A9pc9v+Kpy3ICtKSA3WwCOJCY8SY1IvIISzxp9FjfcKsdii4 Qm8uYq46RVthtVGWy1GwwKQw/NA4+VrH4xLrCAat6sBzwOhMAarXRboWO38XZpFJJ2G+ F9jQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lGi2OweF; 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-138449-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138449-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id m128-20020a633f86000000b005dc85a7bfe6si10694770pga.109.2024.04.10.04.54.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 04:54:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-138449-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lGi2OweF; 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-138449-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138449-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 8AB60286150 for ; Wed, 10 Apr 2024 11:53:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0AD2415B0F6; Wed, 10 Apr 2024 11:50:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="lGi2OweF" Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) (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 6D03815B0F2 for ; Wed, 10 Apr 2024 11:50:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712749833; cv=none; b=dj9YNot9tQbPoGj60vlycw/qjyK3rvR2OppXShuGUDHT54hfUNw6Ixsfpohe3DF9OeIwKgs6aeUNRQ1h1xtX8/B01LBtJ6miVjWzuChQFGwi2MEzp0BHI1IebuPfFOCNa70queDWRx3xCFJDovG7uUDFz7amzC7KmqFQJ50kkHM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712749833; c=relaxed/simple; bh=Bk/2GDxBgBKZaokHcOMTz49eyI+1QVoNozIXUpW4/VI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=tY715hOK7WodU6WdUZzq8uIF5h7awL5ihqmCP5Yzxby9CuQlaoxKEeLNZ8H4OKMFSZKTamzIHKQbUkN44StHGZLRXoSaNicrFC+J1zWinB7scaai+k1AUJCDwOL5kjd2N88VoaNoq7tjfgVMNfcPac2NQBWsbQmXAcJ4P1miJj8= 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=lGi2OweF; arc=none smtp.client-ip=209.85.208.174 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-lj1-f174.google.com with SMTP id 38308e7fff4ca-2d895e2c6efso36172251fa.0 for ; Wed, 10 Apr 2024 04:50:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712749829; x=1713354629; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=/AHVovJjaRrYuJwPpCH1ehDBd4Vwot0WGnmrkIqnd/o=; b=lGi2OweF2dH7yt9e+SHcm31mGPkw22hWHWqjb0ZP4vd39Xj1A+ESeos95h81KSt+MD MoxiSE7U0Jg7cuabG86qScKHA8Ust52gDji2mM3xeGh8sMYwLXKjQhKzmvF67vm9yAbz Zlv98QRCI2scWtJmU85qxvbRinFs3JuahNy9Q72BOtuwoy5VpRF4XjifD+pfAY2gf2Bz ebWD8bAbli1P0IQtgHKON6q/ZUVDDSOVPkQZ1MncXVGZCkQhLLOJEBab3/vimT+OTwgc jGF3O7uuLsrgBA15HBOWAGik8yCedfIsinmFyFTtSz7qvCmRo5frHRY40xZfNwIQmceC RROw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712749829; x=1713354629; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/AHVovJjaRrYuJwPpCH1ehDBd4Vwot0WGnmrkIqnd/o=; b=U82XJfwHkVb5lEtlMOnYP954uvEAkJGmXNZg5TAzXUYhRJDtYzFE4hkzfMrpkJteAP T/cseqzFrgpAEViri9YNikN54LEBuuT0k0mSvItYC3AzbgtEBNK9VwskkgTO/Ag4aUzd 0bVLcswyz7Bj5Yunu3wvlkAGS8ULyEEO3EyUcppUhctukFPsZ4ZhZELONQVMhBfGhl+Z pYP01JR0WxwiAZxa0bdSOorAa/mS2K2PHq6gCALLfsW1Vlxc1QPHuNT0OXW/zWkLDj4x C1wNS7q9MJEVZ2NRJ334QfjwIyhx7SbF9WVYnkii8173V5wHLIkp7MFN9m8D+KLx4hmo w+UQ== X-Forwarded-Encrypted: i=1; AJvYcCXIX976ZXr5ZbSIyqYN3NobAOu6iVIeMzrufuwinN2mH1f9UzxpVzgt3l+cvneQyEt50JpIkqK58FM6z3GZHd30g2oT15TLCbLojmnh X-Gm-Message-State: AOJu0YxOh0EKmhrq91Os178lRD2zgu4UDPK3vgulbY+NItyrGR50BmXR 1tPIJt6CFIt3QrNH68cZSB8j6kKx61hKwLuto/kt0x6R4gbHmO/2dD6bHTAaw46A2O98pbXZ5Wo syW0= X-Received: by 2002:a2e:904e:0:b0:2d8:4af7:1235 with SMTP id n14-20020a2e904e000000b002d84af71235mr1342410ljg.44.1712749829600; Wed, 10 Apr 2024 04:50:29 -0700 (PDT) Received: from [172.30.204.89] (UNUSED.212-182-62-129.lubman.net.pl. [212.182.62.129]) by smtp.gmail.com with ESMTPSA id u34-20020a05651c142200b002d86678e0b0sm1741662lje.109.2024.04.10.04.50.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 10 Apr 2024 04:50:29 -0700 (PDT) Message-ID: Date: Wed, 10 Apr 2024 13:50:26 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 4/7] PCI: qcom: Add support for IPQ9574 To: Alexandru Gagniuc , Manivannan Sadhasivam , Bjorn Andersson , Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas Cc: Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Manivannan Sadhasivam References: <20240409190833.3485824-1-mr.nuke.me@gmail.com> <20240409190833.3485824-5-mr.nuke.me@gmail.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20240409190833.3485824-5-mr.nuke.me@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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? Konrad