From patchwork Fri Nov 6 15:11:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 320792 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp1383518ilc; Fri, 6 Nov 2020 07:12:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJzAHzzC5AbzVbhgx5VRm1Qw3Pyd+ltMJsn/S99/f+Njn6GvZif3vy0IA/ximC3Fs+gJDxvw X-Received: by 2002:a17:906:d8b0:: with SMTP id qc16mr2438724ejb.268.1604675541716; Fri, 06 Nov 2020 07:12:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604675541; cv=none; d=google.com; s=arc-20160816; b=A6Qiac0ZC7+F0EGoc3pgpnMJQ2toYnSfAplC+Ro56T5syDPbK+s9w30io2RIm/2tF3 tQ4cNMFxl3NVIFoDkMtKLfb3Jxfub6bvBgcqcNuaSSovtOJyiKnAnT1EHkFtxmHXCKkh 8z4ZpKG3G3i0nvkQSAS18CZA9Ef5AVEJ9Qs3dnSu6W3VfEwNYd4X0E2xxq/U1OE+axJk IP1wLAP64y6/mgsUFFMdL3VSEtAxnjyCdC0JWvROYsBhhrXlQC3WVSVsqEu9i56tj8yu xQjteJtJFsJXQqfXWqjkAJW0h+Vsbaw1tH275U8nZyUZqtATFHbhgXB8/Vn5w7fduECK iD4g== 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=6VM7QPKbo+SakMqPLZgxf3iydTMk/h2RER3AICsA3wM=; b=vk2Y7AhZCw0dcmrCSFCHMhFjuNfE5Pl0PwvyDclnUKwFVmJvEj1ElhpTmuJ7N/+H0V LKPx0+unvoZSx625hJnrgZ6/BfXMSa4e6zlFBRRPeFrPhvAuwCoeUEpzqE6KcgN2jX6r tLswBD2on2qzaM3MksDb7kQCG5IOtLi3sx50mZ806MI7VwWpbUZlm9yPA6XVGVGvngud EOEq1YLUrHfAasMyKu9dBjWtWPQ0uMiRh/Fv7nWHaM3ZCLulPaSgm5ro7GzY2MDwZpqt vO0pwEl6wPxuYcktXds6/sBbUqrh2BlSk1M0gd+57OhA9/fYNWfiGpklV3UaKPJ6EjQm BR5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=tROSBZby; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d7si1075359ejk.598.2020.11.06.07.12.21; Fri, 06 Nov 2020 07:12:21 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=tROSBZby; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727635AbgKFPL0 (ORCPT + 6 others); Fri, 6 Nov 2020 10:11:26 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:53972 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727617AbgKFPLW (ORCPT ); Fri, 6 Nov 2020 10:11:22 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0A6FBE9E021868; Fri, 6 Nov 2020 09:11:14 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1604675474; bh=6VM7QPKbo+SakMqPLZgxf3iydTMk/h2RER3AICsA3wM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=tROSBZbydxEZgKrEM0r7vEAfnV8fWyP5fBe7AymZL4YoUYPCocZrvcz1/m/duA+KL nUIP/ZIwtwSuqFLlHcv8Dte2Sw2tCxpBAnyCmRUfhEZJtppiWvJD07vHsNaKuaowWi m6Uagjy9J1FIc/B46do6D2sK/c8Vmc7/kH2j9ono= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0A6FBEgB019556 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 6 Nov 2020 09:11:14 -0600 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Fri, 6 Nov 2020 09:11:14 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Fri, 6 Nov 2020 09:11:14 -0600 Received: from a0393678-ssd.dal.design.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 0A6FB7Tg092540; Fri, 6 Nov 2020 09:11:11 -0600 From: Kishon Vijay Abraham I To: Bjorn Helgaas , Tom Joseph , Lorenzo Pieralisi , Rob Herring CC: Kishon Vijay Abraham I , , , Subject: [PATCH 1/2] dt-bindings: PCI: Make "cdns, max-outbound-regions" optional property Date: Fri, 6 Nov 2020 20:41:06 +0530 Message-ID: <20201106151107.3987-2-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201106151107.3987-1-kishon@ti.com> References: <20201106151107.3987-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Make "cdns,max-outbound-regions" optional property with the default being 32. Link: http://lore.kernel.org/r/20201105165331.GA55814@bogus Signed-off-by: Kishon Vijay Abraham I --- Documentation/devicetree/bindings/pci/cdns-pcie-ep.yaml | 3 --- Documentation/devicetree/bindings/pci/ti,j721e-pci-ep.yaml | 2 -- 2 files changed, 5 deletions(-) -- 2.17.1 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/pci/cdns-pcie-ep.yaml b/Documentation/devicetree/bindings/pci/cdns-pcie-ep.yaml index 60b8baf299bb..21e8a8849076 100644 --- a/Documentation/devicetree/bindings/pci/cdns-pcie-ep.yaml +++ b/Documentation/devicetree/bindings/pci/cdns-pcie-ep.yaml @@ -20,7 +20,4 @@ properties: maximum: 32 default: 32 -required: - - cdns,max-outbound-regions - additionalProperties: true diff --git a/Documentation/devicetree/bindings/pci/ti,j721e-pci-ep.yaml b/Documentation/devicetree/bindings/pci/ti,j721e-pci-ep.yaml index 3ae3e1a2d4b0..aae07b723fb5 100644 --- a/Documentation/devicetree/bindings/pci/ti,j721e-pci-ep.yaml +++ b/Documentation/devicetree/bindings/pci/ti,j721e-pci-ep.yaml @@ -57,7 +57,6 @@ required: - power-domains - clocks - clock-names - - cdns,max-outbound-regions - dma-coherent - max-functions - phys @@ -86,7 +85,6 @@ examples: power-domains = <&k3_pds 239 TI_SCI_PD_EXCLUSIVE>; clocks = <&k3_clks 239 1>; clock-names = "fck"; - cdns,max-outbound-regions = <16>; max-functions = /bits/ 8 <6>; dma-coherent; phys = <&serdes0_pcie_link>; From patchwork Fri Nov 6 15:11:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 320793 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp1383666ilc; Fri, 6 Nov 2020 07:12:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwq/RV9GtTclWUi+YLzolkfK5Mq6GcT8Fg2300O4Ll0Kn0Ti/S2sYzqgjmnw09qszD4XGnz X-Received: by 2002:a50:fd19:: with SMTP id i25mr2382356eds.360.1604675551196; Fri, 06 Nov 2020 07:12:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604675551; cv=none; d=google.com; s=arc-20160816; b=BxbdpSY5gJUGK1CyPjQvpPlSKyN/fCgiGTUQxegBkWxFLSSoxpbwuNQfRxibTVp4u5 7mQcVpeA47xPQRW6ELthXlAqvRfBWjVukkgaGd8RgQc1VB6Vq9/NvQWFGnk+dlVcSMWh yiWfSvyxOwHiTveWF7oxKTotRuI4m9CMjAG/dxmWsFSqhKmGp2gi6b1IIMrQt7GaJ0M0 iig7AtcvsK7bij+3R3DFaOXpiVPfB9wBwqh3As9N0DXNeQkr2pOviwW9E/toqfcw346r 2arYwCg/bwhkJbgSsIB6wabzuskSqwQWnmj4T2rH4avaUzOlzm3Jr4OTrtpFnBh/ndD2 mZHQ== 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=+w+BvgepGqWvkDQjkbFxCvpUQOSLcIumtRNyUhWS6aA=; b=EIuvjvG2nFTofce2ioTfigND0TC77nyb1BMmhRmlfH8HyvkjEntl9z0zXc36BPGQQM MJGYMZ0ONvYLl82pHdfeIp/n1SlQAIhl/L1pSzPi+n7K27HiqTbdIO3Hj9iIEBJqOna3 r3mPkQeQrer32dksYrFQQyhGzKfBbqAD+vjyJudrZWAGsFsa5i9a6yBzV22dOUYck/FK 3eSga5s92kdB1dw/rlQiiWHFJyETzEa3PxS0UC7M21rwBIjNbl1bmhb6aF92BDhRqWxj iTmJXiPDjh31X3chamjDO7qptBm9aGtNGVddRKPtxKQn5GGnDU2lbngEFPcC9ZDFw1ks TMeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=C2O5x+JM; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u15si1196881edx.51.2020.11.06.07.12.31; Fri, 06 Nov 2020 07:12:31 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=C2O5x+JM; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727558AbgKFPMT (ORCPT + 6 others); Fri, 6 Nov 2020 10:12:19 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:46666 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727633AbgKFPLZ (ORCPT ); Fri, 6 Nov 2020 10:11:25 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0A6FBIC4005681; Fri, 6 Nov 2020 09:11:18 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1604675478; bh=+w+BvgepGqWvkDQjkbFxCvpUQOSLcIumtRNyUhWS6aA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=C2O5x+JMLdwDN//H2DjeC9kaO5INQ0EjkaA6ALeDnHwjwjcy52/VJK4YbV42wmrEQ bVbztdaugnqEfBxoWwv1gFDkicQTFjb4Q9yZw6BZseS6LgQvnyA89PN8jzluzYfKEV CijF7w3an3/EsIMXhirMm5AqydwIOL720yKQZHwE= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0A6FBI7W019613 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 6 Nov 2020 09:11:18 -0600 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Fri, 6 Nov 2020 09:11:18 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Fri, 6 Nov 2020 09:11:18 -0600 Received: from a0393678-ssd.dal.design.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 0A6FB7Th092540; Fri, 6 Nov 2020 09:11:14 -0600 From: Kishon Vijay Abraham I To: Bjorn Helgaas , Tom Joseph , Lorenzo Pieralisi , Rob Herring CC: Kishon Vijay Abraham I , , , Subject: [PATCH 2/2] PCI: cadence: Do not error if "cdns, max-outbound-regions" is not found Date: Fri, 6 Nov 2020 20:41:07 +0530 Message-ID: <20201106151107.3987-3-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201106151107.3987-1-kishon@ti.com> References: <20201106151107.3987-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Now that "cdns,max-outbound-regions" is made an optional property, do not error out if "cdns,max-outbound-regions" device tree property is not found. Link: http://lore.kernel.org/r/20201105165331.GA55814@bogus Signed-off-by: Kishon Vijay Abraham I --- drivers/pci/controller/cadence/pcie-cadence-ep.c | 9 +++------ drivers/pci/controller/cadence/pcie-cadence.h | 1 + 2 files changed, 4 insertions(+), 6 deletions(-) -- 2.17.1 Reviewed-by: Rob Herring diff --git a/drivers/pci/controller/cadence/pcie-cadence-ep.c b/drivers/pci/controller/cadence/pcie-cadence-ep.c index 254a3e1eff50..9a4195af958e 100644 --- a/drivers/pci/controller/cadence/pcie-cadence-ep.c +++ b/drivers/pci/controller/cadence/pcie-cadence-ep.c @@ -531,12 +531,9 @@ int cdns_pcie_ep_setup(struct cdns_pcie_ep *ep) } pcie->mem_res = res; - ret = of_property_read_u32(np, "cdns,max-outbound-regions", - &ep->max_regions); - if (ret < 0) { - dev_err(dev, "missing \"cdns,max-outbound-regions\"\n"); - return ret; - } + ep->max_regions = CDNS_PCIE_MAX_OB; + of_property_read_u32(np, "cdns,max-outbound-regions", &ep->max_regions); + ep->ob_addr = devm_kcalloc(dev, ep->max_regions, sizeof(*ep->ob_addr), GFP_KERNEL); diff --git a/drivers/pci/controller/cadence/pcie-cadence.h b/drivers/pci/controller/cadence/pcie-cadence.h index feed1e3038f4..30eba6cafe2c 100644 --- a/drivers/pci/controller/cadence/pcie-cadence.h +++ b/drivers/pci/controller/cadence/pcie-cadence.h @@ -197,6 +197,7 @@ enum cdns_pcie_rp_bar { }; #define CDNS_PCIE_RP_MAX_IB 0x3 +#define CDNS_PCIE_MAX_OB 32 struct cdns_pcie_rp_ib_bar { u64 size;