ARM: sa1100: move irq driver to irqchip subsystem
Subsystems (3)
cover ARM: sa1100: move irq driver to irqchip subsystem
Hello,
These two patches finish my work on refactoring StrongARM SA-11x0 IRQ driver into sane irqchip driver. As they depend on the patches already accepted by Russell, I'd ask Thomas and/or Jason to Ack merging these two patches through his tree.
----------------------------------------------------------------
Dmitry Eremin-Solenikov (2):
ARM: sa1100: prepare for moving irq driver to drivers/irqchip
ARM: sa1100: move irq driver to drivers/irqchip/
arch/arm/mach-sa1100/Makefile | 2 +- arch/arm/mach-sa1100/generic.c | 13 +++++++++++++ drivers/irqchip/Makefile | 1 + arch/arm/mach-sa1100/irq.c => drivers/irqchip/irq-sa11x0.c | 23 ++++++----------------- include/linux/irqchip/irq-sa11x0.h | 17 +++++++++++++++++ 5 files changed, 38 insertions(+), 18 deletions(-) rename arch/arm/mach-sa1100/irq.c => drivers/irqchip/irq-sa11x0.c (89%) create mode 100644 include/linux/irqchip/irq-sa11x0.h
Signature · 2 lines
With best wishes Dmitry
PATCH 1/2 ARM: sa1100: prepare for moving irq driver to drivers/irqchip
Prepare for moving sa1100 irq driver to irqchip infrastructure - split sa1100_init_irq into helper code and irq parts.
--- arch/arm/mach-sa1100/generic.c | 13 +++++++++++++ arch/arm/mach-sa1100/irq.c | 21 ++++++--------------- include/linux/irqchip/irq-sa11x0.h | 17 +++++++++++++++++ 3 files changed, 36 insertions(+), 15 deletions(-) create mode 100644 include/linux/irqchip/irq-sa11x0.h
arch/arm/mach-sa1100/generic.c +13 -0
@@ -20,6 +20,7 @@#include <linux/ioport.h> #include <linux/platform_device.h> #include <linux/reboot.h> +#include <linux/irqchip/irq-sa11x0.h> #include <video/sa1100fb.h>
@@ -377,6 +378,18 @@ void __init sa1100_timer_init(void)pxa_timer_nodt_init (IRQ_OST0 ,io_p2v (0x90000000 ),3686400 ); } +static struct resource irq_resource = +DEFINE_RES_MEM_NAMED (0x90050000 ,SZ_64K ,"irqs" ); + +void __init sa1100_init_irq (void ) +{ +request_resource (&iomem_resource, &irq_resource); + +sa11x0_init_irq_nodt (IRQ_GPIO0_SC , irq_resource.start); + +sa1100_init_gpio (); +} +/* * Disable the memory bus request/grant signals on the SA1110 to * ensure that we don't receive spurious memory requests. We set
arch/arm/mach-sa1100/irq.c +6 -15
@@ -1,9 +1,10 @@/* * linux/arch/arm/mach-sa1100/irq.c * +* Copyright (C) 2015 Dmitry Eremin-Solenikov * Copyright (C) 1999-2001 Nicolas Pitre * -* Generic IRQ handling for the SA11x0, GPIO 11-27 IRQ demultiplexing. +* Generic IRQ handling for the SA11x0. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as
@@ -15,16 +16,13 @@#include <linux/io.h> #include <linux/irq.h> #include <linux/irqdomain.h> -#include <linux/ioport.h> #include <linux/syscore_ops.h> +#include <linux/irqchip/irq-sa11x0.h> #include <soc/sa1100/pwer.h> -#include <mach/irqs.h> #include <asm/exception.h> -#include "generic.h" -#define ICIP 0x00/* IC IRQ Pending reg. */ #define ICMR 0x04/* IC Mask Reg. */ #define ICLR 0x08/* IC Level Reg. */
@@ -86,9 +84,6 @@ static struct irq_domain_ops sa1100_normal_irqdomain_ops = {static struct irq_domain *sa1100_normal_irqdomain; -static struct resource irq_resource = -DEFINE_RES_MEM_NAMED (0x90050000 ,SZ_64K ,"irqs" ); - static struct sa1100irq_state { unsigned int saved; unsigned int icmr;
@@ -156,11 +151,9 @@ sa1100_handle_irq(struct pt_regs *regs) }while (1 ); } -void __init sa1100_init_irq (void ) +void __init sa11x0_init_irq_nodt (int irq_start,resource_size_t io_start) { -request_resource (&iomem_resource, &irq_resource); - - iobase =ioremap (irq_resource.start,SZ_64K ); + iobase =ioremap (io_start,SZ_64K );if (WARN_ON (!iobase))return ;
@@ -177,10 +170,8 @@ void __init sa1100_init_irq(void)writel_relaxed (1 , iobase +ICCR ); sa1100_normal_irqdomain =irq_domain_add_simple (NULL , -32 ,IRQ_GPIO0_SC , +32 , irq_start, &sa1100_normal_irqdomain_ops,NULL );set_handle_irq (sa1100_handle_irq); - -sa1100_init_gpio (); }
include/linux/irqchip/irq-sa11x0.h new file +17 -0
@@ -0,0 +1,17 @@ +/* +* Generic IRQ handling for the SA11x0. +* +* Copyright (C) 2015 Dmitry Eremin-Solenikov +* Copyright (C) 1999-2001 Nicolas Pitre +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef __INCLUDE_LINUX_IRQCHIP_IRQ_SA11x0_H +#define __INCLUDE_LINUX_IRQCHIP_IRQ_SA11x0_H + +void __init sa11x0_init_irq_nodt (int irq_start,resource_size_t io_start); + +#endif
Signature · 1 line
2.1.4
PATCH 2/2 ARM: sa1100: move irq driver to drivers/irqchip/
In reply to Dmitry Eremin-SolenikovMove current sa11x0 IRQ driver to the irqchip subsystem.
--- arch/arm/mach-sa1100/Makefile | 2 +- arch/arm/mach-sa1100/irq.c | 177 ------------------------------------------ drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-sa11x0.c | 175 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 177 insertions(+), 178 deletions(-) delete mode 100644 arch/arm/mach-sa1100/irq.c create mode 100644 drivers/irqchip/irq-sa11x0.c
arch/arm/mach-sa1100/Makefile +1 -1
@@ -3,7 +3,7 @@ # # Common support -obj-y := clock.o generic.o irq.o #nmi-oopser.o +obj-y := clock.o generic.o #nmi-oopser.o # Specific board support obj-$(CONFIG_SA1100_ASSABET) += assabet.o
arch/arm/mach-sa1100/irq.c deleted +0 -177
177 lines not on this page · raw message
drivers/irqchip/Makefile +1 -0
@@ -47,3 +47,4 @@ obj-$(CONFIG_KEYSTONE_IRQ) += irq-keystone.o obj-$(CONFIG_MIPS_GIC) += irq-mips-gic.o obj-$(CONFIG_ARCH_MEDIATEK) += irq-mtk-sysirq.o obj-$(CONFIG_ARCH_DIGICOLOR) += irq-digicolor.o +obj-$(CONFIG_ARCH_SA1100) += irq-sa11x0.o
drivers/irqchip/irq-sa11x0.c new file +175 -0
175 lines not on this page · raw message
Signature · 1 line
2.1.4
cover ARM: sa1100: move irq driver to irqchip subsystem
In reply to Dmitry Eremin-SolenikovQuoted 6 lines · Dmitry Eremin-Solenikov
Hello,
These two patches finish my work on refactoring StrongARM SA-11x0 IRQ driver into sane irqchip driver. As they depend on the patches already accepted by Russell, I'd ask Thomas and/or Jason to Ack merging these two patches through his tree.