Commit ead81266 authored by Alexander Shiyan's avatar Alexander Shiyan Committed by Shawn Guo

ARM: imx: Use IRQCHIP_DECLARE for TZIC

Remove boilerplate code by using IRQCHIP_DECLARE macro.
Signed-off-by: default avatarAlexander Shiyan <shc_work@mail.ru>
Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
parent 27e583ab
...@@ -32,7 +32,6 @@ void imx27_init_early(void); ...@@ -32,7 +32,6 @@ void imx27_init_early(void);
void imx31_init_early(void); void imx31_init_early(void);
void imx35_init_early(void); void imx35_init_early(void);
void mxc_init_irq(void __iomem *); void mxc_init_irq(void __iomem *);
void tzic_init_irq(void);
void mx1_init_irq(void); void mx1_init_irq(void);
void mx21_init_irq(void); void mx21_init_irq(void);
void mx27_init_irq(void); void mx27_init_irq(void);
......
...@@ -22,6 +22,5 @@ static const char * const imx50_dt_board_compat[] __initconst = { ...@@ -22,6 +22,5 @@ static const char * const imx50_dt_board_compat[] __initconst = {
}; };
DT_MACHINE_START(IMX50_DT, "Freescale i.MX50 (Device Tree Support)") DT_MACHINE_START(IMX50_DT, "Freescale i.MX50 (Device Tree Support)")
.init_irq = tzic_init_irq,
.dt_compat = imx50_dt_board_compat, .dt_compat = imx50_dt_board_compat,
MACHINE_END MACHINE_END
...@@ -69,7 +69,6 @@ static const char * const imx51_dt_board_compat[] __initconst = { ...@@ -69,7 +69,6 @@ static const char * const imx51_dt_board_compat[] __initconst = {
DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)") DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)")
.init_early = imx51_init_early, .init_early = imx51_init_early,
.init_irq = tzic_init_irq,
.init_machine = imx51_dt_init, .init_machine = imx51_dt_init,
.init_late = imx51_init_late, .init_late = imx51_init_late,
.dt_compat = imx51_dt_board_compat, .dt_compat = imx51_dt_board_compat,
......
...@@ -49,7 +49,6 @@ static const char * const imx53_dt_board_compat[] __initconst = { ...@@ -49,7 +49,6 @@ static const char * const imx53_dt_board_compat[] __initconst = {
DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)") DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)")
.init_early = imx53_init_early, .init_early = imx53_init_early,
.init_irq = tzic_init_irq,
.init_machine = imx53_dt_init, .init_machine = imx53_dt_init,
.init_late = imx53_init_late, .init_late = imx53_init_late,
.dt_compat = imx53_dt_board_compat, .dt_compat = imx53_dt_board_compat,
......
...@@ -9,12 +9,11 @@ ...@@ -9,12 +9,11 @@
* http://www.gnu.org/copyleft/gpl.html * http://www.gnu.org/copyleft/gpl.html
*/ */
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/irqchip.h>
#include <linux/irqdomain.h> #include <linux/irqdomain.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_address.h> #include <linux/of_address.h>
...@@ -153,13 +152,11 @@ static void __exception_irq_entry tzic_handle_irq(struct pt_regs *regs) ...@@ -153,13 +152,11 @@ static void __exception_irq_entry tzic_handle_irq(struct pt_regs *regs)
* interrupts. It registers the interrupt enable and disable functions * interrupts. It registers the interrupt enable and disable functions
* to the kernel for each interrupt source. * to the kernel for each interrupt source.
*/ */
void __init tzic_init_irq(void) static int __init tzic_init_dt(struct device_node *np, struct device_node *p)
{ {
struct device_node *np;
int irq_base; int irq_base;
int i; int i;
np = of_find_compatible_node(NULL, NULL, "fsl,tzic");
tzic_base = of_iomap(np, 0); tzic_base = of_iomap(np, 0);
WARN_ON(!tzic_base); WARN_ON(!tzic_base);
...@@ -199,7 +196,10 @@ void __init tzic_init_irq(void) ...@@ -199,7 +196,10 @@ void __init tzic_init_irq(void)
#endif #endif
pr_info("TrustZone Interrupt Controller (TZIC) initialized\n"); pr_info("TrustZone Interrupt Controller (TZIC) initialized\n");
return 0;
} }
IRQCHIP_DECLARE(tzic, "fsl,tzic", tzic_init_dt);
/** /**
* tzic_enable_wake() - enable wakeup interrupt * tzic_enable_wake() - enable wakeup interrupt
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment