[linux-yocto] [PATCH 88/89] arm/mach-axxia: Work around. Requires a U-Boot with the other part of the work around.
Paul Butler
butler.paul at gmail.com
Sun Oct 27 12:48:25 PDT 2013
From: John Jacques <john.jacques at lsi.com>
Signed-off-by: John Jacques <john.jacques at lsi.com>
---
arch/arm/mach-axxia/platsmp.c | 50 +++++++++++++++++++++++++++++--------------
1 file changed, 34 insertions(+), 16 deletions(-)
diff --git a/arch/arm/mach-axxia/platsmp.c b/arch/arm/mach-axxia/platsmp.c
index 0984dea..4cf9c2f 100644
--- a/arch/arm/mach-axxia/platsmp.c
+++ b/arch/arm/mach-axxia/platsmp.c
@@ -41,7 +41,7 @@ extern void axxia_secondary_startup(void);
static void
flush_l3(void)
{
-#if 0
+
unsigned long hnf_offsets[] = {
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27
};
@@ -51,7 +51,7 @@ flush_l3(void)
void __iomem *dickens;
dickens = ioremap(0x2000000000, 0x1000000);
-
+#if 0
for (i = 0; i < (sizeof(hnf_offsets) / sizeof(unsigned long)); ++i) {
/* set state NOL3 */
writel(0x0, dickens + (0x10000 * hnf_offsets[i]) + 0x10);
@@ -70,26 +70,44 @@ flush_l3(void)
BUG();
}
- for (i = 0; i < (sizeof(hnf_offsets) / sizeof(unsigned long)); ++i) {
- /* set state FAM */
- writel(0x3, dickens + (0x10000 * hnf_offsets[i]) + 0x10);
- }
+#endif
- for (i = 0; i < (sizeof(hnf_offsets) / sizeof(unsigned long)); ++i) {
- retries = 10000;
- do {
- status = readl(dickens +
- (0x10000 * hnf_offsets[i]) + 0x18);
- udelay(1);
- } while ((0 < --retries) && (0xc != (status & 0xf)));
+ for (i=0;i < (sizeof(hnf_offsets) / sizeof(unsigned long)); ++i) {
+ status = readl(dickens + (0x10000 * hnf_offsets[i]) + 0x18);
- if (0 == retries)
- BUG();
+ /* If L3 not already set to FAM, set it to FAM*/
+ if ((status & 0xf) != 0xc) {
+ printk("JL: Switching L3s to FAM \n\r");
+
+ for (i = 0; i < (sizeof(hnf_offsets) /
+ sizeof(unsigned long)); ++i) {
+ /* set state FAM */
+ writel(0x3,
+ (dickens +
+ (0x10000 * hnf_offsets[i]) + 0x10));
+ }
+
+ for (i = 0; i < (sizeof(hnf_offsets) /
+ sizeof(unsigned long)); ++i) {
+ retries = 10000;
+
+ do {
+ status = readl(dickens +
+ (0x10000 *
+ hnf_offsets[i]) + 0x18);
+ udelay(1);
+ } while ((0 < --retries) &&
+ (0xc != (status & 0xf)));
+
+ if (0 == retries)
+ BUG();
+ }
+ }
}
iounmap(dickens);
-#endif
+
return;
}
--
1.8.3.4
More information about the linux-yocto
mailing list