From patchwork Wed Jul 22 11:03:08 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: 246998 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp427146ilg; Wed, 22 Jul 2020 04:04:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTYBtBaV70dz9Tyc5JpZD5HVM7cioWOirkxWmkaDR3VFInBF6ZuOvvFSfh+njJ/JIgxNqY X-Received: by 2002:a17:906:1357:: with SMTP id x23mr31323402ejb.148.1595415841600; Wed, 22 Jul 2020 04:04:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595415841; cv=none; d=google.com; s=arc-20160816; b=0Zip3+syfEBM175lSPycUDrahNsvizXJdnq3ps1xrXro1WuCbIuPPR3ZJr0hkxwBdF r6EiL97hD/3gLIH+B2Hey7p1QZJt/GrULqHg6zpSXkNFDjoaSP9T/sorSLTsf8ug8Djz aw9Gf10WWj6y9kbLcVGssWme3+L10B6Z0otRrAyGq2NijvKVZUj1Eg0emnWU/Raqw46m m2CtyvCB9dPdF4nTiZnkKeZa8GFNWYnO8WwgsH2zzMmsMhepzchIhRFHAbhML8eKXfqx yKOprJNfIdODZqjMmbhtQv9aNsbrLuXSRik5ASucBvMWtCOr9RcrANWnhW9aiP2T+Fdy 8czA== 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=nEL0R9XBox9CznQomJpw9xLmIpm/5trryjB5W3mDxuW9CpoYYgPz3/XR52KcXV3FRL M/WwdfhsSRLJgpSB27v5XP3BgFPGi1yG+x1MrRhuUFd52eeJM+d1dn8+YyB/SONzXSRA Drecq+iV9d5EFcIqpBSwoQ0ikiP/xIMALHgxE+1wxdd+vogk1Xa6GlZvJZtEsJ7VWCik s1HVm6vfiggc1QeKfvnf2QDtWUrxftGjJlnnB13TeQrHbUz0ALy8TbIuOAkonuxbBaFN jMIta+EMsZWsBuoDTS7CBYee34ww4MAojDQ9htuQeivub4hnn5rOx6XCdA0Ptuka8wRx lQqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=WVlLlgHZ; 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 k27si13691243ejs.676.2020.07.22.04.04.01; Wed, 22 Jul 2020 04:04:01 -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=WVlLlgHZ; 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 S1730203AbgGVLD5 (ORCPT + 4 others); Wed, 22 Jul 2020 07:03:57 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:39042 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726916AbgGVLD4 (ORCPT ); Wed, 22 Jul 2020 07:03:56 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 06MB3kXL070467; Wed, 22 Jul 2020 06:03:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1595415826; bh=CWIKltqarvAYPvUpTOXv+9gnETqUvut1kE2gYgu5r3Y=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=WVlLlgHZwSLmqulvzYYYbqtc9qPWVRwK4YiltrUMoSQh60Pca8RUYh9OwQmIsRG1i tmdpkIb7CXgP9zy2ZBjPGsYbCCRPfaLimGvkrAjZbb53fwvyHPapYlu2a5q5fyw37s nAzcQWWokWEzVmp8wYQvY85H7nbTnnYeMEWHy1wg= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 06MB3k3Q005837 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 22 Jul 2020 06:03:46 -0500 Received: from DFLE103.ent.ti.com (10.64.6.24) 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; Wed, 22 Jul 2020 06:03:45 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) 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 via Frontend Transport; Wed, 22 Jul 2020 06:03:45 -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 06MB3IFe078616; Wed, 22 Jul 2020 06:03:42 -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 v8 06/15] PCI: cadence: Allow pci_host_bridge to have custom pci_ops Date: Wed, 22 Jul 2020 16:33:08 +0530 Message-ID: <20200722110317.4744-7-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200722110317.4744-1-kishon@ti.com> References: <20200722110317.4744-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;