u-boot/arch/powerpc/cpu
Scott Wood 33eee330cc powerpc/fsl-corenet: work around erratum A004510
Erratum A004510 says that under certain load conditions, modified
cache lines can be discarded, causing data corruption.

To work around this, several CCSR and DCSR register updates need to be
made in a careful manner, so that there is no other transaction in
corenet when the update is made.

The update is made from a locked cacheline, with a delay before to flush
any previous activity, and a delay after to flush the CCSR/DCSR update.
We can't use a readback because that would be another corenet
transaction, which is not allowed.

We lock the subsequent cacheline to prevent it from being fetched while
we're executing the previous cacheline.  It is filled with nops so that a
branch doesn't cause us to fetch another cacheline.

Ordinarily we are running in a cache-inhibited mapping at this point, so
we temporarily change that.  We make it guarded so that we should never
see a speculative load, and we never do an explicit load.  Thus, only the
I-cache should ever fill from this mapping, and we flush/unlock it
afterward.  Thus we should avoid problems from any potential cache
aliasing between inhibited and non-inhibited mappings.

NOTE that if PAMU is used with this patch, it will need to use a
dedicated LAW as described in the erratum.  This is the responsibility
of the OS that sets up PAMU.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
2012-08-23 12:16:54 -05:00
..
74xx_7xx unify version_string 2011-07-28 17:22:53 +02:00
mpc5xx unify version_string 2011-07-28 17:22:53 +02:00
mpc5xxx usb: replace wait_ms() with mdelay() 2012-03-19 00:08:16 +01:00
mpc8xx MPC8xx: Fixup warning in arch/powerpc/cpu/mpc8xx/cpu.c 2012-07-30 09:58:02 +02:00
mpc8xxx powerpc/85xx: remove support for the Freescale P3060 2012-08-23 12:16:53 -05:00
mpc83xx MPC83xx, MPC85xx: compile stub cache function 2012-07-21 23:37:48 +02:00
mpc85xx powerpc/fsl-corenet: work around erratum A004510 2012-08-23 12:16:54 -05:00
mpc86xx arch/powerpc/cpu/mpc86xx/cpu.c: Fix GCC 4.6 build warning 2011-12-02 00:16:46 +01:00
mpc512x MPC8xxx: Define cache ops for USB 2012-06-07 23:29:19 +02:00
mpc824x Reduce build times 2011-11-03 20:44:58 +01:00
mpc8220 arch/powerpc/cpu/mpc8220/fec.c: Fix compile warning 2012-05-22 13:41:46 -05:00
mpc8260 net: cosmetic: Un-typedef Ethernet_t 2012-05-23 17:46:14 -05:00
ppc4xx usb: replace wait_ms() with mdelay() 2012-03-19 00:08:16 +01:00