All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] powerpc/85xx: Add workaround for erratum CPU-A011 on e500mc cores
@ 2011-08-27 11:03 Kumar Gala
  2011-08-27 11:36 ` Wolfgang Denk
  0 siblings, 1 reply; 6+ messages in thread
From: Kumar Gala @ 2011-08-27 11:03 UTC (permalink / raw)
  To: u-boot

Issue:
CoreNet bad data signal is not sent with shared data from L1 Data Cache
when it has an error

Workaround:
Run in write-shadow mode by setting L1CSR2[DCWS] = 1

By default we do NOT enable this, thus we have #undef in
config_mpc85xx.h for this erratum.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 arch/powerpc/cpu/mpc85xx/cmd_errata.c     |    3 +++
 arch/powerpc/cpu/mpc85xx/cpu_init.c       |    3 ++-
 arch/powerpc/cpu/mpc85xx/release.S        |    3 ++-
 arch/powerpc/include/asm/config_mpc85xx.h |    3 +++
 4 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/cmd_errata.c b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
index 49f03f1..47bb0d2 100644
--- a/arch/powerpc/cpu/mpc85xx/cmd_errata.c
+++ b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
@@ -53,6 +53,9 @@ static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 #if defined(CONFIG_SYS_P4080_ERRATUM_CPU22)
 	puts("Work-around for Erratum CPU22 enabled\n");
 #endif
+#if defined(CONFIG_SYS_FSL_ERRATUM_CPU_E500MC_A011)
+	puts("Work-around for Erratum CPU-A011 enabled\n");
+#endif
 #if defined(CONFIG_SYS_FSL_ERRATUM_DDR_MSYNC_IN)
 	puts("Work-around for DDR MSYNC_IN Erratum enabled\n");
 #endif
diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c
index f1ab28b..a32cada 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c
@@ -305,7 +305,8 @@ int cpu_init_r(void)
 	volatile fsl_lbc_t *lbc = LBC_BASE_ADDR;
 #endif
 
-#if defined(CONFIG_SYS_P4080_ERRATUM_CPU22)
+#if defined(CONFIG_SYS_P4080_ERRATUM_CPU22) || \
+    defined(CONFIG_SYS_FSL_ERRATUM_CPU_E500MC_A011)
 	flush_dcache();
 	mtspr(L1CSR2, (mfspr(L1CSR2) | L1CSR2_DCWS));
 	sync();
diff --git a/arch/powerpc/cpu/mpc85xx/release.S b/arch/powerpc/cpu/mpc85xx/release.S
index 6678ed4..272b3e6 100644
--- a/arch/powerpc/cpu/mpc85xx/release.S
+++ b/arch/powerpc/cpu/mpc85xx/release.S
@@ -137,7 +137,8 @@ __secondary_start_page:
 	mtspr	L1CSR2,r8
 #endif
 
-#if defined(CONFIG_SYS_P4080_ERRATUM_CPU22)
+#if defined(CONFIG_SYS_P4080_ERRATUM_CPU22) || \
+    defined(CONFIG_SYS_FSL_ERRATUM_CPU_E500MC_A011)
 	mfspr	r8,L1CSR2
 	oris	r8,r8,(L1CSR2_DCWS)@h
 	mtspr	L1CSR2,r8
diff --git a/arch/powerpc/include/asm/config_mpc85xx.h b/arch/powerpc/include/asm/config_mpc85xx.h
index ff93367..484654c 100644
--- a/arch/powerpc/include/asm/config_mpc85xx.h
+++ b/arch/powerpc/include/asm/config_mpc85xx.h
@@ -311,6 +311,7 @@
 #define CONFIG_SYS_FSL_USB1_PHY_ENABLE
 #define CONFIG_SYS_FSL_USB2_PHY_ENABLE
 #define CONFIG_SYS_FSL_USB_INTERNAL_UTMI_PHY
+#undef CONFIG_SYS_FSL_ERRATUM_CPU_E500MC_A011
 #define CONFIG_SYS_FSL_ERRATUM_ESDHC111
 #define CONFIG_SYS_FSL_ERRATUM_USBxx
 
@@ -330,6 +331,7 @@
 #define CONFIG_SYS_FSL_USB1_PHY_ENABLE
 #define CONFIG_SYS_FSL_USB2_PHY_ENABLE
 #define CONFIG_SYS_FSL_USB_INTERNAL_UTMI_PHY
+#undef CONFIG_SYS_FSL_ERRATUM_CPU_E500MC_A011
 #define CONFIG_SYS_FSL_ERRATUM_ESDHC111
 #define CONFIG_SYS_FSL_ERRATUM_USBxx
 
@@ -349,6 +351,7 @@
 #define CONFIG_SYS_FSL_USB1_PHY_ENABLE
 #define CONFIG_SYS_FSL_USB2_PHY_ENABLE
 #define CONFIG_SYS_FSL_USB_INTERNAL_UTMI_PHY
+#undef CONFIG_SYS_FSL_ERRATUM_CPU_E500MC_A011
 #define CONFIG_SYS_FSL_ERRATUM_ESDHC111
 #define CONFIG_SYS_FSL_ERRATUM_USBxx
 
-- 
1.7.3.4

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

* [U-Boot] [PATCH] powerpc/85xx: Add workaround for erratum CPU-A011 on e500mc cores
  2011-08-27 11:03 [U-Boot] [PATCH] powerpc/85xx: Add workaround for erratum CPU-A011 on e500mc cores Kumar Gala
@ 2011-08-27 11:36 ` Wolfgang Denk
  2011-08-27 12:01   ` Kumar Gala
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2011-08-27 11:36 UTC (permalink / raw)
  To: u-boot

Dear Kumar Gala,

In message <1314443032-2811-1-git-send-email-galak@kernel.crashing.org> you wrote:
> Issue:
> CoreNet bad data signal is not sent with shared data from L1 Data Cache
> when it has an error
> 
> Workaround:
> Run in write-shadow mode by setting L1CSR2[DCWS] = 1
> 
> By default we do NOT enable this, thus we have #undef in
> config_mpc85xx.h for this erratum.

NAK.  Please do not undef what is not defined anyway.

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
COBOL is for morons.                                 -- E.W. Dijkstra

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

* [U-Boot] [PATCH] powerpc/85xx: Add workaround for erratum CPU-A011 on e500mc cores
  2011-08-27 11:36 ` Wolfgang Denk
@ 2011-08-27 12:01   ` Kumar Gala
  2011-08-27 13:41     ` Wolfgang Denk
  0 siblings, 1 reply; 6+ messages in thread
From: Kumar Gala @ 2011-08-27 12:01 UTC (permalink / raw)
  To: u-boot


On Aug 27, 2011, at 6:36 AM, Wolfgang Denk wrote:

> Dear Kumar Gala,
> 
> In message <1314443032-2811-1-git-send-email-galak@kernel.crashing.org> you wrote:
>> Issue:
>> CoreNet bad data signal is not sent with shared data from L1 Data Cache
>> when it has an error
>> 
>> Workaround:
>> Run in write-shadow mode by setting L1CSR2[DCWS] = 1
>> 
>> By default we do NOT enable this, thus we have #undef in
>> config_mpc85xx.h for this erratum.
> 
> NAK.  Please do not undef what is not defined anyway.
> 
> Best regards,
> 
> Wolfgang Denk

Any suggestions on how to do this? - comment it out?

/* #define CONFIG_SYS_FSL_ERRATUM_CPU_E500MC_A011 */

- k

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

* [U-Boot] [PATCH] powerpc/85xx: Add workaround for erratum CPU-A011 on e500mc cores
  2011-08-27 12:01   ` Kumar Gala
@ 2011-08-27 13:41     ` Wolfgang Denk
  2011-08-27 16:09       ` Kumar Gala
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2011-08-27 13:41 UTC (permalink / raw)
  To: u-boot

Dear Kumar Gala,

In message <8D21ECF0-CB7E-4DDE-9F18-E1828FF5E8C2@kernel.crashing.org> you wrote:
> 
> Any suggestions on how to do this? - comment it out?
> 
> /* #define CONFIG_SYS_FSL_ERRATUM_CPU_E500MC_A011 */

That would be dead code.

You don't want to add all possible #defines to your config files, do
you?  This is not a good weay to document your code.

Apropos documentation - I did not see that you explain
CONFIG_SYS_FSL_ERRATUM_CPU_E500MC_A011 (or any other of the ton of
CONFIG_SYS_FSL_ERRATUM_* you have) in the readme, or elsewehere.

_This_ is what you should fix.

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 universe, they said, depended for its operation on the balance of
four forces which they identified as charm,  persuasion,  uncertainty
and bloody-mindedness.      -- Terry Pratchett, "The Light Fantastic"

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

* [U-Boot] [PATCH] powerpc/85xx: Add workaround for erratum CPU-A011 on e500mc cores
  2011-08-27 13:41     ` Wolfgang Denk
@ 2011-08-27 16:09       ` Kumar Gala
  2011-08-27 17:08         ` Wolfgang Denk
  0 siblings, 1 reply; 6+ messages in thread
From: Kumar Gala @ 2011-08-27 16:09 UTC (permalink / raw)
  To: u-boot


On Aug 27, 2011, at 8:41 AM, Wolfgang Denk wrote:

> Dear Kumar Gala,
> 
> In message <8D21ECF0-CB7E-4DDE-9F18-E1828FF5E8C2@kernel.crashing.org> you wrote:
>> 
>> Any suggestions on how to do this? - comment it out?
>> 
>> /* #define CONFIG_SYS_FSL_ERRATUM_CPU_E500MC_A011 */
> 
> That would be dead code.
> 
> You don't want to add all possible #defines to your config files, do
> you?  This is not a good weay to document your code.

Gotcha.

> 
> Apropos documentation - I did not see that you explain
> CONFIG_SYS_FSL_ERRATUM_CPU_E500MC_A011 (or any other of the ton of
> CONFIG_SYS_FSL_ERRATUM_* you have) in the readme, or elsewehere.
> 
> _This_ is what you should fix.

I'll add a general comment about CONFIG_SYS_FSL_ERRATUM_* in README and a new doc/README.fsl-ppc-errata if that sounds good.

- k

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

* [U-Boot] [PATCH] powerpc/85xx: Add workaround for erratum CPU-A011 on e500mc cores
  2011-08-27 16:09       ` Kumar Gala
@ 2011-08-27 17:08         ` Wolfgang Denk
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2011-08-27 17:08 UTC (permalink / raw)
  To: u-boot

Dear Kumar Gala,

In message <1A241F20-4DDB-4A57-8590-30735E9665A9@kernel.crashing.org> you wrote:
> 
> I'll add a general comment about CONFIG_SYS_FSL_ERRATUM_* in README and
> a new doc/README.fsl-ppc-errata if that sounds good.

Thanks, appreciated.

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
Looks clean and obviously correct to me, but then _everything_ I
write always looks obviously correct to me.  - Linus Torvalds in
<Pine.LNX.4.10.10012090054360.791-100000@penguin.transmeta.com>

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

end of thread, other threads:[~2011-08-27 17:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-27 11:03 [U-Boot] [PATCH] powerpc/85xx: Add workaround for erratum CPU-A011 on e500mc cores Kumar Gala
2011-08-27 11:36 ` Wolfgang Denk
2011-08-27 12:01   ` Kumar Gala
2011-08-27 13:41     ` Wolfgang Denk
2011-08-27 16:09       ` Kumar Gala
2011-08-27 17:08         ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.