Skip to content

Commit

Permalink
irqchip: bcm2835: Convert to use IRQCHIP_DECLARE macro
Browse files Browse the repository at this point in the history
This patch converts irq-bcm2835 driver to use the new IRQCHIP_DECLARE and
irqchip_init.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Cc: Simon Arlott <simon@fire.lp0.eu>
Cc: Olof Johansson <olof@lixom.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linux-rpi-kernel@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Axel Lin authored and Thomas Gleixner committed Nov 7, 2013
1 parent b8d490c commit 5702941
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 44 deletions.
5 changes: 2 additions & 3 deletions arch/arm/mach-bcm2835/bcm2835.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include <linux/delay.h>
#include <linux/init.h>
#include <linux/irqchip/bcm2835.h>
#include <linux/irqchip.h>
#include <linux/of_address.h>
#include <linux/of_platform.h>
#include <linux/clk/bcm2835.h>
Expand Down Expand Up @@ -131,8 +131,7 @@ static const char * const bcm2835_compat[] = {

DT_MACHINE_START(BCM2835, "BCM2835")
.map_io = bcm2835_map_io,
.init_irq = bcm2835_init_irq,
.handle_irq = bcm2835_handle_irq,
.init_irq = irqchip_init,
.init_machine = bcm2835_init,
.init_time = clocksource_of_init,
.restart = bcm2835_restart,
Expand Down
22 changes: 10 additions & 12 deletions drivers/irqchip/irq-bcm2835.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/irqdomain.h>
#include <linux/irqchip/bcm2835.h>

#include <asm/exception.h>
#include <asm/mach/irq.h>

#include "irqchip.h"

/* Put the bank and irq (32 bits) into the hwirq */
#define MAKE_HWIRQ(b, n) ((b << 5) | (n))
Expand Down Expand Up @@ -93,6 +95,8 @@ struct armctrl_ic {
};

static struct armctrl_ic intc __read_mostly;
static asmlinkage void __exception_irq_entry bcm2835_handle_irq(
struct pt_regs *regs);

static void armctrl_mask_irq(struct irq_data *d)
{
Expand Down Expand Up @@ -164,17 +168,9 @@ static int __init armctrl_of_init(struct device_node *node,
set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
}
}
return 0;
}

static struct of_device_id irq_of_match[] __initconst = {
{ .compatible = "brcm,bcm2835-armctrl-ic", .data = armctrl_of_init },
{ }
};

void __init bcm2835_init_irq(void)
{
of_irq_init(irq_of_match);
set_handle_irq(bcm2835_handle_irq);
return 0;
}

/*
Expand All @@ -200,7 +196,7 @@ static void armctrl_handle_shortcut(int bank, struct pt_regs *regs,
handle_IRQ(irq_linear_revmap(intc.domain, irq), regs);
}

asmlinkage void __exception_irq_entry bcm2835_handle_irq(
static asmlinkage void __exception_irq_entry bcm2835_handle_irq(
struct pt_regs *regs)
{
u32 stat, irq;
Expand All @@ -222,3 +218,5 @@ asmlinkage void __exception_irq_entry bcm2835_handle_irq(
}
}
}

IRQCHIP_DECLARE(bcm2835_armctrl_ic, "brcm,bcm2835-armctrl-ic", armctrl_of_init);
29 changes: 0 additions & 29 deletions include/linux/irqchip/bcm2835.h

This file was deleted.

0 comments on commit 5702941

Please sign in to comment.