73656ce90018a506113bf4013a1d8e9dc1490917
[openwrt/staging/ynezz.git] /
1 From 61c30dbddd180c5bc0d544a81970765a009f7deb Mon Sep 17 00:00:00 2001
2 From: Zhao Qiang <qiang.zhao@nxp.com>
3 Date: Thu, 27 Apr 2017 09:54:22 +0800
4 Subject: [PATCH] irqchip/qeic: merge qeic init code from platforms to a common
5 function
6
7 The codes of qe_ic init from a variety of platforms are redundant,
8 merge them to a common function and put it to irqchip/irq-qeic.c
9
10 For non-p1021_mds mpc85xx_mds boards, use "qe_ic_init(np, 0,
11 qe_ic_cascade_low_mpic, qe_ic_cascade_high_mpic);" instead of
12 "qe_ic_init(np, 0, qe_ic_cascade_muxed_mpic, NULL);".
13
14 qe_ic_cascade_muxed_mpic was used for boards has the same interrupt
15 number for low interrupt and high interrupt, qe_ic_init has checked
16 if "low interrupt == high interrupt"
17
18 Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
19 ---
20 drivers/irqchip/irq-qeic.c | 11 +++++++++++
21 1 file changed, 11 insertions(+)
22
23 --- a/drivers/irqchip/irq-qeic.c
24 +++ b/drivers/irqchip/irq-qeic.c
25 @@ -594,4 +594,15 @@ static int __init init_qe_ic_sysfs(void)
26 return 0;
27 }
28
29 +static int __init qeic_of_init(struct device_node *node,
30 + struct device_node *parent)
31 +{
32 + if (!node)
33 + return;
34 + qe_ic_init(node, 0, qe_ic_cascade_low_mpic,
35 + qe_ic_cascade_high_mpic);
36 + of_node_put(node);
37 +}
38 +
39 +IRQCHIP_DECLARE(qeic, "fsl,qe-ic", qeic_of_init);
40 subsys_initcall(init_qe_ic_sysfs);