* [PATCH] irqchip: bcm2835: Convert to use IRQCHIP_DECLARE macro
@ 2013-07-04 16:31 Axel Lin
2013-07-14 5:39 ` Stephen Warren
0 siblings, 1 reply; 4+ messages in thread
From: Axel Lin @ 2013-07-04 16:31 UTC (permalink / raw)
To: linux-arm-kernel
This patch converts irq-bcm2835 driver to use the new IRQCHIP_DECLARE and
irqchip_init.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
arch/arm/mach-bcm2835/bcm2835.c | 5 ++---
drivers/irqchip/irq-bcm2835.c | 22 ++++++++++------------
include/linux/irqchip/bcm2835.h | 29 -----------------------------
3 files changed, 12 insertions(+), 44 deletions(-)
delete mode 100644 include/linux/irqchip/bcm2835.h
diff --git a/arch/arm/mach-bcm2835/bcm2835.c b/arch/arm/mach-bcm2835/bcm2835.c
index 40686d7..a4abd85 100644
--- a/arch/arm/mach-bcm2835/bcm2835.c
+++ b/arch/arm/mach-bcm2835/bcm2835.c
@@ -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>
@@ -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,
diff --git a/drivers/irqchip/irq-bcm2835.c b/drivers/irqchip/irq-bcm2835.c
index 16c78f1..c29408e 100644
--- a/drivers/irqchip/irq-bcm2835.c
+++ b/drivers/irqchip/irq-bcm2835.c
@@ -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))
@@ -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)
{
@@ -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;
}
/*
@@ -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;
@@ -222,3 +218,5 @@ asmlinkage void __exception_irq_entry bcm2835_handle_irq(
}
}
}
+
+IRQCHIP_DECLARE(bcm2835_armctrl_ic, "brcm,bcm2835-armctrl-ic", armctrl_of_init);
diff --git a/include/linux/irqchip/bcm2835.h b/include/linux/irqchip/bcm2835.h
deleted file mode 100644
index 48a859b..0000000
--- a/include/linux/irqchip/bcm2835.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2010 Broadcom
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef __LINUX_IRQCHIP_BCM2835_H_
-#define __LINUX_IRQCHIP_BCM2835_H_
-
-#include <asm/exception.h>
-
-extern void bcm2835_init_irq(void);
-
-extern asmlinkage void __exception_irq_entry bcm2835_handle_irq(
- struct pt_regs *regs);
-
-#endif
--
1.8.1.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] irqchip: bcm2835: Convert to use IRQCHIP_DECLARE macro
2013-07-04 16:31 [PATCH] irqchip: bcm2835: Convert to use IRQCHIP_DECLARE macro Axel Lin
@ 2013-07-14 5:39 ` Stephen Warren
2013-10-02 2:35 ` Stephen Warren
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Warren @ 2013-07-14 5:39 UTC (permalink / raw)
To: linux-arm-kernel
On 07/04/2013 10:31 AM, Axel Lin wrote:
> This patch converts irq-bcm2835 driver to use the new IRQCHIP_DECLARE and
> irqchip_init.
I guess the diffs to the ARM tree are much smaller than the irqchip
tree, so it's simplest to take it through the irqchip tree, so,
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] irqchip: bcm2835: Convert to use IRQCHIP_DECLARE macro
2013-07-14 5:39 ` Stephen Warren
@ 2013-10-02 2:35 ` Stephen Warren
2013-11-07 1:42 ` Axel Lin
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Warren @ 2013-10-02 2:35 UTC (permalink / raw)
To: linux-arm-kernel
On 07/13/2013 11:39 PM, Stephen Warren wrote:
> On 07/04/2013 10:31 AM, Axel Lin wrote:
>> This patch converts irq-bcm2835 driver to use the new IRQCHIP_DECLARE and
>> irqchip_init.
>
> I guess the diffs to the ARM tree are much smaller than the irqchip
> tree, so it's simplest to take it through the irqchip tree, so,
>
> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
> Tested-by: Stephen Warren <swarren@wwwdotorg.org>
I don't see this patch in linux-next yet. Thomas, do you want to take it
through the irqchip tree, or should I take it through the bcm2835 tree?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] irqchip: bcm2835: Convert to use IRQCHIP_DECLARE macro
2013-10-02 2:35 ` Stephen Warren
@ 2013-11-07 1:42 ` Axel Lin
0 siblings, 0 replies; 4+ messages in thread
From: Axel Lin @ 2013-11-07 1:42 UTC (permalink / raw)
To: linux-arm-kernel
2013/10/2 Stephen Warren <swarren@wwwdotorg.org>:
> On 07/13/2013 11:39 PM, Stephen Warren wrote:
>> On 07/04/2013 10:31 AM, Axel Lin wrote:
>>> This patch converts irq-bcm2835 driver to use the new IRQCHIP_DECLARE and
>>> irqchip_init.
>>
>> I guess the diffs to the ARM tree are much smaller than the irqchip
>> tree, so it's simplest to take it through the irqchip tree, so,
>>
>> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
>> Tested-by: Stephen Warren <swarren@wwwdotorg.org>
>
> I don't see this patch in linux-next yet. Thomas, do you want to take it
> through the irqchip tree, or should I take it through the bcm2835 tree?
>
Hi,
Seems this patch is still not in linux-next yet.
Just wondering if it will be applied for 3.13?
Regards,
Axel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-11-07 1:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-04 16:31 [PATCH] irqchip: bcm2835: Convert to use IRQCHIP_DECLARE macro Axel Lin
2013-07-14 5:39 ` Stephen Warren
2013-10-02 2:35 ` Stephen Warren
2013-11-07 1:42 ` Axel Lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).