Skip to contentSkip to conversation

powerpc/mpc85xx:No NOR boot, do not compile IFC errata A003399

PATCH Superseded Prabhakar Kushwaha 2 participants 5 messages Apr 15, 2013 – Apr 16, 2013 PowerPC

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/5 powerpc/mpc85xx:No NOR boot, do not compile IFC errata A003399

IFC errata A003399 is valid for IFC NOR boot i.e.if no on-board NOR flash or no NOR boot, do not compile its workaround.

---
Based upon git://git.denx.de/u-boot.git branch master
Changes for v2:
- Add CONFIG_A003399_NOR_WORKAROUND for errata workaround
- Add CONFIG_A003399_NOR_WORKAROUND in README
Changes for v3:
- Use only CONFIG_A003399_NOR_WORKAROUND for errata workaround
Changes for v4: Sending as it is

 README                                    |    4 ++++
 arch/powerpc/cpu/mpc85xx/cpu_init_early.c |    6 +++---
 arch/powerpc/cpu/mpc8xxx/fsl_ifc.c        |    2 +-
 3 files changed, 8 insertions(+), 4 deletions(-)
README +4 -0
index 67a071f..f06a60b 100644
@@ -414,6 +414,10 @@ The following options need to be configured:
 		See Freescale App Note 4493 for more information about
 		this erratum.
 
+		CONFIG_A003399_NOR_WORKAROUND
+		Enables a workaround for IFC erratum A003399. It is only
+		requred during NOR boot.
+
 		CONFIG_SYS_FSL_CORENET_SNOOPVEC_COREONLY
 
 		This is the value to write into CCSR offset 0x18600
arch/powerpc/cpu/mpc85xx/cpu_init_early.c +3 -3
index dacfdd1..439a873 100644
@@ -25,7 +25,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#if defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399) && !defined(CONFIG_SYS_RAMBOOT)
+#ifdef CONFIG_A003399_NOR_WORKAROUND
 void setup_ifc(void)
 {
 	struct fsl_ifc *ifc_regs = (void *)CONFIG_SYS_IFC_ADDR;
@@ -99,7 +99,7 @@ void cpu_init_early_f(void)
 #ifdef CONFIG_SYS_FSL_ERRATUM_P1010_A003549
 	ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
 #endif
-#if defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399) && !defined(CONFIG_SYS_RAMBOOT)
+#ifdef CONFIG_A003399_NOR_WORKAROUND
 	ccsr_l2cache_t *l2cache = (void *)CONFIG_SYS_MPC85xx_L2_ADDR;
 	u32  *dst, *src;
 	void (*setup_ifc_sram)(void);
@@ -138,7 +138,7 @@ void cpu_init_early_f(void)
  * Work Around for IFC Erratum A003399, issue will hit only when execution
  * from NOR Flash
  */
-#if defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399) && !defined(CONFIG_SYS_RAMBOOT)
+#ifdef CONFIG_A003399_NOR_WORKAROUND
 #define SRAM_BASE_ADDR	(0x00000000)
 	/* TLB for SRAM */
 	mas0 = MAS0_TLBSEL(1) | MAS0_ESEL(9);
arch/powerpc/cpu/mpc8xxx/fsl_ifc.c +1 -1
index 56b319f..959a0e2 100644
@@ -43,7 +43,7 @@ void init_early_memctl_regs(void)
 	set_ifc_ftim(IFC_CS0, IFC_FTIM2, CONFIG_SYS_CS0_FTIM2);
 	set_ifc_ftim(IFC_CS0, IFC_FTIM3, CONFIG_SYS_CS0_FTIM3);
 
-#if !defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399) || defined(CONFIG_SYS_RAMBOOT)
+#ifndef CONFIG_A003399_NOR_WORKAROUND
 #ifdef CONFIG_SYS_CSPR0_EXT
 	set_ifc_cspr_ext(IFC_CS0, CONFIG_SYS_CSPR0_EXT);
 #endif
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v4 1/5 powerpc/mpc85xx:No NOR boot, do not compile IFC errata A003399

arch/powerpc/cpu/mpc85xx/cpu_init_early.c line 29

Quoted 12 lines · Prabhakar Kushwaha
arch/powerpc/cpu/mpc85xx/cpu_init_early.c +1 -1
index dacfdd1..439a873 100644
@@ -25,7 +25,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#if defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399) &&  
 !defined(CONFIG_SYS_RAMBOOT)
+#ifdef CONFIG_A003399_NOR_WORKAROUND

Won't this break bisectability since you don't define CONFIG_A003399_NOR_WORKAROUND until a later patch?

-Scott

#2 lore raw

PATCH v4 1/5 powerpc/mpc85xx:No NOR boot, do not compile IFC errata A003399

Quoted 8 lines · Scott Wood
Quoted 7 lines · Prabhakar Kushwaha
arch/powerpc/cpu/mpc85xx/cpu_init_early.c +0 -0
index dacfdd1..439a873 100644
@@ -25,7 +25,7 @@
 
Quoted 9 lines

arch/powerpc/cpu/mpc85xx/cpu_init_early.c line 28

Quoted 5 lines
arch/powerpc/cpu/mpc85xx/cpu_init_early.c +1 -1
 DECLARE_GLOBAL_DATA_PTR;
 
-#if defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399) && 
 !defined(CONFIG_SYS_RAMBOOT)
+#ifdef CONFIG_A003399_NOR_WORKAROUND

Won't this break bisectability since you don't define CONFIG_A003399_NOR_WORKAROUND until a later patch?

This workaround is only required for P1010. so for other SoC it should not be defined. For P1010 it is defined in P10101RDB.h also all patches of a patch set should be applied at once.

may be I am unable to understand the question.

Regards,
Prabhakar

#3 lore raw

PATCH v4 1/5 powerpc/mpc85xx:No NOR boot, do not compile IFC errata A003399

Quoted 19 lines · Prabhakar Kushwaha
Quoted 8 lines · Scott Wood
Quoted 7 lines · Prabhakar Kushwaha
arch/powerpc/cpu/mpc85xx/cpu_init_early.c +0 -0
index dacfdd1..439a873 100644
@@ -25,7 +25,7 @@
 
Quoted 9 lines

arch/powerpc/cpu/mpc85xx/cpu_init_early.c line 28

Quoted 5 lines
arch/powerpc/cpu/mpc85xx/cpu_init_early.c +1 -1
 DECLARE_GLOBAL_DATA_PTR;
 
-#if defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399) && 
 !defined(CONFIG_SYS_RAMBOOT)
+#ifdef CONFIG_A003399_NOR_WORKAROUND

Won't this break bisectability since you don't define CONFIG_A003399_NOR_WORKAROUND until a later patch?

Quoted 6 lines

This workaround is only required for P1010. so for other SoC it should not be defined. For P1010 it is defined in P10101RDB.h also all patches of a patch set should be applied at once.

may be I am unable to understand the question.

is it related to bisectability feature of git? in that case there can be 2 possible solutions
a) change the patch set sequence
b) combine patch. but changes are in arch/powerpc/ and boards files. will it be right to combine together?

Please suggest!!

Regards,
Prabhakar

#4 lore raw

PATCH v4 1/5 powerpc/mpc85xx:No NOR boot, do not compile IFC errata A003399

In reply to Prabhakar Kushwaha
Quoted 19 lines · Prabhakar Kushwaha
Quoted 8 lines · Scott Wood
Quoted 7 lines · Prabhakar Kushwaha
arch/powerpc/cpu/mpc85xx/cpu_init_early.c +0 -0
index dacfdd1..439a873 100644
@@ -25,7 +25,7 @@
 
Quoted 9 lines

arch/powerpc/cpu/mpc85xx/cpu_init_early.c line 28

Quoted 5 lines
arch/powerpc/cpu/mpc85xx/cpu_init_early.c +1 -1
 DECLARE_GLOBAL_DATA_PTR;
 
-#if defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399) &&  
 !defined(CONFIG_SYS_RAMBOOT)
+#ifdef CONFIG_A003399_NOR_WORKAROUND

Won't this break bisectability since you don't define CONFIG_A003399_NOR_WORKAROUND until a later patch?

Quoted 5 lines

This workaround is only required for P1010. so for other SoC it should not be defined. For P1010 it is defined in P10101RDB.h also all patches of a patch set should be applied at once.

may be I am unable to understand the question.

My point is you should have P1010 define this symbol before you change the code here to expect it. Otherwise, P1010 will be broken for two commits and break bisectability.

-Scott