Received: by 2002:ab2:687:0:b0:1f4:6588:b3a7 with SMTP id s7csp85lqe; Tue, 9 Apr 2024 12:10:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVjx+XU184cILuDRyZPE+NbNHNQqfmWWwyFNBMRT54Tn4svph3LkzR6XqV0x1f4GnUGvDMI/aVpDjXhkHRy90Zkn/ror3R5oUNEgeFsjw== X-Google-Smtp-Source: AGHT+IGMdi0mh5BgRH7/5sGNgJxbjg1bxaTIv/VTo9hj9AYx8VqL5eVLO0k6/wtGvv0tMrM6q+tv X-Received: by 2002:a05:6a20:12c4:b0:1a3:bd9a:a1a with SMTP id v4-20020a056a2012c400b001a3bd9a0a1amr905281pzg.5.1712689801643; Tue, 09 Apr 2024 12:10:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712689801; cv=pass; d=google.com; s=arc-20160816; b=QA5x8ZuRHDz/7EV8lWHITMrSeP1nk4Xko/SummRXQvXbSWXPFqoTrA727OL5yr6yu8 PS8WNwhe3ulyVmDyEX2+QOOnfHEiGljd0EwiVVaPH484Vwc4Mskhfa5U6i9fe3td/URH jWBvfXNY6P+9ayFMscwpCCEzraMsQj1S06adsl9MWkhPDiUpL9wFT+8c4m9HO5bqZg5g JG4pFKmGASbkVNfEuzUAcYmKRlmjbFBD/0FvgbRxDleqtlO2PYpnLm733G9tc06BX4Li 4ZEqUK1c6On+tsJjVWblx+EqSTT3/CAQ+C1uuew9EgztKEyGooJk56rXu8V2jyKeAlir zeDA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=r7AD4q8JSZ6BP9Ctt3D7xQmOd/l0E0VUTJ6hrw2gcfc=; fh=Xjfl48SjPe81/Po2TmtwM93SEVjhsPqIcdtVTGALGxk=; b=Et5mrR+BBlc0/lxx7yBv9X+hKiz+TrU3f+uYAhaDbGHR/jEg8srw2Xsppc2N1Jhocq p3/CUPF9pYwz+NaJQx9oAXGyLqMa03wXEo1OGthwMcM/R5GvXr7yNVvabLu0BM+0t/R7 pbqr0MyalLVFp+TfRD+r8FSJcEvhyLGvCjx1LVvA8ZvIEWoqln2ccnKd5zA/HVi5IzwY 4YYfyt8jHW47GP7xXKXIUwqHBbx04PZH531gP6HCpiEltq9iUqoJzh1V0pvOypFxrzIP D54OGnPH0SAeKoSIyOELvFcx+n9uvoln5qyZDIoRZDz62c+pTo8h94AzgLQXyCO/E6Sr A1Tw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="EJm/ZN6l"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-137502-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137502-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id b18-20020aa78ed2000000b006e6b30a7ec6si8838669pfr.231.2024.04.09.12.10.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 12:10:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-137502-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=@gmail.com header.s=20230601 header.b="EJm/ZN6l"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-137502-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137502-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 AC428284D6C for ; Tue, 9 Apr 2024 19:09:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 16404157E77; Tue, 9 Apr 2024 19:08:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EJm/ZN6l" Received: from mail-oo1-f45.google.com (mail-oo1-f45.google.com [209.85.161.45]) (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 A7D99157A5F; Tue, 9 Apr 2024 19:08:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712689727; cv=none; b=uVGUegO8lIz+lgZEMOEANbAHxXFahwnLpL9MJKgK9N25hI+KCd3URb/86Q71VH84/PPPLELxmhsv/mmCqiupelZR1RgIt//0ye7why//jsOu/zmMu22nTwLNKbMW3BDeg4z39OFLVun+z+wLL1fRk73wgrsMYnpWB8H/iG6rfTA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712689727; c=relaxed/simple; bh=TF34Kiq3IULPX0vZLKg5UujAr20o/F0a7repIuGYPOs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BYcVFtCcUMUxTRJFAKjWls6GrSIAxcLpQc2/BKIwpEbvDKvQeJTErKUs+Ot7hlrLCPDRYluLL0j4a3pgN+dOyRkBytKoEPz+tF1j9gn/hdFZ2vNfqyIN3f8UKh1MpFYRkMHbH09+8+qogJGFe8ebC/vLeVJ4qZHQDS740w6zo2g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=EJm/ZN6l; arc=none smtp.client-ip=209.85.161.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oo1-f45.google.com with SMTP id 006d021491bc7-5aa1fe2ad39so2064493eaf.2; Tue, 09 Apr 2024 12:08:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712689724; x=1713294524; darn=vger.kernel.org; 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=r7AD4q8JSZ6BP9Ctt3D7xQmOd/l0E0VUTJ6hrw2gcfc=; b=EJm/ZN6laHXIj+J/WMRVMVpNLfTkz3xwAK2eEEAvDRLQ+iPu7cxHoTCeN23LqsN4FW cVEcbBmIYypA4Rr3aLxg8s8Bna0peMWOYQQFlAZZ4aCTZlXW0PVZAHWn+SO++GuvV5m1 xDUOw5YGRkRn0EezdWO1SXjvlmqq4uzNRe+9ivcSIV/2y6Ro6S6vXQcGGpoYKCVvneQZ oZ5q7N4Li66zeRjhx4JOYj04JHKe/WKLCF1WJvCokpNf52Eucxpm7v2c/d8rUJsHLHX4 XeM0misdgJPQuG9ssah8GiwyhpDOQC7nGlSd1l9RDWa7QydVZJeyRwrt2KFwQKQeA+bC WQ/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712689724; x=1713294524; 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=r7AD4q8JSZ6BP9Ctt3D7xQmOd/l0E0VUTJ6hrw2gcfc=; b=CqoCmcqxL8btxYH6vf3KIvU7ZdNvVHVkfLlmQNkU0X7D9xjmKZUILl/z/jOhkYdcpj hRzmvrToW1GpxRgAW9LrNYXDfGz5fmQt6kzm1pBDITth4Ji6uMe+FJuOZjsXBF8pRNCc X40+q4GrLPZTPdJZ5yX/n0pN+lBK+A97dm6Y93lJAgIZ5UPI2KhnRiMdGBIl3mf6FURV f1tupBOrVMOFNhU9VrpYBeUU2lA23K6g17x1DSRUrFIaUOoxGJUf8/ugleAsHZxqd1L2 lJ43kRTycQ0xHhvDkT3Iftp1ONvIawTbAJNJuKXGVax3yp+Q9t0udPAJMxIAyMHBrMP9 Febw== X-Forwarded-Encrypted: i=1; AJvYcCVzcYwsBegeGvhI11aZHsNV0nek5XAsMELiDpgUj64KVQVkC/gvc9/ASAu1YT+7zOdq3JIdnsGEVf6AVjVLP79Mo8/utjxD76xKKyXBSGCVblMnffR/cpSOIqk1GjXkqiyFEgvMs5EOQ98De+Vx01FjJVvM8GlBSW/znJ+9uvtPAeQLmVjZKg== X-Gm-Message-State: AOJu0YzwZdQjnUDDgznDZx8PT3dAEC76U+xWCz+GwsHBImDd8xWBc80H NitZ19sBb3gSN5lNqribHlIQhMEiKT0Qtb3QGarEUQ7vJD4V+YLf X-Received: by 2002:a05:6820:2d49:b0:5aa:53ea:ffd0 with SMTP id dz9-20020a0568202d4900b005aa53eaffd0mr897099oob.1.1712689724695; Tue, 09 Apr 2024 12:08:44 -0700 (PDT) Received: from nukework.lan (c-98-197-58-203.hsd1.tx.comcast.net. [98.197.58.203]) by smtp.gmail.com with ESMTPSA id f11-20020a9d7b4b000000b006ea1cf91a8dsm674920oto.40.2024.04.09.12.08.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 12:08:44 -0700 (PDT) From: Alexandru Gagniuc To: Manivannan Sadhasivam , Bjorn Andersson , Konrad Dybcio , Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas Cc: Alexandru Gagniuc , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 4/7] PCI: qcom: Add support for IPQ9574 Date: Tue, 9 Apr 2024 14:08:30 -0500 Message-Id: <20240409190833.3485824-5-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240409190833.3485824-1-mr.nuke.me@gmail.com> References: <20240409190833.3485824-1-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-Transfer-Encoding: 8bit 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++; + } + + ret = devm_clk_bulk_get(dev, num_clks, res->clks); if (ret < 0) return ret; @@ -1664,6 +1668,7 @@ static const struct of_device_id qcom_pcie_match[] = { { .compatible = "qcom,pcie-ipq8064-v2", .data = &cfg_2_1_0 }, { .compatible = "qcom,pcie-ipq8074", .data = &cfg_2_3_3 }, { .compatible = "qcom,pcie-ipq8074-gen3", .data = &cfg_2_9_0 }, + { .compatible = "qcom,pcie-ipq9574", .data = &cfg_2_9_0 }, { .compatible = "qcom,pcie-msm8996", .data = &cfg_2_3_2 }, { .compatible = "qcom,pcie-qcs404", .data = &cfg_2_4_0 }, { .compatible = "qcom,pcie-sa8540p", .data = &cfg_sc8280xp }, -- 2.40.1