From patchwork Wed Jul 8 09:30:09 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: 235053 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp265098ilg; Wed, 8 Jul 2020 02:31:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxg8E1bHrhcLGnm0YQrsNIz/90Xz3KQygGBtGyxKtrHDnSuMKfLjL1S9Ornnkr6Esglv4M6 X-Received: by 2002:a17:906:9147:: with SMTP id y7mr47435242ejw.399.1594200662981; Wed, 08 Jul 2020 02:31:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594200662; cv=none; d=google.com; s=arc-20160816; b=ZrSkeWeNEgX2fdn85J7BjXhEu2jfEYhA5QnP7P+HswiElX5wibU6rElBxDvsqCSw2d uXvwUDJMn8GLcEog05eMPmgP5dKTe05tbejwWfjihpihTVRVtJfolDd5KSArAi4ILU1e q0vXFa3eliLhk//sYqIZOeWie1hpyXcZ+wogUKjxdrGO/58tB3Qo2ozhW5oH0FXme6ol DFNQOfYPZ4Qn2tCCA30NeCU02r99P7yTyDkg4Wu4dIa1vI/7WX6mJiptcQqXa0HzQWhY 38RLOI2wgZaWoJylJgtQI68OlSfKTg9/YA8qn5qA97hAoWRqbEosmFqTpRb+3k6yDCL7 HUhg== 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=i/Jg5CoFOzkki87eSW5+pRvpWrG5L3GdKXp/K/BRrH8pPImIj6eZV5Z/IAZVPrDsEo oJkiv9Li4zk2TJIQYDFIadx2dPlwQfsOv8fKxLl3pSf43fLxGZMLknv5X+09W+HUCq84 Wx5UUzY/Mb7OGopAryPtbs5iEwaaDW6BemS6zWA7gp9hQha3y6UmPUYb7CB8ZMuMW9Ks PzaiRD4LNYUOKUVDQ0vdmJ5yMsqSiDHFIyhjKz7avTvlfnx8hyoSfOiBwOBpqzqz2WmL /LV46NOxlninghi0mjZ4FlHqhnhJv6aQtuU6U1+tE7Vvq5t/ilqxZJ6ECnBxVSTr/+Ho hcYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=cSG8wSO4; spf=pass (google.com: domain of linux-omap-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-omap-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 w9si17326727edr.171.2020.07.08.02.31.02; Wed, 08 Jul 2020 02:31:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-omap-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=cSG8wSO4; spf=pass (google.com: domain of linux-omap-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-omap-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 S1728387AbgGHJaz (ORCPT + 4 others); Wed, 8 Jul 2020 05:30:55 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:59296 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728368AbgGHJax (ORCPT ); Wed, 8 Jul 2020 05:30:53 -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 0689UgQ0103018; Wed, 8 Jul 2020 04:30:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1594200642; bh=CWIKltqarvAYPvUpTOXv+9gnETqUvut1kE2gYgu5r3Y=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=cSG8wSO4rJiPvVfZ3xSchQTR1lNa6KqywznDEz/rQabJ2vRKXaJ9uDOvW91vhhv57 Zft7pJf2TWzbRp2RLdzeHt8BUJC2kiASLwjzoefkl4Tk5BZuG7wYFOfRzdsjXI8UG+ 97tCjNk0UrzzSZ1mRMiiBZbmMr40VOzRKR6e7WkY= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0689UgFL095666 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 8 Jul 2020 04:30:42 -0500 Received: from DLEE108.ent.ti.com (157.170.170.38) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Wed, 8 Jul 2020 04:30:42 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE108.ent.ti.com (157.170.170.38) 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; Wed, 8 Jul 2020 04:30:42 -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 0689UJEM098512; Wed, 8 Jul 2020 04:30:38 -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 v6 05/14] PCI: cadence: Allow pci_host_bridge to have custom pci_ops Date: Wed, 8 Jul 2020 15:00:09 +0530 Message-ID: <20200708093018.28474-6-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200708093018.28474-1-kishon@ti.com> References: <20200708093018.28474-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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;