public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 2/7] powerpc/85xx: do not reloc l2srbar if CONFIG_FLASH_BASE is not defined
@ 2010-08-16  8:04 Haiying Wang
  2010-08-16 10:11 ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Haiying Wang @ 2010-08-16  8:04 UTC (permalink / raw)
  To: u-boot

This fixes the compiling error for the board  which doesn't have NOR flash
(so CONFIG_FLASH_BASE is not defined)

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 2c3be6d..1fbc0cc 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c
@@ -327,7 +327,7 @@ int cpu_init_r(void)
 	if (l2cache->l2ctl & MPC85xx_L2CTL_L2E) {
 		puts("already enabled");
 		l2srbar = l2cache->l2srbar0;
-#ifdef CONFIG_SYS_INIT_L2_ADDR
+#if defined(CONFIG_SYS_INIT_L2_ADDR) && defined(CONFIG_SYS_FLASH_BASE)
 		if (l2cache->l2ctl & MPC85xx_L2CTL_L2SRAM_ENTIRE
 				&& l2srbar >= CONFIG_SYS_FLASH_BASE) {
 			l2srbar = CONFIG_SYS_INIT_L2_ADDR;
-- 
1.7.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 2/7] powerpc/85xx: do not reloc l2srbar if CONFIG_FLASH_BASE is not defined
  2010-08-16  8:04 [U-Boot] [PATCH 2/7] powerpc/85xx: do not reloc l2srbar if CONFIG_FLASH_BASE is not defined Haiying Wang
@ 2010-08-16 10:11 ` Wolfgang Denk
  2010-08-17  3:50   ` Haiying Wang
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2010-08-16 10:11 UTC (permalink / raw)
  To: u-boot

Dear Haiying Wang,

In message <1281945851.24612.15.camel@localhost.localdomain> you wrote:
> This fixes the compiling error for the board  which doesn't have NOR flash
> (so CONFIG_FLASH_BASE is not defined)
> 
> 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 2c3be6d..1fbc0cc 100644
> --- a/arch/powerpc/cpu/mpc85xx/cpu_init.c
> +++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c
> @@ -327,7 +327,7 @@ int cpu_init_r(void)
>  	if (l2cache->l2ctl & MPC85xx_L2CTL_L2E) {
>  		puts("already enabled");
>  		l2srbar = l2cache->l2srbar0;
> -#ifdef CONFIG_SYS_INIT_L2_ADDR
> +#if defined(CONFIG_SYS_INIT_L2_ADDR) && defined(CONFIG_SYS_FLASH_BASE)
>  		if (l2cache->l2ctl & MPC85xx_L2CTL_L2SRAM_ENTIRE
>  				&& l2srbar >= CONFIG_SYS_FLASH_BASE) {

Does this commit not break systems which have CONFIG_SYS_FLASH_BASE
defined, but with l2srbar < CONFIG_SYS_FLASH_BASE ?

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: wd@denx.de
Motto of the Electrical Engineer: Working computer hardware is a  lot
like an erect penis: it stays up as long as you don't fuck with it.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 2/7] powerpc/85xx: do not reloc l2srbar if CONFIG_FLASH_BASE is not defined
  2010-08-16 10:11 ` Wolfgang Denk
@ 2010-08-17  3:50   ` Haiying Wang
  2010-08-17  5:28     ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Haiying Wang @ 2010-08-17  3:50 UTC (permalink / raw)
  To: u-boot

On Mon, 2010-16-08 at 12:11 +0200, Wolfgang Denk wrote:
> > 
> > diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c
> > index 2c3be6d..1fbc0cc 100644
> > --- a/arch/powerpc/cpu/mpc85xx/cpu_init.c
> > +++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c
> > @@ -327,7 +327,7 @@ int cpu_init_r(void)
> >  	if (l2cache->l2ctl & MPC85xx_L2CTL_L2E) {
> >  		puts("already enabled");
> >  		l2srbar = l2cache->l2srbar0;
> > -#ifdef CONFIG_SYS_INIT_L2_ADDR
> > +#if defined(CONFIG_SYS_INIT_L2_ADDR) && defined(CONFIG_SYS_FLASH_BASE)
> >  		if (l2cache->l2ctl & MPC85xx_L2CTL_L2SRAM_ENTIRE
> >  				&& l2srbar >= CONFIG_SYS_FLASH_BASE) {
> 
> Does this commit not break systems which have CONFIG_SYS_FLASH_BASE
> defined, but with l2srbar < CONFIG_SYS_FLASH_BASE ?
I did not see it breaks the system in that case. It only affects the system without CONFIG_SYS_FLASH_BASE defined. :)

Haiying

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 2/7] powerpc/85xx: do not reloc l2srbar if CONFIG_FLASH_BASE is not defined
  2010-08-17  3:50   ` Haiying Wang
@ 2010-08-17  5:28     ` Wolfgang Denk
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2010-08-17  5:28 UTC (permalink / raw)
  To: u-boot

Dear Haiying Wang,

In message <1282017036.2814.19.camel@localhost.localdomain> you wrote:
>
> > > -#ifdef CONFIG_SYS_INIT_L2_ADDR
> > > +#if defined(CONFIG_SYS_INIT_L2_ADDR) && defined(CONFIG_SYS_FLASH_BASE)
> > >  		if (l2cache->l2ctl & MPC85xx_L2CTL_L2SRAM_ENTIRE
> > >  				&& l2srbar >= CONFIG_SYS_FLASH_BASE) {
> > 
> > Does this commit not break systems which have CONFIG_SYS_FLASH_BASE
> > defined, but with l2srbar < CONFIG_SYS_FLASH_BASE ?
> I did not see it breaks the system in that case. It only affects the system without CONFIG_SYS_FLASH_BASE defined. :)

Yes, of course you are right. Sorry for the stupid question.

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: wd at denx.de
The speed of time is one second per second.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-08-17  5:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-16  8:04 [U-Boot] [PATCH 2/7] powerpc/85xx: do not reloc l2srbar if CONFIG_FLASH_BASE is not defined Haiying Wang
2010-08-16 10:11 ` Wolfgang Denk
2010-08-17  3:50   ` Haiying Wang
2010-08-17  5:28     ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox