brcm63xx: fix brcm, bcm6345-ext-intc interrupt controller
[openwrt/openwrt.git] / target / linux / brcm63xx / patches-4.1 / 002-4.2-irqchip-Move-IRQCHIP_DECLARE-macro-to-include-linux-.patch
1 From 91e20b5040c67c51aad88cf87db4305c5bd7f79d Mon Sep 17 00:00:00 2001
2 From: Joel Porquet <joel@porquet.org>
3 Date: Thu, 2 Jul 2015 15:32:00 -0400
4 Subject: [PATCH] irqchip: Move IRQCHIP_DECLARE macro to
5 include/linux/irqchip.h
6
7 At the moment the IRQCHIP_DECLARE macro is only declared locally in
8 drivers/irqchip/irqchip.h. It prevents from using it directly in arch/*
9 directories whenever irqchip drivers only exist there, which happens in a few
10 cases (e.g. arc, arm, microblaze and mips).
11
12 This patch makes the macro to be globally defined, i.e. in
13 include/linux/irqchip.h, and thus usable for arch-specific declarations of
14 irqchip drivers. In this way, it is very similar to what clocksource does (ie
15 CLOCKSOURCE_OF_DECLARE is defined in include/linux/clocksource.h).
16
17 For now, this patch only moves the declaration of the macro
18 IRQCHIP_DECLARE to the global header 'include/linux/irqchip.h' and make
19 'drivers/irqchip/irqchip.h' include 'include/linux/irqchip.h'. Later, other
20 patches will get rid of 'drivers/irqchip/irqchip.h' and modify all the impacted
21 irqchip drivers.
22
23 Signed-off-by: Joel Porquet <joel@porquet.org>
24 Cc: Jason Cooper <jason@lakedaemon.net>
25 Link: http://lkml.kernel.org/r/1435865565-14114-1-git-send-email-joel@porquet.org
26 Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
27 ---
28 drivers/irqchip/irqchip.h | 19 +------------------
29 include/linux/irqchip.h | 14 ++++++++++++++
30 2 files changed, 15 insertions(+), 18 deletions(-)
31
32 --- a/drivers/irqchip/irqchip.h
33 +++ b/drivers/irqchip/irqchip.h
34 @@ -8,21 +8,4 @@
35 * warranty of any kind, whether express or implied.
36 */
37
38 -#ifndef _IRQCHIP_H
39 -#define _IRQCHIP_H
40 -
41 -#include <linux/of.h>
42 -
43 -/*
44 - * This macro must be used by the different irqchip drivers to declare
45 - * the association between their DT compatible string and their
46 - * initialization function.
47 - *
48 - * @name: name that must be unique accross all IRQCHIP_DECLARE of the
49 - * same file.
50 - * @compstr: compatible string of the irqchip driver
51 - * @fn: initialization function
52 - */
53 -#define IRQCHIP_DECLARE(name, compat, fn) OF_DECLARE_2(irqchip, name, compat, fn)
54 -
55 -#endif
56 +#include <linux/irqchip.h>
57 --- a/include/linux/irqchip.h
58 +++ b/include/linux/irqchip.h
59 @@ -11,6 +11,20 @@
60 #ifndef _LINUX_IRQCHIP_H
61 #define _LINUX_IRQCHIP_H
62
63 +#include <linux/of.h>
64 +
65 +/*
66 + * This macro must be used by the different irqchip drivers to declare
67 + * the association between their DT compatible string and their
68 + * initialization function.
69 + *
70 + * @name: name that must be unique accross all IRQCHIP_DECLARE of the
71 + * same file.
72 + * @compstr: compatible string of the irqchip driver
73 + * @fn: initialization function
74 + */
75 +#define IRQCHIP_DECLARE(name, compat, fn) OF_DECLARE_2(irqchip, name, compat, fn)
76 +
77 #ifdef CONFIG_IRQCHIP
78 void irqchip_init(void);
79 #else