aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2009-02-24 11:30:48 +0100
committerKim Phillips <kim.phillips@freescale.com>2009-03-05 18:21:29 -0600
commit1e7ed2565031e01abc18c713030a0a9829c07684 (patch)
tree116264406b0afeecc455ff92e9dca929867770a7
parent605f78e34a3f0103693b891f2573edd352e7d495 (diff)
downloadu-boot-linaro-stable-1e7ed2565031e01abc18c713030a0a9829c07684.tar.gz
83xx, kmeter: QE_ENET10 errata for Silicon Revision 2.1
old code implemented the QE_ENET10 errata only for Silicon Revision 2.0. New code reads now the Silicon Revision register and sets dependend on the Silicon Revision the values as advised in the QE_ENET10 errata. Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
-rw-r--r--board/keymile/kmeter1/kmeter1.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/board/keymile/kmeter1/kmeter1.c b/board/keymile/kmeter1/kmeter1.c
index 4f41f1d76..660d87b53 100644
--- a/board/keymile/kmeter1/kmeter1.c
+++ b/board/keymile/kmeter1/kmeter1.c
@@ -24,6 +24,7 @@
#include <miiphy.h>
#include <asm/io.h>
#include <asm/mmu.h>
+#include <asm/processor.h>
#include <pci.h>
#include <libfdt.h>
@@ -80,19 +81,22 @@ static int board_init_i2c_busses (void)
int board_early_init_r (void)
{
- void *reg = (void *)(CONFIG_SYS_IMMR + 0x14a8);
- u32 val;
+ unsigned short svid;
/*
* Because of errata in the UCCs, we have to write to the reserved
* registers to slow the clocks down.
*/
- val = in_be32 (reg);
- /* UCC1 */
- val |= 0x00003000;
- /* UCC2 */
- val |= 0x0c000000;
- out_be32 (reg, val);
+ svid = SVR_REV(mfspr (SVR));
+ switch (svid) {
+ case 0x0020:
+ setbits_be32((void *)(CONFIG_SYS_IMMR + 0x14a8), 0x0c003000);
+ break;
+ case 0x0021:
+ clrsetbits_be32((void *)(CONFIG_SYS_IMMR + 0x14ac),
+ 0x00000050, 0x000000a0);
+ break;
+ }
/* enable the PHY on the PIGGY */
setbits (8, (void *)(CONFIG_SYS_PIGGY_BASE + 0x10003), 0x01);