QE: split function mpc85xx_qe_init() into two functions.
authorZhao Qiang <B45475@freescale.com>
Thu, 6 Mar 2014 01:38:12 +0000 (09:38 +0800)
committerScott Wood <scottwood@freescale.com>
Thu, 20 Mar 2014 00:37:31 +0000 (19:37 -0500)
New QE doesn't have par_io, it doesn't need to init par_io
for new QE.
Split function mpc85xx_qe_init() into mpc85xx_qe_init()
and mpc85xx_qe_par_io_init().
Call mpc85xx_qe_init() for both new and old while
mpc85xx_qe_par_io_init() after mpc85xx_qe_init() for old.

Signed-off-by: Zhao Qiang <B45475@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
arch/powerpc/platforms/85xx/common.c
arch/powerpc/platforms/85xx/mpc85xx.h
arch/powerpc/platforms/85xx/mpc85xx_mds.c
arch/powerpc/platforms/85xx/mpc85xx_rdb.c
arch/powerpc/platforms/85xx/twr_p102x.c

index 3b085c7ee539bc23fbcaf0e38ebaa7752a8e05d3..b564b5e23f7c315d9fb88e2d0c7f5374f9aa24e8 100644 (file)
@@ -107,6 +107,12 @@ void __init mpc85xx_qe_init(void)
        qe_reset();
        of_node_put(np);
 
+}
+
+void __init mpc85xx_qe_par_io_init(void)
+{
+       struct device_node *np;
+
        np = of_find_node_by_name(NULL, "par_io");
        if (np) {
                struct device_node *ucc;
index fc51dd4092e5d10d88620f10c07434072e612b63..39056f6befeba8ef5cbeb025ed1cf13adce7ee4d 100644 (file)
@@ -10,8 +10,10 @@ static inline void __init mpc85xx_cpm2_pic_init(void) {}
 
 #ifdef CONFIG_QUICC_ENGINE
 extern void mpc85xx_qe_init(void);
+extern void mpc85xx_qe_par_io_init(void);
 #else
 static inline void __init mpc85xx_qe_init(void) {}
+static inline void __init mpc85xx_qe_par_io_init(void) {}
 #endif
 
 #endif
index 34f3c5eb3bee77dcf584b9742a241ee9d99cc310..3c190b4674606deda6def8032a639f1c7a014d64 100644 (file)
@@ -239,6 +239,7 @@ static void __init mpc85xx_mds_qe_init(void)
        struct device_node *np;
 
        mpc85xx_qe_init();
+       mpc85xx_qe_par_io_init();
        mpc85xx_mds_reset_ucc_phys();
 
        if (machine_is(p1021_mds)) {
index 232a6a79791bb18691f5e9fe37194b69bf6ae880..294b179b358465d31d945a2112e510b46531d6b9 100644 (file)
@@ -95,6 +95,7 @@ static void __init mpc85xx_rdb_setup_arch(void)
 
 #ifdef CONFIG_QUICC_ENGINE
        mpc85xx_qe_init();
+       mpc85xx_qe_par_io_init();
 #if defined(CONFIG_UCC_GETH) || defined(CONFIG_SERIAL_QE)
        if (machine_is(p1025_rdb)) {
                struct device_node *np;
index c25ff10f05ee14a4a3f97ec83a620d35f1449738..1eadb6d0dc6406acbe24a5b946fb4a62b104b83e 100644 (file)
@@ -77,6 +77,7 @@ static void __init twr_p1025_setup_arch(void)
 
 #ifdef CONFIG_QUICC_ENGINE
        mpc85xx_qe_init();
+       mpc85xx_qe_par_io_init();
 
 #if defined(CONFIG_UCC_GETH) || defined(CONFIG_SERIAL_QE)
        if (machine_is(twr_p1025)) {