Corenet: Add QE platform support for Corenet
Subsystems (2)
PATCH 1/1 Corenet: Add QE platform support for Corenet
There is QE on platform T104x, add support.
Call funcs qe_ic_init and qe_init if CONFIG_QUICC_ENGINE is defined.
--- arch/powerpc/platforms/85xx/corenet_generic.c | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+)
arch/powerpc/platforms/85xx/corenet_generic.c +32 -0
@@ -26,6 +26,8 @@#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>
@@ -38,6 +40,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 +51,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 + }/*
@@ -52,11 +68,24 @@ void __init corenet_gen_pic_init(void)*/ void __init corenet_gen_setup_arch (void ) { +#ifdef CONFIG_QUICC_ENGINE +struct device_node *np; +#endif mpc85xx_smp_init ();swiotlb_detect_4g ();pr_info ("%s board from Freescale Semiconductor\n" , ppc_md.name); + +#ifdef CONFIG_QUICC_ENGINE + np =of_find_compatible_node (NULL ,NULL ,"fsl,qe" ); +if (!np) { +pr_err ("%s: Could not find Quicc Engine node\n" , __func__); +return ; + } +qe_reset (); +of_node_put (np); +#endif }static const struct of_device_id of_device_ids[] = {
@@ -81,6 +110,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",
Signature · 1 line
1.8.5
Quoted 6 lines · Zhao Qiang
There is QE on platform T104x, add support.
Call funcsqe_ic_initandqe_initifCONFIG_QUICC_ENGINEis defined. =20Signed-off-by Zhao Qiang <[email protected]>---
arch/powerpc/platforms/85xx/corenet_generic.c| 32 =
+++++++++++++++++++++++++++
Quoted 1 line
1 file changed, 32 insertions(+)
Can you use mpc85xx_qe_init() instead?
=
Quoted 2 lines
=20
= renamed from arch/powerpc/platforms/85xx/corenet_generic.c +0
-0
b/arch/powerpc/platforms/85xx/corenet_generic.c
Quoted 52 lines
index fbd871e..f8c8e0c 100644
arch/powerpc/platforms/85xx/corenet_generic.c +2
-0@@ -26,6 +26,8 @@#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>arch/powerpc/platforms/85xx/corenet_generic.c +0
-0@@ -38,6 +40,10 @@ void __init corenet_gen_pic_init(void) unsigned int flags =3D MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU |MPIC_NO_RESET ;=20
arch/powerpc/platforms/85xx/corenet_generic.c +4
-0+#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
arch/powerpc/platforms/85xx/corenet_generic.c +0
-0@@ -45,6 +51,16 @@ void __init corenet_gen_pic_init(void) BUG_ON(mpic =3D=3D NULL);=20
mpic_init(mpic);arch/powerpc/platforms/85xx/corenet_generic.c +10
-0+ +#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 +}
=20
/*arch/powerpc/platforms/85xx/corenet_generic.c +3
-0@@ -52,11 +68,24 @@ void __init corenet_gen_pic_init(void)*/ void __init corenet_gen_setup_arch (void ) { +#ifdef CONFIG_QUICC_ENGINE +struct device_node *np; +#endif mpc85xx_smp_init ();=20
swiotlb_detect_4g(); =20 pr_info("%s board from Freescale Semiconductor\n", ppc_md.name);
arch/powerpc/platforms/85xx/corenet_generic.c void __init corenet_gen_pic_init(void)
Quoted 5 lines
arch/powerpc/platforms/85xx/corenet_generic.c +5
-0+ +#ifdef CONFIG_QUICC_ENGINE + np =3D of_find_compatible_node(NULL, NULL, "fsl,qe"); +if (!np) { + pr_err("%s: Could not find Quicc Engine node\n", =
__func__);
arch/powerpc/platforms/85xx/corenet_generic.c void __init corenet_gen_pic_init(void) · line 84
Quoted 1 line
arch/powerpc/platforms/85xx/corenet_generic.c +1
-0+return ;
This doesn=92t seem like an reasonable error message for common corenet = platform. It seems reasonable to build QE support but boot on a chip = w/o QE.
arch/powerpc/platforms/85xx/corenet_generic.c static const struct of_device_id of_device_ids[] =3D =
Quoted 8 lines
arch/powerpc/platforms/85xx/corenet_generic.c +4
-0+ } +qe_reset (); +of_node_put (np); +#endif }
=20
static const structof_device_idof_device_ids[] =3D {arch/powerpc/platforms/85xx/corenet_generic.c +0
-0@@ -81,6 +110,9 @@ static const struct of_device_id of_device_ids[] =3D =
{
Quoted 17 lines
arch/powerpc/platforms/85xx/corenet_generic.c +3
-1{ .compatible =3D "fsl,qoriq-pcie-v3.0", }, + { + .compatible =3D "fsl,qe", + }, /* The following two are for the Freescale hypervisor */ { .name =3D "hypervisor", --=201.8.5
=20
=20
_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev
Quoted 13 lines · On Mar 3, 2014, at 11:51 PM, Kumar Gala [[email protected]] wrote:
-----Original Message-----
From: Kumar Gala [mailto:[email protected]]
Sent: Monday, March 03, 2014 11:51 PM
To: Zhao Qiang-B45475
Cc: [email protected]; Wood Scott-B07421; Xie Xiaobo-R63061
Subject: Re: [PATCH] Corenet: Add QE platform support for Corenet =20
=20
On Feb 28, 2014, at 2:48 AM, Zhao Qiang <[email protected]> wrote:
=20Quoted 3 lines
There is QE on platform T104x, add support.
Call funcsqe_ic_initandqe_initifCONFIG_QUICC_ENGINEis defined.
Quoted 7 lines
Quoted 5 lines
Signed-off-by Zhao Qiang <[email protected]>---
arch/powerpc/platforms/85xx/corenet_generic.c| 32
+++++++++++++++++++++++++++1 file changed, 32 insertions(+)=20
Can you usempc85xx_qe_init()instead?
mpc85xx_qe_init() is for old QE which is different from new QE. New QE has no par_io, and it is not correct to init=20 par_io(par_io_init() called in mpc85xx_qe_init()) for new QE.=20
Quoted 30 lines
=20
Quoted 14 lines
arch/powerpc/platforms/85xx/corenet_generic.c +0
-0/*
arch/powerpc/platforms/85xx/corenet_generic.c +3
-0@@ -52,11 +68,24 @@ void __init corenet_gen_pic_init(void) */ void__init corenet_gen_setup_arch (void) { +#ifdef CONFIG_QUICC_ENGINE +struct device_node *np; +#endif mpc85xx_smp_init ();arch/powerpc/platforms/85xx/corenet_generic.c void __init corenet_gen_pic_init(void) */ void · line 82
Quoted 10 lines
arch/powerpc/platforms/85xx/corenet_generic.c +6
-0swiotlb_detect_4g ();pr_info ("%s board from Freescale Semiconductor\n" , ppc_md.name); + +#ifdef CONFIG_QUICC_ENGINE + np =3D of_find_compatible_node(NULL, NULL, "fsl,qe"); +if (!np) { +pr_err ("%s: Could not find Quicc Engine node\n" , __func__); +return ;=20
This doesn't seem like an reasonable error message for common corenet platform. It seems reasonable to build QE support but boot on a chip w/o QE.
=20
Quoted 11 lines
Quoted 9 lines
arch/powerpc/platforms/85xx/corenet_generic.c +4
-0+ } +qe_reset (); +of_node_put (np); +#endif }_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev=20
=20
Regards,
Zhao Qiang
Quoted 23 lines · On Tue, 2014-03-04 at 03:09 -0600, Zhao Qiang-B45475 wrote:
Quoted 19 lines · On Mar 3, 2014, at 11:51 PM, Kumar Gala [[email protected]] wrote:
-----Original Message-----
From: Kumar Gala [mailto:[email protected]]
Sent: Monday, March 03, 2014 11:51 PM
To: Zhao Qiang-B45475
Cc: [email protected]; Wood Scott-B07421; Xie Xiaobo-R63061
Subject: Re: [PATCH] Corenet: Add QE platform support for CorenetQuoted 8 lines · Zhao Qiang
There is QE on platform T104x, add support.
Call funcsqe_ic_initandqe_initifCONFIG_QUICC_ENGINEis defined.Signed-off-by Zhao Qiang <[email protected]>---
arch/powerpc/platforms/85xx/corenet_generic.c| 32
+++++++++++++++++++++++++++1 file changed, 32 insertions(+)
Quoted 6 lines
Quoted 1 line
Can you use
mpc85xx_qe_init()instead?
mpc85xx_qe_init()is for old QE which is different from new QE. New QE has nopar_io, and it is not correct to initpar_io(par_io_init() called in mpc85xx_qe_init())for new QE.
So split that function into mpc85xx_qe_init() andmpc85xx_qe_par_io_init().
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
arch/powerpc/platforms/85xx/corenet_generic.c +0
-0/*
arch/powerpc/platforms/85xx/corenet_generic.c +3
-0@@ -52,11 +68,24 @@ void __init corenet_gen_pic_init(void) */ void__init corenet_gen_setup_arch (void) { +#ifdef CONFIG_QUICC_ENGINE +struct device_node *np; +#endif mpc85xx_smp_init ();swiotlb_detect_4g ();
Quoted 11 lines
Quoted 11 lines
arch/powerpc/platforms/85xx/corenet_generic.c void __init corenet_gen_pic_init(void) · line 84
Quoted 7 lines
arch/powerpc/platforms/85xx/corenet_generic.c +6
-0pr_info ("%s board from Freescale Semiconductor\n" , ppc_md.name); + +#ifdef CONFIG_QUICC_ENGINE + np =of_find_compatible_node (NULL ,NULL ,"fsl,qe" ); +if (!np) { +pr_err ("%s: Could not find Quicc Engine node\n" , __func__); +return ;This doesn't seem like an reasonable error message for common corenet platform. It seems reasonable to build QE support but boot on a chip w/o QE.
mpc85xx_qe_init() has a similar problem regarding the error message, but the above is worse because it does an early return from corenet_gen_setup_arch() rather than just from mpc85xx_qe_init() -- what if someone added non-QE things after this point?
-Scott