public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/5][v2] powerpc/mpc85xx:No NOR boot, do not compile IFC errata A003399
@ 2013-03-22  7:07 Prabhakar Kushwaha
  2013-04-05 20:33 ` Scott Wood
  0 siblings, 1 reply; 8+ messages in thread
From: Prabhakar Kushwaha @ 2013-03-22  7:07 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
---
 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

 README                                    |    4 ++++
 arch/powerpc/cpu/mpc85xx/cpu_init_early.c |    9 ++++++---
 arch/powerpc/cpu/mpc8xxx/fsl_ifc.c        |    2 +-
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/README b/README
index 7f2506a..c4ad69d 100644
--- a/README
+++ b/README
@@ -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
diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
index dacfdd1..3a4bfc5 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
@@ -25,7 +25,8 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#if defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399) && !defined(CONFIG_SYS_RAMBOOT)
+#if defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399)\
+	&& defined(CONFIG_A003399_NOR_WORKAROUND)
 void setup_ifc(void)
 {
 	struct fsl_ifc *ifc_regs = (void *)CONFIG_SYS_IFC_ADDR;
@@ -99,7 +100,8 @@ 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)
+#if defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399)\
+	&& defined(CONFIG_A003399_NOR_WORKAROUND)
 	ccsr_l2cache_t *l2cache = (void *)CONFIG_SYS_MPC85xx_L2_ADDR;
 	u32  *dst, *src;
 	void (*setup_ifc_sram)(void);
@@ -138,7 +140,8 @@ 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)
+#if defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399)\
+	&& defined(CONFIG_A003399_NOR_WORKAROUND)
 #define SRAM_BASE_ADDR	(0x00000000)
 	/* TLB for SRAM */
 	mas0 = MAS0_TLBSEL(1) | MAS0_ESEL(9);
diff --git a/arch/powerpc/cpu/mpc8xxx/fsl_ifc.c b/arch/powerpc/cpu/mpc8xxx/fsl_ifc.c
index 56b319f..959a0e2 100644
--- a/arch/powerpc/cpu/mpc8xxx/fsl_ifc.c
+++ b/arch/powerpc/cpu/mpc8xxx/fsl_ifc.c
@@ -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
-- 
1.7.9.5

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

* [U-Boot] [PATCH 1/5][v2] powerpc/mpc85xx:No NOR boot, do not compile IFC errata A003399
  2013-03-22  7:07 [U-Boot] [PATCH 1/5][v2] powerpc/mpc85xx:No NOR boot, do not compile IFC errata A003399 Prabhakar Kushwaha
@ 2013-04-05 20:33 ` Scott Wood
  2013-04-06  2:28   ` Prabhakar Kushwaha
  0 siblings, 1 reply; 8+ messages in thread
From: Scott Wood @ 2013-04-05 20:33 UTC (permalink / raw)
  To: u-boot

On 03/22/2013 02:07:48 AM, Prabhakar Kushwaha wrote:
> 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.
> 
> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
> ---
>  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
> 
>  README                                    |    4 ++++
>  arch/powerpc/cpu/mpc85xx/cpu_init_early.c |    9 ++++++---
>  arch/powerpc/cpu/mpc8xxx/fsl_ifc.c        |    2 +-
>  3 files changed, 11 insertions(+), 4 deletions(-)
> 
> diff --git a/README b/README
> index 7f2506a..c4ad69d 100644
> --- a/README
> +++ b/README
> @@ -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
> diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c  
> b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
> index dacfdd1..3a4bfc5 100644
> --- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
> +++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
> @@ -25,7 +25,8 @@
> 
>  DECLARE_GLOBAL_DATA_PTR;
> 
> -#if defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399) &&  
> !defined(CONFIG_SYS_RAMBOOT)
> +#if defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399)\
> +	&& defined(CONFIG_A003399_NOR_WORKAROUND)

Why would CONFIG_A003399_NOR_WORKAROUND be enabled if  
CONFIG_SYS_FSL_ERRATUM_IFC_A003399 isn't?

-Scott

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

* [U-Boot] [PATCH 1/5][v2] powerpc/mpc85xx:No NOR boot, do not compile IFC errata A003399
  2013-04-05 20:33 ` Scott Wood
@ 2013-04-06  2:28   ` Prabhakar Kushwaha
  2013-04-09  0:39     ` Scott Wood
  0 siblings, 1 reply; 8+ messages in thread
From: Prabhakar Kushwaha @ 2013-04-06  2:28 UTC (permalink / raw)
  To: u-boot

On 04/06/2013 02:03 AM, Scott Wood wrote:
> On 03/22/2013 02:07:48 AM, Prabhakar Kushwaha wrote:
>> 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.
>>
>> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
>> ---
>>  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
>>
>>  README                                    |    4 ++++
>>  arch/powerpc/cpu/mpc85xx/cpu_init_early.c |    9 ++++++---
>>  arch/powerpc/cpu/mpc8xxx/fsl_ifc.c        |    2 +-
>>  3 files changed, 11 insertions(+), 4 deletions(-)
>>
>> diff --git a/README b/README
>> index 7f2506a..c4ad69d 100644
>> --- a/README
>> +++ b/README
>> @@ -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
>> diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c 
>> b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
>> index dacfdd1..3a4bfc5 100644
>> --- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
>> +++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
>> @@ -25,7 +25,8 @@
>>
>>  DECLARE_GLOBAL_DATA_PTR;
>>
>> -#if defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399) && 
>> !defined(CONFIG_SYS_RAMBOOT)
>> +#if defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399)\
>> +    && defined(CONFIG_A003399_NOR_WORKAROUND)
>
> Why would CONFIG_A003399_NOR_WORKAROUND be enabled if 
> CONFIG_SYS_FSL_ERRATUM_IFC_A003399 isn't?


originally i tried the same but it did not work. As P1010RDB.h does not 
include config_mpc85xx.h.   Only arch/powerpc/cpu/mpc85xx/*.c files 
includes both P1010RDB.h and config_mpc85xx.h

Regards,
Prabhakar

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

* [U-Boot] [PATCH 1/5][v2] powerpc/mpc85xx:No NOR boot, do not compile IFC errata A003399
  2013-04-06  2:28   ` Prabhakar Kushwaha
@ 2013-04-09  0:39     ` Scott Wood
  2013-04-09  4:56       ` Prabhakar Kushwaha
  0 siblings, 1 reply; 8+ messages in thread
From: Scott Wood @ 2013-04-09  0:39 UTC (permalink / raw)
  To: u-boot

On 04/05/2013 09:28:14 PM, Prabhakar Kushwaha wrote:
> On 04/06/2013 02:03 AM, Scott Wood wrote:
>> On 03/22/2013 02:07:48 AM, Prabhakar Kushwaha wrote:
>>> 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.
>>> 
>>> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
>>> ---
>>>  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
>>> 
>>>  README                                    |    4 ++++
>>>  arch/powerpc/cpu/mpc85xx/cpu_init_early.c |    9 ++++++---
>>>  arch/powerpc/cpu/mpc8xxx/fsl_ifc.c        |    2 +-
>>>  3 files changed, 11 insertions(+), 4 deletions(-)
>>> 
>>> diff --git a/README b/README
>>> index 7f2506a..c4ad69d 100644
>>> --- a/README
>>> +++ b/README
>>> @@ -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
>>> diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c  
>>> b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
>>> index dacfdd1..3a4bfc5 100644
>>> --- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
>>> +++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
>>> @@ -25,7 +25,8 @@
>>> 
>>>  DECLARE_GLOBAL_DATA_PTR;
>>> 
>>> -#if defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399) &&  
>>> !defined(CONFIG_SYS_RAMBOOT)
>>> +#if defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399)\
>>> +    && defined(CONFIG_A003399_NOR_WORKAROUND)
>> 
>> Why would CONFIG_A003399_NOR_WORKAROUND be enabled if  
>> CONFIG_SYS_FSL_ERRATUM_IFC_A003399 isn't?
> 
> 
> originally i tried the same but it did not work. As P1010RDB.h does  
> not include config_mpc85xx.h.   Only arch/powerpc/cpu/mpc85xx/*.c  
> files includes both P1010RDB.h and config_mpc85xx.h

Can you add #include <config.h> in P1010RDB.h near the top, but after  
the symbols that config_mpc85xx.h depends on (which I think is just  
CONFIG_P1010)?

-Scott

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

* [U-Boot] [PATCH 1/5][v2] powerpc/mpc85xx:No NOR boot, do not compile IFC errata A003399
  2013-04-09  0:39     ` Scott Wood
@ 2013-04-09  4:56       ` Prabhakar Kushwaha
  2013-04-09 23:41         ` Scott Wood
  0 siblings, 1 reply; 8+ messages in thread
From: Prabhakar Kushwaha @ 2013-04-09  4:56 UTC (permalink / raw)
  To: u-boot

On 04/09/2013 06:09 AM, Scott Wood wrote:
> On 04/05/2013 09:28:14 PM, Prabhakar Kushwaha wrote:
>> On 04/06/2013 02:03 AM, Scott Wood wrote:
>>> On 03/22/2013 02:07:48 AM, Prabhakar Kushwaha wrote:
>>>> 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.
>>>>
>>>> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
>>>> ---
>>>>  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
>>>>
>>>>  README                                    |    4 ++++
>>>>  arch/powerpc/cpu/mpc85xx/cpu_init_early.c |    9 ++++++---
>>>>  arch/powerpc/cpu/mpc8xxx/fsl_ifc.c        |    2 +-
>>>>  3 files changed, 11 insertions(+), 4 deletions(-)
>>>>
>>>> diff --git a/README b/README
>>>> index 7f2506a..c4ad69d 100644
>>>> --- a/README
>>>> +++ b/README
>>>> @@ -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
>>>> diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c 
>>>> b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
>>>> index dacfdd1..3a4bfc5 100644
>>>> --- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
>>>> +++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
>>>> @@ -25,7 +25,8 @@
>>>>
>>>>  DECLARE_GLOBAL_DATA_PTR;
>>>>
>>>> -#if defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399) && 
>>>> !defined(CONFIG_SYS_RAMBOOT)
>>>> +#if defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399)\
>>>> +    && defined(CONFIG_A003399_NOR_WORKAROUND)
>>>
>>> Why would CONFIG_A003399_NOR_WORKAROUND be enabled if 
>>> CONFIG_SYS_FSL_ERRATUM_IFC_A003399 isn't?
>>
>>
>> originally i tried the same but it did not work. As P1010RDB.h does 
>> not include config_mpc85xx.h.   Only arch/powerpc/cpu/mpc85xx/*.c 
>> files includes both P1010RDB.h and config_mpc85xx.h
>
> Can you add #include <config.h> in P1010RDB.h near the top, but after 
> the symbols that config_mpc85xx.h depends on (which I think is just 
> CONFIG_P1010)?
I need to add config_mpc85xx.h here.

  #define CONFIG_MPC85xx
  #define CONFIG_FSL_IFC                 /* Enable IFC Support */
  #define CONFIG_SYS_HAS_SERDES          /* common SERDES init code */
+#include "../../arch/powerpc/include/asm/config_mpc85xx.h"

I tried just after CONFIG_P1010 but it is giving compilation error.

Just to mention, I need to provide relative path in order to compile.
I will still suggest to keep original patch, As header file location may 
change over period of time then config file needs to be updated again.

Regards,
Prabhakar

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

* [U-Boot] [PATCH 1/5][v2] powerpc/mpc85xx:No NOR boot, do not compile IFC errata A003399
  2013-04-09  4:56       ` Prabhakar Kushwaha
@ 2013-04-09 23:41         ` Scott Wood
  2013-04-10  3:57           ` Prabhakar Kushwaha
  0 siblings, 1 reply; 8+ messages in thread
From: Scott Wood @ 2013-04-09 23:41 UTC (permalink / raw)
  To: u-boot

On 04/08/2013 11:56:25 PM, Prabhakar Kushwaha wrote:
> On 04/09/2013 06:09 AM, Scott Wood wrote:
>> On 04/05/2013 09:28:14 PM, Prabhakar Kushwaha wrote:
>>> On 04/06/2013 02:03 AM, Scott Wood wrote:
>>>> On 03/22/2013 02:07:48 AM, Prabhakar Kushwaha wrote:
>>>>> 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.
>>>>> 
>>>>> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
>>>>> ---
>>>>>  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
>>>>> 
>>>>>  README                                    |    4 ++++
>>>>>  arch/powerpc/cpu/mpc85xx/cpu_init_early.c |    9 ++++++---
>>>>>  arch/powerpc/cpu/mpc8xxx/fsl_ifc.c        |    2 +-
>>>>>  3 files changed, 11 insertions(+), 4 deletions(-)
>>>>> 
>>>>> diff --git a/README b/README
>>>>> index 7f2506a..c4ad69d 100644
>>>>> --- a/README
>>>>> +++ b/README
>>>>> @@ -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
>>>>> diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c  
>>>>> b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
>>>>> index dacfdd1..3a4bfc5 100644
>>>>> --- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
>>>>> +++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
>>>>> @@ -25,7 +25,8 @@
>>>>> 
>>>>>  DECLARE_GLOBAL_DATA_PTR;
>>>>> 
>>>>> -#if defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399) &&  
>>>>> !defined(CONFIG_SYS_RAMBOOT)
>>>>> +#if defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399)\
>>>>> +    && defined(CONFIG_A003399_NOR_WORKAROUND)
>>>> 
>>>> Why would CONFIG_A003399_NOR_WORKAROUND be enabled if  
>>>> CONFIG_SYS_FSL_ERRATUM_IFC_A003399 isn't?
>>> 
>>> 
>>> originally i tried the same but it did not work. As P1010RDB.h does  
>>> not include config_mpc85xx.h.   Only arch/powerpc/cpu/mpc85xx/*.c  
>>> files includes both P1010RDB.h and config_mpc85xx.h
>> 
>> Can you add #include <config.h> in P1010RDB.h near the top, but  
>> after the symbols that config_mpc85xx.h depends on (which I think is  
>> just CONFIG_P1010)?
> I need to add config_mpc85xx.h here.
> 
>  #define CONFIG_MPC85xx
>  #define CONFIG_FSL_IFC                 /* Enable IFC Support */
>  #define CONFIG_SYS_HAS_SERDES          /* common SERDES init code */
> +#include "../../arch/powerpc/include/asm/config_mpc85xx.h"
> 
> I tried just after CONFIG_P1010 but it is giving compilation error.

What error?

> Just to mention, I need to provide relative path in order to compile.

What specifically did you try and what error did it produce?

> I will still suggest to keep original patch, As header file location  
> may change over period of time then config file needs to be updated  
> again.

No, this has been a repeated problem (not having access to  
config_mpc85xx.h in the board config file) and I'd like to see it fixed.

-Scott

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

* [U-Boot] [PATCH 1/5][v2] powerpc/mpc85xx:No NOR boot, do not compile IFC errata A003399
  2013-04-09 23:41         ` Scott Wood
@ 2013-04-10  3:57           ` Prabhakar Kushwaha
  2013-04-10 20:09             ` Scott Wood
  0 siblings, 1 reply; 8+ messages in thread
From: Prabhakar Kushwaha @ 2013-04-10  3:57 UTC (permalink / raw)
  To: u-boot

On 04/10/2013 05:11 AM, Scott Wood wrote:
> On 04/08/2013 11:56:25 PM, Prabhakar Kushwaha wrote:
>> On 04/09/2013 06:09 AM, Scott Wood wrote:
>>> On 04/05/2013 09:28:14 PM, Prabhakar Kushwaha wrote:
>>>> On 04/06/2013 02:03 AM, Scott Wood wrote:
>>>>> On 03/22/2013 02:07:48 AM, Prabhakar Kushwaha wrote:
>>>>>> 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.
>>>>>>
>>>>>> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
>>>>>> ---
>>>>>>  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
>>>>>>
>>>>>>  README                                    |    4 ++++
>>>>>>  arch/powerpc/cpu/mpc85xx/cpu_init_early.c |    9 ++++++---
>>>>>>  arch/powerpc/cpu/mpc8xxx/fsl_ifc.c        |    2 +-
>>>>>>  3 files changed, 11 insertions(+), 4 deletions(-)
>>>>>>
>>>>>> diff --git a/README b/README
>>>>>> index 7f2506a..c4ad69d 100644
>>>>>> --- a/README
>>>>>> +++ b/README
>>>>>> @@ -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
>>>>>> diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c 
>>>>>> b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
>>>>>> index dacfdd1..3a4bfc5 100644
>>>>>> --- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
>>>>>> +++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
>>>>>> @@ -25,7 +25,8 @@
>>>>>>
>>>>>>  DECLARE_GLOBAL_DATA_PTR;
>>>>>>
>>>>>> -#if defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399) && 
>>>>>> !defined(CONFIG_SYS_RAMBOOT)
>>>>>> +#if defined(CONFIG_SYS_FSL_ERRATUM_IFC_A003399)\
>>>>>> +    && defined(CONFIG_A003399_NOR_WORKAROUND)
>>>>>
>>>>> Why would CONFIG_A003399_NOR_WORKAROUND be enabled if 
>>>>> CONFIG_SYS_FSL_ERRATUM_IFC_A003399 isn't?
>>>>
>>>>
>>>> originally i tried the same but it did not work. As P1010RDB.h does 
>>>> not include config_mpc85xx.h.   Only arch/powerpc/cpu/mpc85xx/*.c 
>>>> files includes both P1010RDB.h and config_mpc85xx.h
>>>
>>> Can you add #include <config.h> in P1010RDB.h near the top, but 
>>> after the symbols that config_mpc85xx.h depends on (which I think is 
>>> just CONFIG_P1010)?
>> I need to add config_mpc85xx.h here.
>>
>>  #define CONFIG_MPC85xx
>>  #define CONFIG_FSL_IFC                 /* Enable IFC Support */
>>  #define CONFIG_SYS_HAS_SERDES          /* common SERDES init code */
>> +#include "../../arch/powerpc/include/asm/config_mpc85xx.h"
>>
>> I tried just after CONFIG_P1010 but it is giving compilation error.
>
> What error?


make[1]: Entering directory 
`/home/b32579/Workspace/MERGE/OPENSRC/U-BOOT/u-boot'
/opt/freescale/usr/local/gcc-4.5.55-eglibc-2.11.55/powerpc-linux-gnu/bin/powerpc-linux-gnu-gcc 
-DDO_DEPS_ONLY \
         -g  -Os   -fpic -mrelocatable -ffunction-sections 
-fdata-sections -meabi -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0x11000000 
-I/home/b32579/Workspace/MERGE/OPENSRC/U-BOOT/u-boot/include 
-fno-builtin -ffreestanding -nostdinc -isystem 
/opt/freescale/usr/local/gcc-4.5.55-eglibc-2.11.55/powerpc-linux-gnu/lib/gcc/powerpc-linux-gnu/4.5.1/include 
-pipe  -DCONFIG_PPC -D__powerpc__ -ffixed-r2 -Wa,-me500 -msoft-float 
-mno-string  -mno-spe -Wall -Wstrict-prototypes -fno-stack-protector 
-Wno-format-nonliteral -Wno-format-security    \
         -o lib/asm-offsets.s lib/asm-offsets.c -c -S
In file included from 
/home/b32579/Workspace/MERGE/OPENSRC/U-BOOT/u-boot/include/common.h:174:0,
                  from lib/asm-offsets.c:18:
/home/b32579/Workspace/MERGE/OPENSRC/U-BOOT/u-boot/include/asm/global_data.h:98:21: 
error: 'CONFIG_SYS_NUM_TLBCAMS' undeclared here (not in a function)
make[1]: *** [lib/asm-offsets.s] Error 1

because of these defines in config_mpc85xx.h
#if defined(CONFIG_E500MC)
#define CONFIG_SYS_NUM_TLBCAMS        64
#elif defined(CONFIG_E500)
#define CONFIG_SYS_NUM_TLBCAMS        16
#endif


>> Just to mention, I need to provide relative path in order to compile.
>
> What specifically did you try and what error did it produce?

I did not try anything.
I was just doubting on having relative path.
is it acceptable or not?  As we are moving from dynamic header 
inclusions to more fixed inclusion.

>
>> I will still suggest to keep original patch, As header file location 
>> may change over period of time then config file needs to be updated 
>> again.
>
> No, this has been a repeated problem (not having access to 
> config_mpc85xx.h in the board config file) and I'd like to see it fixed 
oh.. I was not aware of this point.

Regards,
Prabhakar

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

* [U-Boot] [PATCH 1/5][v2] powerpc/mpc85xx:No NOR boot, do not compile IFC errata A003399
  2013-04-10  3:57           ` Prabhakar Kushwaha
@ 2013-04-10 20:09             ` Scott Wood
  0 siblings, 0 replies; 8+ messages in thread
From: Scott Wood @ 2013-04-10 20:09 UTC (permalink / raw)
  To: u-boot

On 04/09/2013 10:57:04 PM, Prabhakar Kushwaha wrote:
> On 04/10/2013 05:11 AM, Scott Wood wrote:
>> On 04/08/2013 11:56:25 PM, Prabhakar Kushwaha wrote:
>>> I tried just after CONFIG_P1010 but it is giving compilation error.
>> 
>> What error?
> 
> 
> make[1]: Entering directory  
> `/home/b32579/Workspace/MERGE/OPENSRC/U-BOOT/u-boot'
> /opt/freescale/usr/local/gcc-4.5.55-eglibc-2.11.55/powerpc-linux-gnu/bin/powerpc-linux-gnu-gcc  
> -DDO_DEPS_ONLY \
>         -g  -Os   -fpic -mrelocatable -ffunction-sections  
> -fdata-sections -meabi -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0x11000000  
> -I/home/b32579/Workspace/MERGE/OPENSRC/U-BOOT/u-boot/include  
> -fno-builtin -ffreestanding -nostdinc -isystem  
> /opt/freescale/usr/local/gcc-4.5.55-eglibc-2.11.55/powerpc-linux-gnu/lib/gcc/powerpc-linux-gnu/4.5.1/include  
> -pipe  -DCONFIG_PPC -D__powerpc__ -ffixed-r2 -Wa,-me500 -msoft-float  
> -mno-string  -mno-spe -Wall -Wstrict-prototypes -fno-stack-protector  
> -Wno-format-nonliteral -Wno-format-security    \
>         -o lib/asm-offsets.s lib/asm-offsets.c -c -S
> In file included from  
> /home/b32579/Workspace/MERGE/OPENSRC/U-BOOT/u-boot/include/common.h:174:0,
>                  from lib/asm-offsets.c:18:
> /home/b32579/Workspace/MERGE/OPENSRC/U-BOOT/u-boot/include/asm/global_data.h:98:21:  
> error: 'CONFIG_SYS_NUM_TLBCAMS' undeclared here (not in a function)
> make[1]: *** [lib/asm-offsets.s] Error 1
> 
> because of these defines in config_mpc85xx.h
> #if defined(CONFIG_E500MC)
> #define CONFIG_SYS_NUM_TLBCAMS        64
> #elif defined(CONFIG_E500)
> #define CONFIG_SYS_NUM_TLBCAMS        16
> #endif

You also need CONFIG_E500 defined before you include config_mpc85xx.h  
-- although it might be better to define CONFIG_E500[MC] in  
config_mpc85xx.h based on the SoC type, and move the  
CONFIG_SYS_NUM_TLBCAMS setting to the bottom of the file.

>>> Just to mention, I need to provide relative path in order to  
>>> compile.
>> 
>> What specifically did you try and what error did it produce?
> 
> I did not try anything.

If you didn't try a normal include patch and see a failure, why do you  
say you need to provide a relative path?

#include <asm/config_mpc85xx.h> works for me.

-Scott

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

end of thread, other threads:[~2013-04-10 20:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-22  7:07 [U-Boot] [PATCH 1/5][v2] powerpc/mpc85xx:No NOR boot, do not compile IFC errata A003399 Prabhakar Kushwaha
2013-04-05 20:33 ` Scott Wood
2013-04-06  2:28   ` Prabhakar Kushwaha
2013-04-09  0:39     ` Scott Wood
2013-04-09  4:56       ` Prabhakar Kushwaha
2013-04-09 23:41         ` Scott Wood
2013-04-10  3:57           ` Prabhakar Kushwaha
2013-04-10 20:09             ` Scott Wood

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