Re: [U-Boot] [PATCH 5/6] powerpc/85xx: do not initialize QE if QE's firmware is in nand flash

2011-02-01 Thread Kumar Gala

On Jan 31, 2011, at 3:37 PM, Wolfgang Denk wrote:

> Dear Haiying Wang,
> 
> In message <1296507737.2049.518.camel@haiying-laptop> you wrote:
>> On Mon, 2011-01-31 at 21:08 +0100, Wolfgang Denk wrote:
>>> Dear haiying.w...@freescale.com,
>>> 
>>> In message <1296499317-26616-6-git-send-email-haiying.w...@freescale.com> 
>>> you wrote:
 From: Haiying Wang 
 
 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.
>>> 
>>> Is there a pressing reason to do this so early for other boards?  Can
>>> not all boards initialize this later?
>>> 
>> My understanding is that QE is a cpu feature, so it is called early in
>> cpu_init_r. As Kumar recommended before, I can move qe_init from
>> cpu_init_r to misc_init_r for every 85xx boards with qe support. Is it
>> acceptable to you?
> 
> Yes, if this way we can avoid to do the same thing at different
> points in the initialization sequence.

Doing this in misc_init_r() isn't right either.

We've had this argument before, can we just add a cpu_init_late_r() that is 
post env_relocate() ?

Why should we duplicate cpu generic code in board code?

- k
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 5/6] powerpc/85xx: do not initialize QE if QE's firmware is in nand flash

2011-01-31 Thread Wolfgang Denk
Dear Haiying Wang,

In message <1296507737.2049.518.camel@haiying-laptop> you wrote:
> On Mon, 2011-01-31 at 21:08 +0100, Wolfgang Denk wrote:
> > Dear haiying.w...@freescale.com,
> > 
> > In message <1296499317-26616-6-git-send-email-haiying.w...@freescale.com> 
> > you wrote:
> > > From: Haiying Wang 
> > > 
> > > 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.
> > 
> > Is there a pressing reason to do this so early for other boards?  Can
> > not all boards initialize this later?
> > 
> My understanding is that QE is a cpu feature, so it is called early in
> cpu_init_r. As Kumar recommended before, I can move qe_init from
> cpu_init_r to misc_init_r for every 85xx boards with qe support. Is it
> acceptable to you?

Yes, if this way we can avoid to do the same thing at different
points in the initialization sequence.

Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Save yourself!  Reboot in 5 seconds!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 5/6] powerpc/85xx: do not initialize QE if QE's firmware is in nand flash

2011-01-31 Thread Haiying Wang
On Mon, 2011-01-31 at 21:08 +0100, Wolfgang Denk wrote:
> Dear haiying.w...@freescale.com,
> 
> In message <1296499317-26616-6-git-send-email-haiying.w...@freescale.com> you 
> wrote:
> > From: Haiying Wang 
> > 
> > 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.
> 
> Is there a pressing reason to do this so early for other boards?  Can
> not all boards initialize this later?
> 
My understanding is that QE is a cpu feature, so it is called early in
cpu_init_r. As Kumar recommended before, I can move qe_init from
cpu_init_r to misc_init_r for every 85xx boards with qe support. Is it
acceptable to you?

Haiying



___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 5/6] powerpc/85xx: do not initialize QE if QE's firmware is in nand flash

2011-01-31 Thread Wolfgang Denk
Dear haiying.w...@freescale.com,

In message <1296499317-26616-6-git-send-email-haiying.w...@freescale.com> you 
wrote:
> From: Haiying Wang 
> 
> 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.

Is there a pressing reason to do this so early for other boards?  Can
not all boards initialize this later?


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
"I didn't know it was impossible when I did it."
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 5/6] powerpc/85xx: do not initialize QE if QE's firmware is in nand flash

2011-01-31 Thread Haiying.Wang
From: Haiying Wang 

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 
---
 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 8ece970..fcf9e7b 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c
@@ -384,7 +384,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 + 0x0008; /* QE immr base */
qe_init(qe_base);
qe_reset();
-- 
1.7.3.1.50.g1e633


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot