]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
QE: use subsys_initcall to init qe
authorZhao Qiang <qiang.zhao@freescale.com>
Mon, 30 Nov 2015 02:48:56 +0000 (10:48 +0800)
committerScott Wood <scottwood@freescale.com>
Tue, 22 Dec 2015 23:10:18 +0000 (17:10 -0600)
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>
arch/powerpc/platforms/83xx/km83xx.c
arch/powerpc/platforms/83xx/mpc832x_mds.c
arch/powerpc/platforms/83xx/mpc832x_rdb.c
arch/powerpc/platforms/83xx/mpc836x_mds.c
arch/powerpc/platforms/83xx/mpc836x_rdk.c
arch/powerpc/platforms/85xx/common.c
arch/powerpc/sysdev/qe_lib/qe.c

index bf4c4473abb96b1c39eb0d6b04e4decc0a1c2a98..ae1115813844437a49fa30e30b77bc2e8bf689d5 100644 (file)
@@ -136,8 +136,6 @@ static void __init mpc83xx_km_setup_arch(void)
        mpc83xx_setup_pci();
 
 #ifdef CONFIG_QUICC_ENGINE
-       qe_reset();
-
        np = of_find_node_by_name(NULL, "par_io");
        if (np != NULL) {
                par_io_init(np);
index 8d762203eeffa103345c2d7acd09a4b6077ccc46..aacc43f64246238e3ac6c219a5c35c4d1834dab1 100644 (file)
@@ -74,8 +74,6 @@ static void __init mpc832x_sys_setup_arch(void)
        mpc83xx_setup_pci();
 
 #ifdef CONFIG_QUICC_ENGINE
-       qe_reset();
-
        if ((np = of_find_node_by_name(NULL, "par_io")) != NULL) {
                par_io_init(np);
                of_node_put(np);
index eff5baabc3fbf1600dec624782778fa68fbef448..0c7a43e1c3902782407bd37dffa2e5868a36c96e 100644 (file)
@@ -203,8 +203,6 @@ static void __init mpc832x_rdb_setup_arch(void)
        mpc83xx_setup_pci();
 
 #ifdef CONFIG_QUICC_ENGINE
-       qe_reset();
-
        if ((np = of_find_node_by_name(NULL, "par_io")) != NULL) {
                par_io_init(np);
                of_node_put(np);
index 1a26d2f83401964b49006abb1d7d3836e351d124..eb24abdf1ae7556364097c1e02dcf404d060790d 100644 (file)
@@ -82,8 +82,6 @@ static void __init mpc836x_mds_setup_arch(void)
        mpc83xx_setup_pci();
 
 #ifdef CONFIG_QUICC_ENGINE
-       qe_reset();
-
        if ((np = of_find_node_by_name(NULL, "par_io")) != NULL) {
                par_io_init(np);
                of_node_put(np);
index b63b42d11d6c92e4d0e476100df85ead02d49ccf..823e370ed212aeed5ee5a396eef2aefc7ebf647c 100644 (file)
@@ -35,9 +35,6 @@ static void __init mpc836x_rdk_setup_arch(void)
                ppc_md.progress("mpc836x_rdk_setup_arch()", 0);
 
        mpc83xx_setup_pci();
-#ifdef CONFIG_QUICC_ENGINE
-       qe_reset();
-#endif
 }
 
 /*
index 23791de7b688f91aa4b87770a1c5ae40931137a4..18bca203e01af993d111095637be37e64809257f 100644 (file)
@@ -105,7 +105,6 @@ void __init mpc85xx_qe_init(void)
                return;
        }
 
-       qe_reset();
        of_node_put(np);
 
 }
index c2518cdb7ddb6e94822138e7c702d9242b444f86..88ae5c7ff4bb9cc8aad8f75ce931a74ceaa85920 100644 (file)
@@ -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)
 {