From patchwork Fri Jun 23 21:57:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 9807429 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7588160349 for ; Fri, 23 Jun 2017 21:58:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67A91286F8 for ; Fri, 23 Jun 2017 21:58:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B14828702; Fri, 23 Jun 2017 21:58:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CFB4D286F8 for ; Fri, 23 Jun 2017 21:58:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753900AbdFWV6L (ORCPT ); Fri, 23 Jun 2017 17:58:11 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:32827 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752606AbdFWV6K (ORCPT ); Fri, 23 Jun 2017 17:58:10 -0400 Received: by mail-pg0-f65.google.com with SMTP id u62so7614724pgb.0 for ; Fri, 23 Jun 2017 14:58:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20150623.gappssmtp.com; s=20150623; h=from:to:to:to:to:to:to:to:to:to:cc:cc:subject:date:message-id; bh=og7bHJYkRo3ZS4RzFZWoHkmb06CSTHVCBEX9kj26ti4=; b=fUwS4GQ5oHTWwk+zm0hk3LS1sy4UaYXdeuPL+xKI9ASq8J1y/UHVToqhFGvju2cAHH l3fcSdGxMGIMbvtXrp4QlFAWsgxOl0lTaq3dvqvKTAqBheLTtmufAp7XdMODIQobvi9S UBpPHkNKw+AEGhns2Uohesrr75KmQBAgh3cxpCl6/QKuEmyVTqHgr5MzPkZJX/dLTquZ lgFObTGmnLphrRE5GOpCQWRs3tZuD5Bu1YXWG1mYBpXZqgHQz8KsLMz/Ky7gBZXYx+Kr ZliVBK6V+DOB+ni7v1QFE6YpTSfgjSqeaBdkRRwMixBmCuzHb2orNKzecH8bwjmxjhIG W4Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:to:to:to:to:to:to:to:to:cc:cc:subject :date:message-id; bh=og7bHJYkRo3ZS4RzFZWoHkmb06CSTHVCBEX9kj26ti4=; b=grQeYAH+xniQpVFEcbhak3q8Wq7B7O0jvHAGmXigo+6lTTZAzxrJHPIBJibLXQIjSn RX2735Yxf3Ea7iuORsV2lXSDB5Et2VIVaOoGzompm6GV1GAtVTCNs0+H+y8ib16faDPP t7QXu+ELtVotahXGl91dnptT95uCPulHoFnrQfv4K2pPoNNzk+XFqo9Im5qodko9pIoD L5B4OUXMxOHXaWreADiUqlhVIgupATZQGkDyT8B3DD1y7EhW4yMo6Q4sOx6D26pSW7k5 tbE5cHcY3EsuvNn0XHA4n/VgZurQEOT9hERO8MvPk4XA3EtYX4XR4vTGiE5olsI0TO6m 2eeQ== X-Gm-Message-State: AKS2vOxjBOQAXICYP59BEfuGIpyNPMqv8HxkDB2V1OZkfOamczhEc7rX zHWZYD8/5Xrf7FwttWYfT3/4 X-Received: by 10.84.241.67 with SMTP id u3mr5265564plm.30.1498255090031; Fri, 23 Jun 2017 14:58:10 -0700 (PDT) Received: from localhost ([216.38.154.21]) by smtp.gmail.com with ESMTPSA id m68sm2962454pfi.12.2017.06.23.14.58.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Jun 2017 14:58:09 -0700 (PDT) From: Palmer Dabbelt To: bhelgaas@google.com To: michal.simek@xilinx.com To: soren.brinkmann@xilinx.com To: bharat.kumar.gogada@xilinx.com To: po.liu@nxp.com To: christophe.jaillet@wanadoo.fr To: paul.gortmaker@windriver.com To: linux-pci@vger.kernel.org To: linux-kernel@vger.kernel.org Cc: "Wesley W. Terpstra" Cc: Palmer Dabbelt Subject: [PATCH] pcie-xilinx: OF-PCIe numbers legacy interrupts from 1 Date: Fri, 23 Jun 2017 14:57:20 -0700 Message-Id: <20170623215720.27057-1-palmer@dabbelt.com> X-Mailer: git-send-email 2.13.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Wesley W. Terpstra" Without this patch we can't use the 4th legacy PCIe interrupt. This is a workaround: there are only 4 legacy interrupts, but since they're numbered starting from 1 instead of 0 this just adds a 5th interrupt. Signed-off-by: Palmer Dabbelt Signed-off-by: Wesley W. Terpstra --- drivers/pci/host/pcie-xilinx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c index 2fe2df51f9f8..8804145d399a 100644 --- a/drivers/pci/host/pcie-xilinx.c +++ b/drivers/pci/host/pcie-xilinx.c @@ -443,7 +443,7 @@ static irqreturn_t xilinx_pcie_intr_handler(int irq, void *data) val = ((val & XILINX_PCIE_RPIFR1_INTR_MASK) >> XILINX_PCIE_RPIFR1_INTR_SHIFT) + 1; generic_handle_irq(irq_find_mapping(port->leg_domain, - val)); + val + 1)); } } @@ -524,7 +524,7 @@ static int xilinx_pcie_init_irq_domain(struct xilinx_pcie_port *port) return -ENODEV; } - port->leg_domain = irq_domain_add_linear(pcie_intc_node, 4, + port->leg_domain = irq_domain_add_linear(pcie_intc_node, 5, &intx_domain_ops, port); if (!port->leg_domain) {