Skip to content

Commit 302c059

Browse files
Zhao QiangScott Wood
authored andcommitted
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>
1 parent 1291e49 commit 302c059

File tree

7 files changed

+13
-12
lines changed

7 files changed

+13
-12
lines changed

arch/powerpc/platforms/83xx/km83xx.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,6 @@ static void __init mpc83xx_km_setup_arch(void)
136136
mpc83xx_setup_pci();
137137

138138
#ifdef CONFIG_QUICC_ENGINE
139-
qe_reset();
140-
141139
np = of_find_node_by_name(NULL, "par_io");
142140
if (np != NULL) {
143141
par_io_init(np);

arch/powerpc/platforms/83xx/mpc832x_mds.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ static void __init mpc832x_sys_setup_arch(void)
7474
mpc83xx_setup_pci();
7575

7676
#ifdef CONFIG_QUICC_ENGINE
77-
qe_reset();
78-
7977
if ((np = of_find_node_by_name(NULL, "par_io")) != NULL) {
8078
par_io_init(np);
8179
of_node_put(np);

arch/powerpc/platforms/83xx/mpc832x_rdb.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,6 @@ static void __init mpc832x_rdb_setup_arch(void)
203203
mpc83xx_setup_pci();
204204

205205
#ifdef CONFIG_QUICC_ENGINE
206-
qe_reset();
207-
208206
if ((np = of_find_node_by_name(NULL, "par_io")) != NULL) {
209207
par_io_init(np);
210208
of_node_put(np);

arch/powerpc/platforms/83xx/mpc836x_mds.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ static void __init mpc836x_mds_setup_arch(void)
8282
mpc83xx_setup_pci();
8383

8484
#ifdef CONFIG_QUICC_ENGINE
85-
qe_reset();
86-
8785
if ((np = of_find_node_by_name(NULL, "par_io")) != NULL) {
8886
par_io_init(np);
8987
of_node_put(np);

arch/powerpc/platforms/83xx/mpc836x_rdk.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ static void __init mpc836x_rdk_setup_arch(void)
3535
ppc_md.progress("mpc836x_rdk_setup_arch()", 0);
3636

3737
mpc83xx_setup_pci();
38-
#ifdef CONFIG_QUICC_ENGINE
39-
qe_reset();
40-
#endif
4138
}
4239

4340
/*

arch/powerpc/platforms/85xx/common.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ void __init mpc85xx_qe_init(void)
105105
return;
106106
}
107107

108-
qe_reset();
109108
of_node_put(np);
110109

111110
}

arch/powerpc/sysdev/qe_lib/qe.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,19 @@ unsigned int qe_get_num_of_snums(void)
671671
}
672672
EXPORT_SYMBOL(qe_get_num_of_snums);
673673

674+
static int __init qe_init(void)
675+
{
676+
struct device_node *np;
677+
678+
np = of_find_compatible_node(NULL, NULL, "fsl,qe");
679+
if (!np)
680+
return -ENODEV;
681+
qe_reset();
682+
of_node_put(np);
683+
return 0;
684+
}
685+
subsys_initcall(qe_init);
686+
674687
#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC_85xx)
675688
static int qe_resume(struct platform_device *ofdev)
676689
{

0 commit comments

Comments
 (0)