From: "Mark A. Greer" <mgreer@mvista.com>
To: akpm <akpm@osdl.org>
Cc: Embedded PPC Linux list <linuxppc-embedded@ozlabs.org>
Subject: [PATCH][PPC32] Workaround for mpc10x speculative PCI read erratum
Date: Thu, 27 Jan 2005 18:37:23 -0700 [thread overview]
Message-ID: <41F99753.9080500@mvista.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 279 bytes --]
824x and 107 bridges from Freescale/Tundra have an erratum where
speculative PCI reads may return stale data. One of the two documented
workarounds is to turn of speculative PCI reads. This patch does that.
Please apply.
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
--
[-- Attachment #2: mpc10x.patch --]
[-- Type: text/plain, Size: 1334 bytes --]
diff -Nru a/arch/ppc/syslib/mpc10x_common.c b/arch/ppc/syslib/mpc10x_common.c
--- a/arch/ppc/syslib/mpc10x_common.c 2005-01-27 18:31:21 -07:00
+++ b/arch/ppc/syslib/mpc10x_common.c 2005-01-27 18:31:21 -07:00
@@ -306,6 +306,23 @@
mpc10x_disable_store_gathering(hose);
#endif
+ /*
+ * 8240 erratum 26, 8241/8245 erratum 29, 107 erratum 23: speculative
+ * PCI reads may return stale data so turn off.
+ */
+ if ((host_bridge == MPC10X_BRIDGE_8240)
+ || (host_bridge == MPC10X_BRIDGE_8245)
+ || (host_bridge == MPC10X_BRIDGE_107)) {
+
+ early_read_config_dword(hose, 0, PCI_DEVFN(0,0),
+ MPC10X_CFG_PICR1_REG, &picr1);
+
+ picr1 &= ~MPC10X_CFG_PICR1_SPEC_PCI_RD;
+
+ early_write_config_dword(hose, 0, PCI_DEVFN(0,0),
+ MPC10X_CFG_PICR1_REG, picr1);
+ }
+
if (ppc_md.progress) ppc_md.progress("mpc10x:exit", 0x100);
return 0;
}
diff -Nru a/include/asm-ppc/mpc10x.h b/include/asm-ppc/mpc10x.h
--- a/include/asm-ppc/mpc10x.h 2005-01-27 18:31:21 -07:00
+++ b/include/asm-ppc/mpc10x.h 2005-01-27 18:31:21 -07:00
@@ -105,6 +105,7 @@
#define MPC10X_CFG_PICR1_ADDR_MAP_MASK 0x00010000
#define MPC10X_CFG_PICR1_ADDR_MAP_A 0x00010000
#define MPC10X_CFG_PICR1_ADDR_MAP_B 0x00000000
+#define MPC10X_CFG_PICR1_SPEC_PCI_RD 0x00000004
#define MPC10X_CFG_PICR1_ST_GATH_EN 0x00000040
#define MPC10X_CFG_MAPB_OPTIONS_REG 0xe0
reply other threads:[~2005-01-28 1:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41F99753.9080500@mvista.com \
--to=mgreer@mvista.com \
--cc=akpm@osdl.org \
--cc=linuxppc-embedded@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.