summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/qe_lib
diff options
context:
space:
mode:
authorZhao Qiang <qiang.zhao@freescale.com>2015-11-30 10:48:56 +0800
committerScott Wood <scottwood@freescale.com>2015-12-22 17:10:18 -0600
commit302c059f2e7bac7342f912bc77ff5bd6490c8edd (patch)
treeb0c5da58d2eb3201cc47e5bc83aef72c5320a27c /arch/powerpc/sysdev/qe_lib
parent1291e49e893703e04e129fe2e17e87af40757bf1 (diff)
downloadlinux-302c059f2e7bac7342f912bc77ff5bd6490c8edd.tar.bz2
QE: use subsys_initcall to init qe
Use subsys_initcall to init qe to adapt ARM architecture. Remove qe_reset from PowerPC platform file. Signed-off-by: Zhao Qiang <qiang.zhao@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'arch/powerpc/sysdev/qe_lib')
-rw-r--r--arch/powerpc/sysdev/qe_lib/qe.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c
index c2518cdb7ddb..88ae5c7ff4bb 100644
--- a/arch/powerpc/sysdev/qe_lib/qe.c
+++ b/arch/powerpc/sysdev/qe_lib/qe.c
@@ -671,6 +671,19 @@ unsigned int qe_get_num_of_snums(void)
}
EXPORT_SYMBOL(qe_get_num_of_snums);
+static int __init qe_init(void)
+{
+ struct device_node *np;
+
+ np = of_find_compatible_node(NULL, NULL, "fsl,qe");
+ if (!np)
+ return -ENODEV;
+ qe_reset();
+ of_node_put(np);
+ return 0;
+}
+subsys_initcall(qe_init);
+
#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC_85xx)
static int qe_resume(struct platform_device *ofdev)
{