* [PATCh v2 1/2] QE: split function mpc85xx_qe_init() into two functions.
@ 2014-03-05 7:21 Zhao Qiang
2014-03-05 7:21 ` [PATCh v2 2/2] Corenet: Add QE platform support for Corenet Zhao Qiang
0 siblings, 1 reply; 3+ messages in thread
From: Zhao Qiang @ 2014-03-05 7:21 UTC (permalink / raw)
To: linuxppc-dev, B07421, galak; +Cc: Zhao Qiang, R63061
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>
---
Changes for v2:
-no
arch/powerpc/platforms/85xx/common.c | 6 ++++++
arch/powerpc/platforms/85xx/mpc85xx.h | 2 ++
arch/powerpc/platforms/85xx/mpc85xx_mds.c | 1 +
arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 1 +
arch/powerpc/platforms/85xx/twr_p102x.c | 1 +
5 files changed, 11 insertions(+)
diff --git a/arch/powerpc/platforms/85xx/common.c b/arch/powerpc/platforms/85xx/common.c
index 3b085c7..b564b5e 100644
--- a/arch/powerpc/platforms/85xx/common.c
+++ b/arch/powerpc/platforms/85xx/common.c
@@ -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;
diff --git a/arch/powerpc/platforms/85xx/mpc85xx.h b/arch/powerpc/platforms/85xx/mpc85xx.h
index fc51dd4..39056f6 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx.h
+++ b/arch/powerpc/platforms/85xx/mpc85xx.h
@@ -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
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index 34f3c5e..3c190b4 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -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)) {
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
index e15bdd1..f9668ed 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
@@ -99,6 +99,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)) {
diff --git a/arch/powerpc/platforms/85xx/twr_p102x.c b/arch/powerpc/platforms/85xx/twr_p102x.c
index c25ff10..1eadb6d 100644
--- a/arch/powerpc/platforms/85xx/twr_p102x.c
+++ b/arch/powerpc/platforms/85xx/twr_p102x.c
@@ -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)) {
--
1.8.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCh v2 2/2] Corenet: Add QE platform support for Corenet
2014-03-05 7:21 [PATCh v2 1/2] QE: split function mpc85xx_qe_init() into two functions Zhao Qiang
@ 2014-03-05 7:21 ` Zhao Qiang
2014-03-05 17:14 ` Kumar Gala
0 siblings, 1 reply; 3+ messages in thread
From: Zhao Qiang @ 2014-03-05 7:21 UTC (permalink / raw)
To: linuxppc-dev, B07421, galak; +Cc: Zhao Qiang, R63061
There is QE on platform T104x, add support.
Call funcs qe_ic_init and qe_init if CONFIG_QUICC_ENGINE is defined.
Signed-off-by: Zhao Qiang <B45475@freescale.com>
---
Changes for v2:
- use mpc85xx_qe_init() instead
arch/powerpc/platforms/85xx/corenet_generic.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/arch/powerpc/platforms/85xx/corenet_generic.c b/arch/powerpc/platforms/85xx/corenet_generic.c
index fbd871e..f1f4575 100644
--- a/arch/powerpc/platforms/85xx/corenet_generic.c
+++ b/arch/powerpc/platforms/85xx/corenet_generic.c
@@ -26,11 +26,14 @@
#include <asm/udbg.h>
#include <asm/mpic.h>
#include <asm/ehv_pic.h>
+#include <asm/qe.h>
+#include <asm/qe_ic.h>
#include <linux/of_platform.h>
#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
#include "smp.h"
+#include "mpc85xx.h"
void __init corenet_gen_pic_init(void)
{
@@ -38,6 +41,10 @@ void __init corenet_gen_pic_init(void)
unsigned int flags = MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU |
MPIC_NO_RESET;
+#ifdef CONFIG_QUICC_ENGINE
+ struct device_node *np;
+#endif
+
if (ppc_md.get_irq == mpic_get_coreint_irq)
flags |= MPIC_ENABLE_COREINT;
@@ -45,6 +52,16 @@ void __init corenet_gen_pic_init(void)
BUG_ON(mpic == NULL);
mpic_init(mpic);
+
+#ifdef CONFIG_QUICC_ENGINE
+ np = of_find_compatible_node(NULL, NULL, "fsl,qe-ic");
+ if (np) {
+ qe_ic_init(np, 0, qe_ic_cascade_low_mpic,
+ qe_ic_cascade_high_mpic);
+ of_node_put(np);
+ }
+#endif
+
}
/*
@@ -57,6 +74,11 @@ void __init corenet_gen_setup_arch(void)
swiotlb_detect_4g();
pr_info("%s board from Freescale Semiconductor\n", ppc_md.name);
+
+#ifdef CONFIG_QUICC_ENGINE
+ mpc85xx_qe_init();
+#endif
+
}
static const struct of_device_id of_device_ids[] = {
@@ -81,6 +103,9 @@ static const struct of_device_id of_device_ids[] = {
{
.compatible = "fsl,qoriq-pcie-v3.0",
},
+ {
+ .compatible = "fsl,qe",
+ },
/* The following two are for the Freescale hypervisor */
{
.name = "hypervisor",
--
1.8.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCh v2 2/2] Corenet: Add QE platform support for Corenet
2014-03-05 7:21 ` [PATCh v2 2/2] Corenet: Add QE platform support for Corenet Zhao Qiang
@ 2014-03-05 17:14 ` Kumar Gala
0 siblings, 0 replies; 3+ messages in thread
From: Kumar Gala @ 2014-03-05 17:14 UTC (permalink / raw)
To: Zhao Qiang; +Cc: B07421, R63061, linuxppc-dev
On Mar 5, 2014, at 1:21 AM, Zhao Qiang <B45475@freescale.com> wrote:
> There is QE on platform T104x, add support.
> Call funcs qe_ic_init and qe_init if CONFIG_QUICC_ENGINE is defined.
>=20
> Signed-off-by: Zhao Qiang <B45475@freescale.com>
> ---
> Changes for v2:
> - use mpc85xx_qe_init() instead
> arch/powerpc/platforms/85xx/corenet_generic.c | 25 =
+++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>=20
> diff --git a/arch/powerpc/platforms/85xx/corenet_generic.c =
b/arch/powerpc/platforms/85xx/corenet_generic.c
> index fbd871e..f1f4575 100644
> --- a/arch/powerpc/platforms/85xx/corenet_generic.c
> +++ b/arch/powerpc/platforms/85xx/corenet_generic.c
> @@ -26,11 +26,14 @@
> #include <asm/udbg.h>
> #include <asm/mpic.h>
> #include <asm/ehv_pic.h>
> +#include <asm/qe.h>
> +#include <asm/qe_ic.h>
>=20
> #include <linux/of_platform.h>
> #include <sysdev/fsl_soc.h>
> #include <sysdev/fsl_pci.h>
> #include "smp.h"
> +#include "mpc85xx.h"
>=20
> void __init corenet_gen_pic_init(void)
> {
> @@ -38,6 +41,10 @@ void __init corenet_gen_pic_init(void)
> unsigned int flags =3D MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU |
> MPIC_NO_RESET;
>=20
> +#ifdef CONFIG_QUICC_ENGINE
> + struct device_node *np;
> +#endif
> +
> if (ppc_md.get_irq =3D=3D mpic_get_coreint_irq)
> flags |=3D MPIC_ENABLE_COREINT;
>=20
> @@ -45,6 +52,16 @@ void __init corenet_gen_pic_init(void)
> BUG_ON(mpic =3D=3D NULL);
>=20
> mpic_init(mpic);
> +
> +#ifdef CONFIG_QUICC_ENGINE
> + np =3D of_find_compatible_node(NULL, NULL, "fsl,qe-ic");
> + if (np) {
> + qe_ic_init(np, 0, qe_ic_cascade_low_mpic,
> + qe_ic_cascade_high_mpic);
> + of_node_put(np);
> + }
> +#endif
> +
remove the #ifdef, they aren=92t really needed.
> }
>=20
> /*
> @@ -57,6 +74,11 @@ void __init corenet_gen_setup_arch(void)
> swiotlb_detect_4g();
>=20
> pr_info("%s board from Freescale Semiconductor\n", ppc_md.name);
> +
> +#ifdef CONFIG_QUICC_ENGINE
> + mpc85xx_qe_init();
> +#endif
ifdef not needed
> +
> }
>=20
> static const struct of_device_id of_device_ids[] =3D {
> @@ -81,6 +103,9 @@ static const struct of_device_id of_device_ids[] =3D =
{
> {
> .compatible =3D "fsl,qoriq-pcie-v3.0",
> },
> + {
> + .compatible =3D "fsl,qe",
> + },
> /* The following two are for the Freescale hypervisor */
> {
> .name =3D "hypervisor",
> --=20
> 1.8.5
>=20
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-03-05 17:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-05 7:21 [PATCh v2 1/2] QE: split function mpc85xx_qe_init() into two functions Zhao Qiang
2014-03-05 7:21 ` [PATCh v2 2/2] Corenet: Add QE platform support for Corenet Zhao Qiang
2014-03-05 17:14 ` Kumar Gala
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).