<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>[PATCH] PPC4xx: Memory Queue Optimizations for PPC460EX/GT</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<BR>
<P><FONT SIZE=2>Set PL44 Arbiter Read pipeline depth to 4<BR>
Optimize Memory Queue Configuration registers for PPC460EX/GT<BR>
<BR>
Signed-off-by: Prodyut Hazarika <phazarika@amcc.com><BR>
---<BR>
board/amcc/canyonlands/canyonlands.c | 9 +++<BR>
cpu/ppc4xx/44x_spd_ddr2.c | 4 +<BR>
include/ppc440.h | 101 ++++++++++++++++++----------------<BR>
3 files changed, 66 insertions(+), 48 deletions(-)<BR>
<BR>
diff --git a/board/amcc/canyonlands/canyonlands.c b/board/amcc/canyonlands/canyonlands.c<BR>
index e9eba49..dd285bc 100644<BR>
--- a/board/amcc/canyonlands/canyonlands.c<BR>
+++ b/board/amcc/canyonlands/canyonlands.c<BR>
@@ -113,6 +113,15 @@ int board_early_init_f(void)<BR>
mtdcr(AHB_TOP, 0x8000004B);<BR>
mtdcr(AHB_BOT, 0x8000004B);<BR>
<BR>
+ mtdcr(plb0_acr, plb0_acr_ppm_fair |<BR>
+ plb0_acr_hbu_enabled |<BR>
+ plb0_acr_rdp_4deep |<BR>
+ plb0_acr_wrp_2deep);<BR>
+ mtdcr(plb1_acr, plb1_acr_ppm_fair |<BR>
+ plb1_acr_hbu_enabled |<BR>
+ plb1_acr_rdp_4deep |<BR>
+ plb1_acr_wrp_2deep);<BR>
+<BR>
if ((pvr == PVR_460EX_RA) || (pvr == PVR_460EX_SE_RA)) {<BR>
/*<BR>
* Configure USB-STP pins as alternate and not GPIO<BR>
diff --git a/cpu/ppc4xx/44x_spd_ddr2.c b/cpu/ppc4xx/44x_spd_ddr2.c<BR>
index e9940e8..c222507 100644<BR>
--- a/cpu/ppc4xx/44x_spd_ddr2.c<BR>
+++ b/cpu/ppc4xx/44x_spd_ddr2.c<BR>
@@ -2251,6 +2251,10 @@ static void program_memory_queue(unsigned long *dimm_populated,<BR>
*/<BR>
mtdcr(SDRAM_PLBADDULL, 0x00000000); /* MQ0_BAUL */<BR>
mtdcr(SDRAM_PLBADDUHB, 0x00000008); /* MQ0_BAUH */<BR>
+<BR>
+ mtdcr(SDRAM_CONF1HB, 0x80001c80);<BR>
+ mtdcr(SDRAM_CONF1LL, 0x80001c80);<BR>
+ mtdcr(SDRAM_CONFPATHB, 0x18a68000);<BR>
#endif<BR>
}<BR>
<BR>
diff --git a/include/ppc440.h b/include/ppc440.h<BR>
index c581f1b..650ee4f 100644<BR>
--- a/include/ppc440.h<BR>
+++ b/include/ppc440.h<BR>
@@ -422,53 +422,6 @@<BR>
<BR>
#define PLB4_ACR_WRP (0x80000000 >> 7)<BR>
<BR>
-/* Nebula PLB4 Arbiter - PowerPC440EP */<BR>
-#define PLB_ARBITER_BASE 0x80<BR>
-<BR>
-#define plb0_revid (PLB_ARBITER_BASE+ 0x00)<BR>
-#define plb0_acr (PLB_ARBITER_BASE+ 0x01)<BR>
-#define plb0_acr_ppm_mask 0xF0000000<BR>
-#define plb0_acr_ppm_fixed 0x00000000<BR>
-#define plb0_acr_ppm_fair 0xD0000000<BR>
-#define plb0_acr_hbu_mask 0x08000000<BR>
-#define plb0_acr_hbu_disabled 0x00000000<BR>
-#define plb0_acr_hbu_enabled 0x08000000<BR>
-#define plb0_acr_rdp_mask 0x06000000<BR>
-#define plb0_acr_rdp_disabled 0x00000000<BR>
-#define plb0_acr_rdp_2deep 0x02000000<BR>
-#define plb0_acr_rdp_3deep 0x04000000<BR>
-#define plb0_acr_rdp_4deep 0x06000000<BR>
-#define plb0_acr_wrp_mask 0x01000000<BR>
-#define plb0_acr_wrp_disabled 0x00000000<BR>
-#define plb0_acr_wrp_2deep 0x01000000<BR>
-<BR>
-#define plb0_besrl (PLB_ARBITER_BASE+ 0x02)<BR>
-#define plb0_besrh (PLB_ARBITER_BASE+ 0x03)<BR>
-#define plb0_bearl (PLB_ARBITER_BASE+ 0x04)<BR>
-#define plb0_bearh (PLB_ARBITER_BASE+ 0x05)<BR>
-#define plb0_ccr (PLB_ARBITER_BASE+ 0x08)<BR>
-<BR>
-#define plb1_acr (PLB_ARBITER_BASE+ 0x09)<BR>
-#define plb1_acr_ppm_mask 0xF0000000<BR>
-#define plb1_acr_ppm_fixed 0x00000000<BR>
-#define plb1_acr_ppm_fair 0xD0000000<BR>
-#define plb1_acr_hbu_mask 0x08000000<BR>
-#define plb1_acr_hbu_disabled 0x00000000<BR>
-#define plb1_acr_hbu_enabled 0x08000000<BR>
-#define plb1_acr_rdp_mask 0x06000000<BR>
-#define plb1_acr_rdp_disabled 0x00000000<BR>
-#define plb1_acr_rdp_2deep 0x02000000<BR>
-#define plb1_acr_rdp_3deep 0x04000000<BR>
-#define plb1_acr_rdp_4deep 0x06000000<BR>
-#define plb1_acr_wrp_mask 0x01000000<BR>
-#define plb1_acr_wrp_disabled 0x00000000<BR>
-#define plb1_acr_wrp_2deep 0x01000000<BR>
-<BR>
-#define plb1_besrl (PLB_ARBITER_BASE+ 0x0A)<BR>
-#define plb1_besrh (PLB_ARBITER_BASE+ 0x0B)<BR>
-#define plb1_bearl (PLB_ARBITER_BASE+ 0x0C)<BR>
-#define plb1_bearh (PLB_ARBITER_BASE+ 0x0D)<BR>
-<BR>
/* Pin Function Control Register 1 */<BR>
#define SDR0_PFC1 0x4101<BR>
#define SDR0_PFC1_U1ME_MASK 0x02000000 /* UART1 Mode Enable */<BR>
@@ -742,7 +695,59 @@<BR>
#define SDR0_PFC1_PLB_PME_PLB4_SEL 0x00001000 /* PLB3 Performance Monitor Enable */<BR>
#define SDR0_PFC1_GFGGI_MASK 0x0000000F /* GPT Frequency Generation Gated In */<BR>
<BR>
-#endif /* 440EP || 440GR || 440EPX || 440GRX */<BR>
+#endif /* 440EP || 440GR || 440EPX || 440GRX */<BR>
+<BR>
+#if defined(CONFIG_440EP) || defined(CONFIG_440GR) || \<BR>
+ defined(CONFIG_440EPX) || defined(CONFIG_440GRX) || \<BR>
+ defined(CONFIG_460EX) || defined(CONFIG_460GT)<BR>
+<BR>
+#define PLB_ARBITER_BASE 0x80<BR>
+<BR>
+#define plb0_revid (PLB_ARBITER_BASE+ 0x00)<BR>
+#define plb0_acr (PLB_ARBITER_BASE+ 0x01)<BR>
+#define plb0_acr_ppm_mask 0xF0000000<BR>
+#define plb0_acr_ppm_fixed 0x00000000<BR>
+#define plb0_acr_ppm_fair 0xD0000000<BR>
+#define plb0_acr_hbu_mask 0x08000000<BR>
+#define plb0_acr_hbu_disabled 0x00000000<BR>
+#define plb0_acr_hbu_enabled 0x08000000<BR>
+#define plb0_acr_rdp_mask 0x06000000<BR>
+#define plb0_acr_rdp_disabled 0x00000000<BR>
+#define plb0_acr_rdp_2deep 0x02000000<BR>
+#define plb0_acr_rdp_3deep 0x04000000<BR>
+#define plb0_acr_rdp_4deep 0x06000000<BR>
+#define plb0_acr_wrp_mask 0x01000000<BR>
+#define plb0_acr_wrp_disabled 0x00000000<BR>
+#define plb0_acr_wrp_2deep 0x01000000<BR>
+<BR>
+#define plb0_besrl (PLB_ARBITER_BASE+ 0x02)<BR>
+#define plb0_besrh (PLB_ARBITER_BASE+ 0x03)<BR>
+#define plb0_bearl (PLB_ARBITER_BASE+ 0x04)<BR>
+#define plb0_bearh (PLB_ARBITER_BASE+ 0x05)<BR>
+#define plb0_ccr (PLB_ARBITER_BASE+ 0x08)<BR>
+<BR>
+#define plb1_acr (PLB_ARBITER_BASE+ 0x09)<BR>
+#define plb1_acr_ppm_mask 0xF0000000<BR>
+#define plb1_acr_ppm_fixed 0x00000000<BR>
+#define plb1_acr_ppm_fair 0xD0000000<BR>
+#define plb1_acr_hbu_mask 0x08000000<BR>
+#define plb1_acr_hbu_disabled 0x00000000<BR>
+#define plb1_acr_hbu_enabled 0x08000000<BR>
+#define plb1_acr_rdp_mask 0x06000000<BR>
+#define plb1_acr_rdp_disabled 0x00000000<BR>
+#define plb1_acr_rdp_2deep 0x02000000<BR>
+#define plb1_acr_rdp_3deep 0x04000000<BR>
+#define plb1_acr_rdp_4deep 0x06000000<BR>
+#define plb1_acr_wrp_mask 0x01000000<BR>
+#define plb1_acr_wrp_disabled 0x00000000<BR>
+#define plb1_acr_wrp_2deep 0x01000000<BR>
+<BR>
+#define plb1_besrl (PLB_ARBITER_BASE+ 0x0A)<BR>
+#define plb1_besrh (PLB_ARBITER_BASE+ 0x0B)<BR>
+#define plb1_bearl (PLB_ARBITER_BASE+ 0x0C)<BR>
+#define plb1_bearh (PLB_ARBITER_BASE+ 0x0D)<BR>
+<BR>
+#endif /* 440EP || 440GR || 440EPX || 440GR || 460EX || 460GT */<BR>
<BR>
/*-----------------------------------------------------------------------------<BR>
| L2 Cache<BR>
</FONT>
</P>
</BODY>
</HTML>