diff mbox

[U-Boot,7/8] powerpc/85xx: do not initialize QE if QE's firmware is in nand flash

Message ID 1291218610-4315-1-git-send-email-Haiying.Wang@freescale.com
State Superseded
Delegated to: Kumar Gala
Headers show

Commit Message

Haiying Wang Dec. 1, 2010, 3:50 p.m. UTC
From: Haiying Wang <Haiying.Wang@freescale.com>

For some board which doesn't have NOR flash and the QE's firmware(ucode) is
saved in its NAND flash, we don't want call qe_init in cpu_init_r, but will
call it later after nand is initialized.

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
---
 arch/powerpc/cpu/mpc85xx/cpu_init.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Kumar Gala Dec. 1, 2010, 3:56 p.m. UTC | #1
On Dec 1, 2010, at 9:50 AM, <Haiying.Wang@freescale.com> <Haiying.Wang@freescale.com> wrote:

> From: Haiying Wang <Haiying.Wang@freescale.com>
> 
> For some board which doesn't have NOR flash and the QE's firmware(ucode) is
> saved in its NAND flash, we don't want call qe_init in cpu_init_r, but will
> call it later after nand is initialized.
> 
> Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
> ---
> arch/powerpc/cpu/mpc85xx/cpu_init.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c
> index 4b8faa5..eb34378 100644
> --- a/arch/powerpc/cpu/mpc85xx/cpu_init.c
> +++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c
> @@ -369,7 +369,7 @@ int cpu_init_r(void)
> 
> 	enable_cpc();
> 
> -#ifdef CONFIG_QE
> +#if defined(CONFIG_QE) && !defined(CONFIG_SYS_QE_FW_IN_NAND)
> 	uint qe_base = CONFIG_SYS_IMMR + 0x00080000; /* QE immr base */
> 	qe_init(qe_base);
> 	qe_reset();
> -- 
> 1.7.3.1.50.g1e633

Any reason to just not move QE init for everyone?

- k
Haiying Wang Dec. 1, 2010, 4:06 p.m. UTC | #2
On Wed, 2010-12-01 at 08:56 -0700, Kumar Gala wrote:
> > diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c
> b/arch/powerpc/cpu/mpc85xx/cpu_init.c
> > index 4b8faa5..eb34378 100644
> > --- a/arch/powerpc/cpu/mpc85xx/cpu_init.c
> > +++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c
> > @@ -369,7 +369,7 @@ int cpu_init_r(void)
> >
> >       enable_cpc();
> >
> > -#ifdef CONFIG_QE
> > +#if defined(CONFIG_QE) && !defined(CONFIG_SYS_QE_FW_IN_NAND)
> >       uint qe_base = CONFIG_SYS_IMMR + 0x00080000; /* QE immr base
> */
> >       qe_init(qe_base);
> >       qe_reset();
> > --
> > 1.7.3.1.50.g1e633
> 
> Any reason to just not move QE init for everyone?
> 
That was based on Wolfgang's comment:
http://lists.denx.de/pipermail/u-boot/2010-August/075657.html

Haiying
Kumar Gala Dec. 1, 2010, 6:50 p.m. UTC | #3
On Dec 1, 2010, at 10:06 AM, Haiying Wang wrote:

> On Wed, 2010-12-01 at 08:56 -0700, Kumar Gala wrote:
>>> diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c
>> b/arch/powerpc/cpu/mpc85xx/cpu_init.c
>>> index 4b8faa5..eb34378 100644
>>> --- a/arch/powerpc/cpu/mpc85xx/cpu_init.c
>>> +++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c
>>> @@ -369,7 +369,7 @@ int cpu_init_r(void)
>>> 
>>>     enable_cpc();
>>> 
>>> -#ifdef CONFIG_QE
>>> +#if defined(CONFIG_QE) && !defined(CONFIG_SYS_QE_FW_IN_NAND)
>>>     uint qe_base = CONFIG_SYS_IMMR + 0x00080000; /* QE immr base
>> */
>>>     qe_init(qe_base);
>>>     qe_reset();
>>> --
>>> 1.7.3.1.50.g1e633
>> 
>> Any reason to just not move QE init for everyone?
>> 
> That was based on Wolfgang's comment:
> http://lists.denx.de/pipermail/u-boot/2010-August/075657.html
> 
> Haiying
> 

I think wolfgang's gripe is about putting the code into generic board_init_r().

I think we could move it so its in misc_init_r.

- k
Haiying Wang Dec. 1, 2010, 6:58 p.m. UTC | #4
On Wed, 2010-12-01 at 11:50 -0700, Kumar Gala wrote:
> >> Any reason to just not move QE init for everyone?
> >>
> > That was based on Wolfgang's comment:
> > http://lists.denx.de/pipermail/u-boot/2010-August/075657.html
> >
> > Haiying
> >
> 
> I think wolfgang's gripe is about putting the code into generic
> board_init_r().
> 
> I think we could move it so its in misc_init_r.
> 
So we should move qe_init out from cpu_init_r, and to a misc_init_r?
should misc_init_r be defined also in 83xx/85xx's cpu_init.c file? You
may see my 8/8 patch in which I defined misc_init_r for P1021 in it's
board c file. I just did not want to touch the existing qe_init routines
for 83xx/85xx.

Haiying
diff mbox

Patch

diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c
index 4b8faa5..eb34378 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c
@@ -369,7 +369,7 @@  int cpu_init_r(void)
 
 	enable_cpc();
 
-#ifdef CONFIG_QE
+#if defined(CONFIG_QE) && !defined(CONFIG_SYS_QE_FW_IN_NAND)
 	uint qe_base = CONFIG_SYS_IMMR + 0x00080000; /* QE immr base */
 	qe_init(qe_base);
 	qe_reset();