From patchwork Mon Jul 13 11:01:32 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: 235379 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2726341ilg; Mon, 13 Jul 2020 04:02:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHxIYkJhvHDUbEQ+OZBhm43aTF3ACPPk/xxS+9xmyFHgfT6SruL3NWp/e+DU28toej2y+g X-Received: by 2002:a17:906:dce:: with SMTP id p14mr71165903eji.442.1594638142392; Mon, 13 Jul 2020 04:02:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594638142; cv=none; d=google.com; s=arc-20160816; b=b+7dAoGuR5N9o6stSmR20mlC1MIIlbuHQKWUAz6KCfCXTqq/pf/ltpmbgngMWCRCHj v+MWg/SKJdlXt2a09dnHMk26zcjbLc9zCdopqdPS+P9fK6tQOUvZH+uyUW0SRSGzfDIu Gf0MaMJBbHxpnjPaBM5PoJbJaxH9T18ojurKz2kqBEJuNNVxPj9nTYhG449Jjbf3LzKh ocBNpjbC+Qk7fkkPCpcq+s2snGgumQSbv0X+tm2y4w6MH7XnZXodq6z4vKBRmgs0RURd 9R5Mf9PQOaS9SVHhjyuPQ+B70jv9skW93QbeRlXrVT9qM9js/hpIbs+pxrdsjEdpy78E V9+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=CWIKltqarvAYPvUpTOXv+9gnETqUvut1kE2gYgu5r3Y=; b=vtzC+XTRE1j8jwPYk39Nabv4YI+LZ+l7Xzuvgxzt9tLdaUX7MVWImCuKTLwHRKC4Dk ojHW95DM/cm7pv1OGMonwpgVEuv19cLMHcxNh8MNYjiwIN1jRnEzKCQK5gmXzFanA+Hs B8MfNnpPBPmnCo8NGFYdaGUJ3FU5neMmFkuKg+V/0AQsSxKmmAtiE3vKm8x0NOg59sW+ fcSixcNlXMyBoB58KakWOMIP9/Ix7MMjYeoLX5bpFjGy4jHTIOOX1LBdSTG+SUAQ3W2Y 7HMspa6hQT9bukrb6ThY62a8/ny7qreqLxLOh3ML6NqdFWJAl1vIhbm6H8pYDdE6gLzF mf3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=pfIRhWwi; 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 du12si11330949ejc.441.2020.07.13.04.02.22; Mon, 13 Jul 2020 04:02:22 -0700 (PDT) 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=pfIRhWwi; 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 S1729670AbgGMLCT (ORCPT + 6 others); Mon, 13 Jul 2020 07:02:19 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:38236 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729662AbgGMLCR (ORCPT ); Mon, 13 Jul 2020 07:02:17 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 06DB25KP055955; Mon, 13 Jul 2020 06:02:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1594638125; bh=CWIKltqarvAYPvUpTOXv+9gnETqUvut1kE2gYgu5r3Y=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=pfIRhWwipv6SGa/UAOioj3jvsBWZ4YVbb2F3qs0aPt5zG6ni81aWyp5fYp4eGXqBx IlE51WgF2Uq0UczwVfVbgrM2C5CAuz5+swFuKL8mnXexL/AgysquGT6dh8uHjGk61B Xuh1jYu/5CZCkQ5hLcsLV0w1XuKCALdEIwSFmUf4= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 06DB25BS009571 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 13 Jul 2020 06:02:05 -0500 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Mon, 13 Jul 2020 06:02:04 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE113.ent.ti.com (10.64.6.34) 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; Mon, 13 Jul 2020 06:02:04 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 06DB1gVf031460; Mon, 13 Jul 2020 06:02:01 -0500 From: Kishon Vijay Abraham I To: Tom Joseph , Bjorn Helgaas , Rob Herring , Kishon Vijay Abraham I , Lorenzo Pieralisi , Arnd Bergmann CC: Greg Kroah-Hartman , , , , , Subject: [PATCH v7 05/14] PCI: cadence: Allow pci_host_bridge to have custom pci_ops Date: Mon, 13 Jul 2020 16:31:32 +0530 Message-ID: <20200713110141.13156-6-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200713110141.13156-1-kishon@ti.com> References: <20200713110141.13156-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Certain platforms like TI's J721E allows only 32-bit configuration space access. In such cases pci_generic_config_read and pci_generic_config_write cannot be used. Add support in Cadence core to let pci_host_bridge have custom pci_ops. Signed-off-by: Kishon Vijay Abraham I --- drivers/pci/controller/cadence/pcie-cadence-host.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/pci/controller/cadence/pcie-cadence-host.c b/drivers/pci/controller/cadence/pcie-cadence-host.c index de02fadc4809..a8303258874c 100644 --- a/drivers/pci/controller/cadence/pcie-cadence-host.c +++ b/drivers/pci/controller/cadence/pcie-cadence-host.c @@ -505,7 +505,8 @@ int cdns_pcie_host_setup(struct cdns_pcie_rc *rc) list_splice_init(&resources, &bridge->windows); bridge->dev.parent = dev; bridge->busnr = pcie->bus; - bridge->ops = &cdns_pcie_host_ops; + if (!bridge->ops) + bridge->ops = &cdns_pcie_host_ops; bridge->map_irq = of_irq_parse_and_map_pci; bridge->swizzle_irq = pci_common_swizzle;