From: stroese <stroese>
Date: Thu, 20 Mar 2003 15:21:50 +0000 (+0000)
Subject: Set edge conditioning circuitry on PPC405GPr for compatibility to existing PPC405GP... 
X-Git-Tag: v2025.01-rc5-pxa1908~24006
X-Git-Url: http://git.dujemihanovic.xyz/img/static/%7B%7B%20%24.Site.BaseURL%20%7D%7Dposts/html/index.html?a=commitdiff_plain;h=38daa27d21c975c3285933e86c556d1dc69642f9;p=u-boot.git

Set edge conditioning circuitry on PPC405GPr for compatibility to existing PPC405GP designs.
---

diff --git a/cpu/ppc4xx/cpu_init.c b/cpu/ppc4xx/cpu_init.c
index 52d4650231..9bf180fcdc 100644
--- a/cpu/ppc4xx/cpu_init.c
+++ b/cpu/ppc4xx/cpu_init.c
@@ -124,6 +124,7 @@ int cpu_init_r (void)
 
 	bd_t *bd = gd->bd;
 	unsigned long reg;
+	uint pvr = get_pvr();
 
 	/*
 	 * Write Ethernetaddress into on-chip register
@@ -143,6 +144,15 @@ int cpu_init_r (void)
 	reg = reg << 8;
 	reg |= bd->bi_enetaddr[5];
 	out32 (EMAC_IAL, reg);
+
+	/*
+	 * Set edge conditioning circuitry on PPC405GPr
+	 * for compatibility to existing PPC405GP designs.
+	 */
+	if ((pvr & 0xfffffff0) == (PVR_405GPR_RA & 0xfffffff0)) {
+		mtdcr(ecr, 0x60606000);
+	}
+
 #endif  /* CONFIG_405GP */
 	return (0);
 }