Skip to contentSkip to conversation

powerpc/85xx: do not reloc l2srbar if CONFIG_FLASH_BASE is not defined

PATCH New Haiying Wang 2 participants 4 messages Aug 16, 2010 – Aug 17, 2010 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 2/7 powerpc/85xx: do not reloc l2srbar if CONFIG_FLASH_BASE is not defined

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

---
 arch/powerpc/cpu/mpc85xx/cpu_init.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/cpu/mpc85xx/cpu_init.c +1 -1
index 2c3be6d..1fbc0cc 100644
@@ -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;
Signature · 1 line
1.7.0
#1 lore raw

PATCH 2/7 powerpc/85xx: do not reloc l2srbar if CONFIG_FLASH_BASE is not defined

Dear Haiying Wang,

Quoted 13 lines · In message <[email protected]> you wrote:

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

---
 arch/powerpc/cpu/mpc85xx/cpu_init.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/cpu/mpc85xx/cpu_init.c +0 -0
index 2c3be6d..1fbc0cc 100644

arch/powerpc/cpu/mpc85xx/cpu_init.c int cpu_init_r(void) · line 332

Quoted 7 lines
arch/powerpc/cpu/mpc85xx/cpu_init.c +1 -1
@@ -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

Signature · 5 lines
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: [email protected]
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.
#2 lore raw

PATCH 2/7 powerpc/85xx: do not reloc l2srbar if CONFIG_FLASH_BASE is not defined

Quoted 16 lines · Wolfgang Denk

arch/powerpc/cpu/mpc85xx/cpu_init.c int cpu_init_r(void) · line 332

Quoted 13 lines
arch/powerpc/cpu/mpc85xx/cpu_init.c +1 -1
index 2c3be6d..1fbc0cc 100644
@@ -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

#3 lore raw

PATCH 2/7 powerpc/85xx: do not reloc l2srbar if CONFIG_FLASH_BASE is not defined

Dear Haiying Wang,

Quoted 9 lines · In message <[email protected]> you wrote:
Quoted 8 lines

arch/powerpc/cpu/mpc85xx/cpu_init.c int cpu_init_r(void) · line 332

Quoted 5 lines
arch/powerpc/cpu/mpc85xx/cpu_init.c +1 -1
-#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

Signature · 4 lines
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.