Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp205799pxf; Thu, 25 Mar 2021 02:02:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtURrhL49qWSx7GoJlj2T8MPTCAJHeo5EKkSfgVRtCew4nlaSas/HrYoYAogPkzwBtQP/p X-Received: by 2002:a50:f9c8:: with SMTP id a8mr7912427edq.270.1616662947041; Thu, 25 Mar 2021 02:02:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616662947; cv=none; d=google.com; s=arc-20160816; b=NLfPIT2uoOkUfIWt5CKjTl55Eovm0LeCzQIxseMJdfpjNPInJU6Gzh4gmpG7AIvcAE 9Tz/eM7elbm6i/uc/BRugnrWT9sxPQ3xNCiqVOWK/9n7nc7u961FS4PU394dQiP6QVuU BjTW5xsF3fs712usKHmkuo1TcRZIi9Dr0K8bDHeT7YXSJSHiDOLKNzHLQwP/BFjQdU3w 0J9mtrz7IFpWNXrXiBhfVxBF37UnzDmgbCPm7W1QL2yZ6R0uqZSFrYQVtWKdbQJtAlV2 kkl11KLKLEhjxLgeP7E2BL2cTAG90EE1/KL3dqTrE6DMdJseST+/fG9jihj0/26GohPK U1Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=5JJpg9j3RLrGgrdEl+YnV8LMQv7KjuW4Rj/Mh+ZOO5I=; b=GoyEiJJKz3m78D+2AGCrtkVo6ae6p8WXgwm3OQk3hovNDtTIiDMh+U9LR+XVjMusdS E7s1UKTAWYTSbw9aBZftP48j1pIeksodrCH+ZVVu1jHdM1ShFt+FX2F2+ArjuHBl/mzy TzxgBCGsh3uuJ///3O6D7n7pGAS0IECU5wi1VAEKLbuyztjkyOQp7yu7WMbZkeFza+wz viTo5rQl/Dt9FUdkMPPap0DF0HB8E6g94lirMfCr/l6hi72dY5kkNIGjRHOZXMDHO7NX 2uuFmOdSsX72h6GRUH5sjDNsgJ68PxYwJn62EM2OuW+iwN8yJMg2RLq4sFw35bt5BK7o tkHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=CcaLQPF+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 p3si3685387ejn.395.2021.03.25.02.02.03; Thu, 25 Mar 2021 02:02:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=CcaLQPF+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S229920AbhCYJBJ (ORCPT + 99 others); Thu, 25 Mar 2021 05:01:09 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:38288 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229854AbhCYJAt (ORCPT ); Thu, 25 Mar 2021 05:00:49 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 12P90Wcp101275; Thu, 25 Mar 2021 04:00:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1616662832; bh=5JJpg9j3RLrGgrdEl+YnV8LMQv7KjuW4Rj/Mh+ZOO5I=; h=From:To:CC:Subject:Date; b=CcaLQPF+uM7Sb8AiTSgn95YOey1r+MfuZCupzUJfyEUh8LhqTTepDGQrZ2ia6vKao hunPStMLCgFQLnOBGCOxPxmPi/lSXMKTgpeI2ymz7dYYmfLJHctmdjQzBlUXz3/tuT 9yf0qpi2GY5qUiZNKk3sWF7iqm9FGTLWq6uG4Mjg= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 12P90Wa5017892 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 25 Mar 2021 04:00:32 -0500 Received: from DFLE110.ent.ti.com (10.64.6.31) 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.2176.2; Thu, 25 Mar 2021 04:00:31 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2 via Frontend Transport; Thu, 25 Mar 2021 04:00:31 -0500 Received: from a0393678-ssd.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 12P90Rk7115556; Thu, 25 Mar 2021 04:00:28 -0500 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Bjorn Helgaas , Rob Herring , Lorenzo Pieralisi , Marc Zyngier CC: , , , , Lokesh Vutla Subject: [PATCH 0/6] PCI: Add legacy interrupt support in Keystone Date: Thu, 25 Mar 2021 14:30:20 +0530 Message-ID: <20210325090026.8843-1-kishon@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Keystone driver is used by K2G and AM65 and the interrupt handling of both of them is different. Add support to handle legacy interrupt for both K2G and AM65 here. Some discussions regarding this was already done here [1] and it was around having pulse interrupt for legacy interrupt. The HW interrupt line connected to GIC is a pulse interrupt whereas the legacy interrupts by definition is level interrupt. In order to provide level interrupt functionality to edge interrupt line, PCIe in AM654 has provided IRQ_EOI register. When the SW writes to IRQ_EOI register after handling the interrupt, the IP checks the state of legacy interrupt and re-triggers pulse interrupt invoking the handler again. Patch series also includes converting AM65 binding to YAML and an errata applicable for i2037. [1] -> https://lore.kernel.org/linux-arm-kernel/20190221101518.22604-4-kishon@ti.com/ Kishon Vijay Abraham I (6): dt-bindings: PCI: ti,am65: Add PCIe host mode dt-bindings for TI's AM65 SoC dt-bindings: PCI: ti,am65: Add PCIe endpoint mode dt-bindings for TI's AM65 SoC irqdomain: Export of_phandle_args_to_fwspec() PCI: keystone: Convert to using hierarchy domain for legacy interrupts PCI: keystone: Add PCI legacy interrupt support for AM654 PCI: keystone: Add workaround for Errata #i2037 (AM65x SR 1.0) .../bindings/pci/ti,am65-pci-ep.yaml | 80 ++++ .../bindings/pci/ti,am65-pci-host.yaml | 111 ++++++ drivers/pci/controller/dwc/pci-keystone.c | 343 +++++++++++++----- include/linux/irqdomain.h | 2 + kernel/irq/irqdomain.c | 6 +- 5 files changed, 440 insertions(+), 102 deletions(-) create mode 100644 Documentation/devicetree/bindings/pci/ti,am65-pci-ep.yaml create mode 100644 Documentation/devicetree/bindings/pci/ti,am65-pci-host.yaml -- 2.17.1