From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D8F3C433DB for ; Thu, 21 Jan 2021 13:53:53 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3CF0B233F8 for ; Thu, 21 Jan 2021 13:53:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3CF0B233F8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=mansr.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:In-Reply-To:Date:References: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=dOxdjzclc2yEd2afOtzRG1MGKL+uc4YHDLbissdLgSk=; b=UFSW5ywiTe68I1KTLhRbrYwIJ o/sU55iFQLBE0//hZwRt373GhMPa+tQ1andfZWqqR5fGAt2wCiijZf/TxN33NU9Y8FopCYLNSQQqI LDXsPCg6sLnMyHMPm2xMBpTqweTEIWACfZzQpdxSb+Pz9vVJ7eWwJ7fJv1q95u4BbKSESc+jE3Cv4 lxL5TWH2rFTnylDU07Rs43Gpsf18abUZkc0AVXsdxH7Qjt4vRsOHhV3Dn/x/oAvGzR+X+X7ONGgXZ RhLOhOFI4WdbepwI8NHe+SWK287ueXbQi+4mbkCMLx6ouR3WgmoSXrZpNz5Yfwn3+wqT5/d5x33EC pRUOtXN6g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2aNu-00021D-NB; Thu, 21 Jan 2021 13:52:26 +0000 Received: from unicorn.mansr.com ([81.2.72.234]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2aNr-00020X-Ew for linux-arm-kernel@lists.infradead.org; Thu, 21 Jan 2021 13:52:24 +0000 Received: from raven.mansr.com (raven.mansr.com [IPv6:2001:8b0:ca0d:8d8e::3]) by unicorn.mansr.com (Postfix) with ESMTPS id E114915362; Thu, 21 Jan 2021 13:52:21 +0000 (GMT) Received: by raven.mansr.com (Postfix, from userid 51770) id D71BF21A3D9; Thu, 21 Jan 2021 13:52:21 +0000 (GMT) From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= To: Arnd Bergmann Subject: Re: [PATCH 1/2] irqchip: remove sigma tango driver References: <20210120133008.2421897-1-arnd@kernel.org> <20210120133008.2421897-2-arnd@kernel.org> Date: Thu, 21 Jan 2021 13:52:21 +0000 In-Reply-To: <20210120133008.2421897-2-arnd@kernel.org> (Arnd Bergmann's message of "Wed, 20 Jan 2021 14:30:07 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210121_085223_664924_6A94C088 X-CRM114-Status: GOOD ( 24.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Marc Gonzalez , Marc Zyngier , linux-kernel@vger.kernel.org, Thomas Gleixner , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Arnd Bergmann writes: > From: Arnd Bergmann > > The tango platform is getting removed, so the driver is no > longer needed. > > Cc: Marc Gonzalez > Cc: Mans Rullgard > Signed-off-by: Arnd Bergmann Acked-by: Mans Rullgard > --- > .../sigma,smp8642-intc.txt | 48 ---- > drivers/irqchip/Kconfig | 5 - > drivers/irqchip/Makefile | 1 - > drivers/irqchip/irq-tango.c | 227 ------------------ > 4 files changed, 281 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/interrupt-controlle= r/sigma,smp8642-intc.txt > delete mode 100644 drivers/irqchip/irq-tango.c > > diff --git a/Documentation/devicetree/bindings/interrupt-controller/sigma= ,smp8642-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/= sigma,smp8642-intc.txt > deleted file mode 100644 > index 355c18a3a4d3..000000000000 > --- a/Documentation/devicetree/bindings/interrupt-controller/sigma,smp864= 2-intc.txt > +++ /dev/null > @@ -1,48 +0,0 @@ > -Sigma Designs SMP86xx/SMP87xx secondary interrupt controller > - > -Required properties: > -- compatible: should be "sigma,smp8642-intc" > > -- reg: physical address of MMIO region > -- ranges: address space mapping of child nodes > -- interrupt-controller: boolean > -- #address-cells: should be <1> > -- #size-cells: should be <1> > - > -One child node per control block with properties: > -- reg: address of registers for this control block > -- interrupt-controller: boolean > -- #interrupt-cells: should be <2>, interrupt index and flags per interru= pts.txt > -- interrupts: interrupt spec of primary interrupt controller > - > -Example: > - > -interrupt-controller@6e000 { > - compatible =3D "sigma,smp8642-intc"; > - reg =3D <0x6e000 0x400>; > - ranges =3D <0x0 0x6e000 0x400>; > - interrupt-parent =3D <&gic>; > - interrupt-controller; > - #address-cells =3D <1>; > - #size-cells =3D <1>; > - > - irq0: interrupt-controller@0 { > - reg =3D <0x000 0x100>; > - interrupt-controller; > - #interrupt-cells =3D <2>; > - interrupts =3D ; > - }; > - > - irq1: interrupt-controller@100 { > - reg =3D <0x100 0x100>; > - interrupt-controller; > - #interrupt-cells =3D <2>; > - interrupts =3D ; > - }; > - > - irq2: interrupt-controller@300 { > - reg =3D <0x300 0x100>; > - interrupt-controller; > - #interrupt-cells =3D <2>; > - interrupts =3D ; > - }; > -}; > > diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig > index 94920a51c628..f95d114c63ed 100644 > --- a/drivers/irqchip/Kconfig > +++ b/drivers/irqchip/Kconfig > @@ -260,11 +260,6 @@ config ST_IRQCHIP > help > Enables SysCfg Controlled IRQs on STi based platforms. > > -config TANGO_IRQ > - bool > - select IRQ_DOMAIN > - select GENERIC_IRQ_CHIP > - > config TB10X_IRQC > bool > select IRQ_DOMAIN > diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile > index 0ac93bfaec61..084e11774071 100644 > --- a/drivers/irqchip/Makefile > +++ b/drivers/irqchip/Makefile > @@ -55,7 +55,6 @@ obj-$(CONFIG_VERSATILE_FPGA_IRQ) +=3D irq-versatile-fpg= a.o > obj-$(CONFIG_ARCH_NSPIRE) +=3D irq-zevio.o > obj-$(CONFIG_ARCH_VT8500) +=3D irq-vt8500.o > obj-$(CONFIG_ST_IRQCHIP) +=3D irq-st.o > -obj-$(CONFIG_TANGO_IRQ) +=3D irq-tango.o > obj-$(CONFIG_TB10X_IRQC) +=3D irq-tb10x.o > obj-$(CONFIG_TS4800_IRQ) +=3D irq-ts4800.o > obj-$(CONFIG_XTENSA) +=3D irq-xtensa-pic.o > diff --git a/drivers/irqchip/irq-tango.c b/drivers/irqchip/irq-tango.c > deleted file mode 100644 > index 34290f09b853..000000000000 > --- a/drivers/irqchip/irq-tango.c > +++ /dev/null > @@ -1,227 +0,0 @@ > -// SPDX-License-Identifier: GPL-2.0-or-later > -/* > - * Copyright (C) 2014 Mans Rullgard > - */ > - > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > - > -#define IRQ0_CTL_BASE 0x0000 > -#define IRQ1_CTL_BASE 0x0100 > -#define EDGE_CTL_BASE 0x0200 > -#define IRQ2_CTL_BASE 0x0300 > - > -#define IRQ_CTL_HI 0x18 > -#define EDGE_CTL_HI 0x20 > - > -#define IRQ_STATUS 0x00 > -#define IRQ_RAWSTAT 0x04 > -#define IRQ_EN_SET 0x08 > -#define IRQ_EN_CLR 0x0c > -#define IRQ_SOFT_SET 0x10 > -#define IRQ_SOFT_CLR 0x14 > - > -#define EDGE_STATUS 0x00 > -#define EDGE_RAWSTAT 0x04 > -#define EDGE_CFG_RISE 0x08 > -#define EDGE_CFG_FALL 0x0c > -#define EDGE_CFG_RISE_SET 0x10 > -#define EDGE_CFG_RISE_CLR 0x14 > -#define EDGE_CFG_FALL_SET 0x18 > -#define EDGE_CFG_FALL_CLR 0x1c > - > -struct tangox_irq_chip { > - void __iomem *base; > - unsigned long ctl; > -}; > - > -static inline u32 intc_readl(struct tangox_irq_chip *chip, int reg) > -{ > - return readl_relaxed(chip->base + reg); > -} > - > -static inline void intc_writel(struct tangox_irq_chip *chip, int reg, u3= 2 val) > -{ > - writel_relaxed(val, chip->base + reg); > -} > - > -static void tangox_dispatch_irqs(struct irq_domain *dom, unsigned int st= atus, > - int base) > -{ > - unsigned int hwirq; > - unsigned int virq; > - > - while (status) { > - hwirq =3D __ffs(status); > - virq =3D irq_find_mapping(dom, base + hwirq); > - if (virq) > - generic_handle_irq(virq); > - status &=3D ~BIT(hwirq); > - } > -} > - > -static void tangox_irq_handler(struct irq_desc *desc) > -{ > - struct irq_domain *dom =3D irq_desc_get_handler_data(desc); > - struct irq_chip *host_chip =3D irq_desc_get_chip(desc); > - struct tangox_irq_chip *chip =3D dom->host_data; > - unsigned int status_lo, status_hi; > - > - chained_irq_enter(host_chip, desc); > - > - status_lo =3D intc_readl(chip, chip->ctl + IRQ_STATUS); > - status_hi =3D intc_readl(chip, chip->ctl + IRQ_CTL_HI + IRQ_STATUS); > - > - tangox_dispatch_irqs(dom, status_lo, 0); > - tangox_dispatch_irqs(dom, status_hi, 32); > - > - chained_irq_exit(host_chip, desc); > -} > - > -static int tangox_irq_set_type(struct irq_data *d, unsigned int flow_typ= e) > -{ > - struct irq_chip_generic *gc =3D irq_data_get_irq_chip_data(d); > - struct tangox_irq_chip *chip =3D gc->domain->host_data; > - struct irq_chip_regs *regs =3D &gc->chip_types[0].regs; > - > - switch (flow_type & IRQ_TYPE_SENSE_MASK) { > - case IRQ_TYPE_EDGE_RISING: > - intc_writel(chip, regs->type + EDGE_CFG_RISE_SET, d->mask); > - intc_writel(chip, regs->type + EDGE_CFG_FALL_CLR, d->mask); > - break; > - > - case IRQ_TYPE_EDGE_FALLING: > - intc_writel(chip, regs->type + EDGE_CFG_RISE_CLR, d->mask); > - intc_writel(chip, regs->type + EDGE_CFG_FALL_SET, d->mask); > - break; > - > - case IRQ_TYPE_LEVEL_HIGH: > - intc_writel(chip, regs->type + EDGE_CFG_RISE_CLR, d->mask); > - intc_writel(chip, regs->type + EDGE_CFG_FALL_CLR, d->mask); > - break; > - > - case IRQ_TYPE_LEVEL_LOW: > - intc_writel(chip, regs->type + EDGE_CFG_RISE_SET, d->mask); > - intc_writel(chip, regs->type + EDGE_CFG_FALL_SET, d->mask); > - break; > - > - default: > - pr_err("Invalid trigger mode %x for IRQ %d\n", > - flow_type, d->irq); > - return -EINVAL; > - } > - > - return irq_setup_alt_chip(d, flow_type); > -} > - > -static void __init tangox_irq_init_chip(struct irq_chip_generic *gc, > - unsigned long ctl_offs, > - unsigned long edge_offs) > -{ > - struct tangox_irq_chip *chip =3D gc->domain->host_data; > - struct irq_chip_type *ct =3D gc->chip_types; > - unsigned long ctl_base =3D chip->ctl + ctl_offs; > - unsigned long edge_base =3D EDGE_CTL_BASE + edge_offs; > - int i; > - > - gc->reg_base =3D chip->base; > - gc->unused =3D 0; > - > - for (i =3D 0; i < 2; i++) { > - ct[i].chip.irq_ack =3D irq_gc_ack_set_bit; > - ct[i].chip.irq_mask =3D irq_gc_mask_disable_reg; > - ct[i].chip.irq_mask_ack =3D irq_gc_mask_disable_and_ack_set; > - ct[i].chip.irq_unmask =3D irq_gc_unmask_enable_reg; > - ct[i].chip.irq_set_type =3D tangox_irq_set_type; > - ct[i].chip.name =3D gc->domain->name; > - > - ct[i].regs.enable =3D ctl_base + IRQ_EN_SET; > - ct[i].regs.disable =3D ctl_base + IRQ_EN_CLR; > - ct[i].regs.ack =3D edge_base + EDGE_RAWSTAT; > - ct[i].regs.type =3D edge_base; > - } > - > - ct[0].type =3D IRQ_TYPE_LEVEL_MASK; > - ct[0].handler =3D handle_level_irq; > - > - ct[1].type =3D IRQ_TYPE_EDGE_BOTH; > - ct[1].handler =3D handle_edge_irq; > - > - intc_writel(chip, ct->regs.disable, 0xffffffff); > - intc_writel(chip, ct->regs.ack, 0xffffffff); > -} > - > -static void __init tangox_irq_domain_init(struct irq_domain *dom) > -{ > - struct irq_chip_generic *gc; > - int i; > - > - for (i =3D 0; i < 2; i++) { > - gc =3D irq_get_domain_generic_chip(dom, i * 32); > - tangox_irq_init_chip(gc, i * IRQ_CTL_HI, i * EDGE_CTL_HI); > - } > -} > - > -static int __init tangox_irq_init(void __iomem *base, struct resource *b= aseres, > - struct device_node *node) > -{ > - struct tangox_irq_chip *chip; > - struct irq_domain *dom; > - struct resource res; > - int irq; > - int err; > - > - irq =3D irq_of_parse_and_map(node, 0); > - if (!irq) > - panic("%pOFn: failed to get IRQ", node); > - > - err =3D of_address_to_resource(node, 0, &res); > - if (err) > - panic("%pOFn: failed to get address", node); > - > - chip =3D kzalloc(sizeof(*chip), GFP_KERNEL); > - chip->ctl =3D res.start - baseres->start; > - chip->base =3D base; > - > - dom =3D irq_domain_add_linear(node, 64, &irq_generic_chip_ops, chip); > - if (!dom) > - panic("%pOFn: failed to create irqdomain", node); > - > - err =3D irq_alloc_domain_generic_chips(dom, 32, 2, node->name, > - handle_level_irq, 0, 0, 0); > - if (err) > - panic("%pOFn: failed to allocate irqchip", node); > - > - tangox_irq_domain_init(dom); > - > - irq_set_chained_handler_and_data(irq, tangox_irq_handler, dom); > - > - return 0; > -} > - > -static int __init tangox_of_irq_init(struct device_node *node, > - struct device_node *parent) > -{ > - struct device_node *c; > - struct resource res; > - void __iomem *base; > - > - base =3D of_iomap(node, 0); > - if (!base) > - panic("%pOFn: of_iomap failed", node); > - > - of_address_to_resource(node, 0, &res); > - > - for_each_child_of_node(node, c) > - tangox_irq_init(base, &res, c); > - > - return 0; > -} > -IRQCHIP_DECLARE(tangox_intc, "sigma,smp8642-intc", tangox_of_irq_init); > -- = > > 2.29.2 > -- = M=E5ns Rullg=E5rd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12605C433E6 for ; Thu, 21 Jan 2021 13:55:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C11AE233F8 for ; Thu, 21 Jan 2021 13:55:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729266AbhAUNyt convert rfc822-to-8bit (ORCPT ); Thu, 21 Jan 2021 08:54:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728051AbhAUNxD (ORCPT ); Thu, 21 Jan 2021 08:53:03 -0500 X-Greylist: delayed 218 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 21 Jan 2021 05:52:23 PST Received: from unicorn.mansr.com (unicorn.mansr.com [IPv6:2001:8b0:ca0d:8d8e::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A41DC061575 for ; Thu, 21 Jan 2021 05:52:23 -0800 (PST) Received: from raven.mansr.com (raven.mansr.com [IPv6:2001:8b0:ca0d:8d8e::3]) by unicorn.mansr.com (Postfix) with ESMTPS id E114915362; Thu, 21 Jan 2021 13:52:21 +0000 (GMT) Received: by raven.mansr.com (Postfix, from userid 51770) id D71BF21A3D9; Thu, 21 Jan 2021 13:52:21 +0000 (GMT) From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= To: Arnd Bergmann Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Marc Zyngier , Thomas Gleixner , Arnd Bergmann , Marc Gonzalez Subject: Re: [PATCH 1/2] irqchip: remove sigma tango driver References: <20210120133008.2421897-1-arnd@kernel.org> <20210120133008.2421897-2-arnd@kernel.org> Date: Thu, 21 Jan 2021 13:52:21 +0000 In-Reply-To: <20210120133008.2421897-2-arnd@kernel.org> (Arnd Bergmann's message of "Wed, 20 Jan 2021 14:30:07 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Arnd Bergmann writes: > From: Arnd Bergmann > > The tango platform is getting removed, so the driver is no > longer needed. > > Cc: Marc Gonzalez > Cc: Mans Rullgard > Signed-off-by: Arnd Bergmann Acked-by: Mans Rullgard > --- > .../sigma,smp8642-intc.txt | 48 ---- > drivers/irqchip/Kconfig | 5 - > drivers/irqchip/Makefile | 1 - > drivers/irqchip/irq-tango.c | 227 ------------------ > 4 files changed, 281 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/sigma,smp8642-intc.txt > delete mode 100644 drivers/irqchip/irq-tango.c > > diff --git a/Documentation/devicetree/bindings/interrupt-controller/sigma,smp8642-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/sigma,smp8642-intc.txt > deleted file mode 100644 > index 355c18a3a4d3..000000000000 > --- a/Documentation/devicetree/bindings/interrupt-controller/sigma,smp8642-intc.txt > +++ /dev/null > @@ -1,48 +0,0 @@ > -Sigma Designs SMP86xx/SMP87xx secondary interrupt controller > - > -Required properties: > -- compatible: should be "sigma,smp8642-intc" > > -- reg: physical address of MMIO region > -- ranges: address space mapping of child nodes > -- interrupt-controller: boolean > -- #address-cells: should be <1> > -- #size-cells: should be <1> > - > -One child node per control block with properties: > -- reg: address of registers for this control block > -- interrupt-controller: boolean > -- #interrupt-cells: should be <2>, interrupt index and flags per interrupts.txt > -- interrupts: interrupt spec of primary interrupt controller > - > -Example: > - > -interrupt-controller@6e000 { > - compatible = "sigma,smp8642-intc"; > - reg = <0x6e000 0x400>; > - ranges = <0x0 0x6e000 0x400>; > - interrupt-parent = <&gic>; > - interrupt-controller; > - #address-cells = <1>; > - #size-cells = <1>; > - > - irq0: interrupt-controller@0 { > - reg = <0x000 0x100>; > - interrupt-controller; > - #interrupt-cells = <2>; > - interrupts = ; > - }; > - > - irq1: interrupt-controller@100 { > - reg = <0x100 0x100>; > - interrupt-controller; > - #interrupt-cells = <2>; > - interrupts = ; > - }; > - > - irq2: interrupt-controller@300 { > - reg = <0x300 0x100>; > - interrupt-controller; > - #interrupt-cells = <2>; > - interrupts = ; > - }; > -}; > > diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig > index 94920a51c628..f95d114c63ed 100644 > --- a/drivers/irqchip/Kconfig > +++ b/drivers/irqchip/Kconfig > @@ -260,11 +260,6 @@ config ST_IRQCHIP > help > Enables SysCfg Controlled IRQs on STi based platforms. > > -config TANGO_IRQ > - bool > - select IRQ_DOMAIN > - select GENERIC_IRQ_CHIP > - > config TB10X_IRQC > bool > select IRQ_DOMAIN > diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile > index 0ac93bfaec61..084e11774071 100644 > --- a/drivers/irqchip/Makefile > +++ b/drivers/irqchip/Makefile > @@ -55,7 +55,6 @@ obj-$(CONFIG_VERSATILE_FPGA_IRQ) += irq-versatile-fpga.o > obj-$(CONFIG_ARCH_NSPIRE) += irq-zevio.o > obj-$(CONFIG_ARCH_VT8500) += irq-vt8500.o > obj-$(CONFIG_ST_IRQCHIP) += irq-st.o > -obj-$(CONFIG_TANGO_IRQ) += irq-tango.o > obj-$(CONFIG_TB10X_IRQC) += irq-tb10x.o > obj-$(CONFIG_TS4800_IRQ) += irq-ts4800.o > obj-$(CONFIG_XTENSA) += irq-xtensa-pic.o > diff --git a/drivers/irqchip/irq-tango.c b/drivers/irqchip/irq-tango.c > deleted file mode 100644 > index 34290f09b853..000000000000 > --- a/drivers/irqchip/irq-tango.c > +++ /dev/null > @@ -1,227 +0,0 @@ > -// SPDX-License-Identifier: GPL-2.0-or-later > -/* > - * Copyright (C) 2014 Mans Rullgard > - */ > - > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > - > -#define IRQ0_CTL_BASE 0x0000 > -#define IRQ1_CTL_BASE 0x0100 > -#define EDGE_CTL_BASE 0x0200 > -#define IRQ2_CTL_BASE 0x0300 > - > -#define IRQ_CTL_HI 0x18 > -#define EDGE_CTL_HI 0x20 > - > -#define IRQ_STATUS 0x00 > -#define IRQ_RAWSTAT 0x04 > -#define IRQ_EN_SET 0x08 > -#define IRQ_EN_CLR 0x0c > -#define IRQ_SOFT_SET 0x10 > -#define IRQ_SOFT_CLR 0x14 > - > -#define EDGE_STATUS 0x00 > -#define EDGE_RAWSTAT 0x04 > -#define EDGE_CFG_RISE 0x08 > -#define EDGE_CFG_FALL 0x0c > -#define EDGE_CFG_RISE_SET 0x10 > -#define EDGE_CFG_RISE_CLR 0x14 > -#define EDGE_CFG_FALL_SET 0x18 > -#define EDGE_CFG_FALL_CLR 0x1c > - > -struct tangox_irq_chip { > - void __iomem *base; > - unsigned long ctl; > -}; > - > -static inline u32 intc_readl(struct tangox_irq_chip *chip, int reg) > -{ > - return readl_relaxed(chip->base + reg); > -} > - > -static inline void intc_writel(struct tangox_irq_chip *chip, int reg, u32 val) > -{ > - writel_relaxed(val, chip->base + reg); > -} > - > -static void tangox_dispatch_irqs(struct irq_domain *dom, unsigned int status, > - int base) > -{ > - unsigned int hwirq; > - unsigned int virq; > - > - while (status) { > - hwirq = __ffs(status); > - virq = irq_find_mapping(dom, base + hwirq); > - if (virq) > - generic_handle_irq(virq); > - status &= ~BIT(hwirq); > - } > -} > - > -static void tangox_irq_handler(struct irq_desc *desc) > -{ > - struct irq_domain *dom = irq_desc_get_handler_data(desc); > - struct irq_chip *host_chip = irq_desc_get_chip(desc); > - struct tangox_irq_chip *chip = dom->host_data; > - unsigned int status_lo, status_hi; > - > - chained_irq_enter(host_chip, desc); > - > - status_lo = intc_readl(chip, chip->ctl + IRQ_STATUS); > - status_hi = intc_readl(chip, chip->ctl + IRQ_CTL_HI + IRQ_STATUS); > - > - tangox_dispatch_irqs(dom, status_lo, 0); > - tangox_dispatch_irqs(dom, status_hi, 32); > - > - chained_irq_exit(host_chip, desc); > -} > - > -static int tangox_irq_set_type(struct irq_data *d, unsigned int flow_type) > -{ > - struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d); > - struct tangox_irq_chip *chip = gc->domain->host_data; > - struct irq_chip_regs *regs = &gc->chip_types[0].regs; > - > - switch (flow_type & IRQ_TYPE_SENSE_MASK) { > - case IRQ_TYPE_EDGE_RISING: > - intc_writel(chip, regs->type + EDGE_CFG_RISE_SET, d->mask); > - intc_writel(chip, regs->type + EDGE_CFG_FALL_CLR, d->mask); > - break; > - > - case IRQ_TYPE_EDGE_FALLING: > - intc_writel(chip, regs->type + EDGE_CFG_RISE_CLR, d->mask); > - intc_writel(chip, regs->type + EDGE_CFG_FALL_SET, d->mask); > - break; > - > - case IRQ_TYPE_LEVEL_HIGH: > - intc_writel(chip, regs->type + EDGE_CFG_RISE_CLR, d->mask); > - intc_writel(chip, regs->type + EDGE_CFG_FALL_CLR, d->mask); > - break; > - > - case IRQ_TYPE_LEVEL_LOW: > - intc_writel(chip, regs->type + EDGE_CFG_RISE_SET, d->mask); > - intc_writel(chip, regs->type + EDGE_CFG_FALL_SET, d->mask); > - break; > - > - default: > - pr_err("Invalid trigger mode %x for IRQ %d\n", > - flow_type, d->irq); > - return -EINVAL; > - } > - > - return irq_setup_alt_chip(d, flow_type); > -} > - > -static void __init tangox_irq_init_chip(struct irq_chip_generic *gc, > - unsigned long ctl_offs, > - unsigned long edge_offs) > -{ > - struct tangox_irq_chip *chip = gc->domain->host_data; > - struct irq_chip_type *ct = gc->chip_types; > - unsigned long ctl_base = chip->ctl + ctl_offs; > - unsigned long edge_base = EDGE_CTL_BASE + edge_offs; > - int i; > - > - gc->reg_base = chip->base; > - gc->unused = 0; > - > - for (i = 0; i < 2; i++) { > - ct[i].chip.irq_ack = irq_gc_ack_set_bit; > - ct[i].chip.irq_mask = irq_gc_mask_disable_reg; > - ct[i].chip.irq_mask_ack = irq_gc_mask_disable_and_ack_set; > - ct[i].chip.irq_unmask = irq_gc_unmask_enable_reg; > - ct[i].chip.irq_set_type = tangox_irq_set_type; > - ct[i].chip.name = gc->domain->name; > - > - ct[i].regs.enable = ctl_base + IRQ_EN_SET; > - ct[i].regs.disable = ctl_base + IRQ_EN_CLR; > - ct[i].regs.ack = edge_base + EDGE_RAWSTAT; > - ct[i].regs.type = edge_base; > - } > - > - ct[0].type = IRQ_TYPE_LEVEL_MASK; > - ct[0].handler = handle_level_irq; > - > - ct[1].type = IRQ_TYPE_EDGE_BOTH; > - ct[1].handler = handle_edge_irq; > - > - intc_writel(chip, ct->regs.disable, 0xffffffff); > - intc_writel(chip, ct->regs.ack, 0xffffffff); > -} > - > -static void __init tangox_irq_domain_init(struct irq_domain *dom) > -{ > - struct irq_chip_generic *gc; > - int i; > - > - for (i = 0; i < 2; i++) { > - gc = irq_get_domain_generic_chip(dom, i * 32); > - tangox_irq_init_chip(gc, i * IRQ_CTL_HI, i * EDGE_CTL_HI); > - } > -} > - > -static int __init tangox_irq_init(void __iomem *base, struct resource *baseres, > - struct device_node *node) > -{ > - struct tangox_irq_chip *chip; > - struct irq_domain *dom; > - struct resource res; > - int irq; > - int err; > - > - irq = irq_of_parse_and_map(node, 0); > - if (!irq) > - panic("%pOFn: failed to get IRQ", node); > - > - err = of_address_to_resource(node, 0, &res); > - if (err) > - panic("%pOFn: failed to get address", node); > - > - chip = kzalloc(sizeof(*chip), GFP_KERNEL); > - chip->ctl = res.start - baseres->start; > - chip->base = base; > - > - dom = irq_domain_add_linear(node, 64, &irq_generic_chip_ops, chip); > - if (!dom) > - panic("%pOFn: failed to create irqdomain", node); > - > - err = irq_alloc_domain_generic_chips(dom, 32, 2, node->name, > - handle_level_irq, 0, 0, 0); > - if (err) > - panic("%pOFn: failed to allocate irqchip", node); > - > - tangox_irq_domain_init(dom); > - > - irq_set_chained_handler_and_data(irq, tangox_irq_handler, dom); > - > - return 0; > -} > - > -static int __init tangox_of_irq_init(struct device_node *node, > - struct device_node *parent) > -{ > - struct device_node *c; > - struct resource res; > - void __iomem *base; > - > - base = of_iomap(node, 0); > - if (!base) > - panic("%pOFn: of_iomap failed", node); > - > - of_address_to_resource(node, 0, &res); > - > - for_each_child_of_node(node, c) > - tangox_irq_init(base, &res, c); > - > - return 0; > -} > -IRQCHIP_DECLARE(tangox_intc, "sigma,smp8642-intc", tangox_of_irq_init); > -- > > 2.29.2 > -- Måns Rullgård