83xx, kmeter: QE_ENET10 errata for Silicon Revision 2.1
PATCH 8/12 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.
Also added missing get_svr() in cpu/mpc83xx/start.S to read the Silicon Revision register.
--- board/keymile/kmeter1/kmeter1.c | 20 ++++++++++++-------- cpu/mpc83xx/start.S | 5 +++++ 2 files changed, 17 insertions(+), 8 deletions(-)
board/keymile/kmeter1/kmeter1.c +12 -8
@@ -80,19 +80,23 @@ 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; + svid = (unsigned short )get_svr ();/* * 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); +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 );
cpu/mpc83xx/start.S +5 -0
@@ -137,6 +137,11 @@ get_pvr: mfspr r3, PVR blr + .globl get_svr +get_svr: + mfspr r3, SVR + blr + .globl ppcDWstore ppcDWstore: lfd 1, 0(r4)
Signature · 5 lines
1.6.0.6 -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 8/12 83xx, kmeter: QE_ENET10 errata for Silicon Revision 2.1
board/keymile/kmeter1/kmeter1.c static int board_init_i2c_busses (void) · line 91
Quoted 2 lines · On Wed, 11 Feb 2009 19:26:22 +0100 Heiko Schocher <[email protected]> wrote:
board/keymile/kmeter1/kmeter1.c +2
-0+switch (svid) { +case 0x0020 :
'case' should be aligned directly under 'switch'.
cpu/mpc83xx/start.S get_pvr: · line 144
Quoted 10 lines
+++
b/cpu/mpc83xx/start.Scpu/mpc83xx/start.S +5
-0@@ -137,6 +137,11 @@ get_pvr: mfspr r3, PVR blr + .globl get_svr +get_svr: + mfspr r3, SVR + blr +
on a ./MAKEALL SIMPC8313_LP, I'm getting:
powerpc-linux-gnu-ld: NAND bootstrap too big
powerpc-linux-gnu-ld: NAND bootstrap too big
make[1]: *** [/home/r1aaha/git/u-boot/nand_spl/u-boot-spl] Error 1
make: *** [nand_spl] Error 2
make: *** Waiting for unfinished jobs....
powerpc-linux-gnu-size: './u-boot': No such file
and I think (because I haven't verified it), it's because of the above addition to start.S; Can you please look into moving this fn elsewhere
- see commit 455a4691 and test rebuilding the SIMPC board?
Thank you,
Kim
PATCH 8/12 83xx, kmeter: QE_ENET10 errata for Silicon Revision 2.1
Hello Kim,
Quoted 21 lines · Kim Phillips
board/keymile/kmeter1/kmeter1.c static int board_init_i2c_busses (void) · line 91
Quoted 2 lines · On Wed, 11 Feb 2009 19:26:22 +0100 Heiko Schocher <[email protected]> wrote:
board/keymile/kmeter1/kmeter1.c +2
-0+switch (svid) { +case 0x0020 :'case' should be aligned directly under 'switch'.
cpu/mpc83xx/start.S get_pvr: · line 144
Quoted 10 lines
+++
b/cpu/mpc83xx/start.Scpu/mpc83xx/start.S +5
-0@@ -137,6 +137,11 @@ get_pvr: mfspr r3, PVR blr + .globl get_svr +get_svr: + mfspr r3, SVR + blr +on a ./MAKEALL
SIMPC8313_LP, I'm getting:
Quoted 6 lines
powerpc-linux-gnu-ld: NAND bootstrap too big
powerpc-linux-gnu-ld: NAND bootstrap too big
make[1]: *** [/home/r1aaha/git/u-boot/nand_spl/u-boot-spl] Error 1
make: *** [nand_spl] Error 2
make: *** Waiting for unfinished jobs....
powerpc-linux-gnu-size: './u-boot': No such file
Hmm.. with actual u-boot I get for this board (without my patches):
[hs at pollux u-boot]$ ./MAKEALL SIMPC8313_LP
...Large Page NAND...Configuring for SIMPC8313 board...
In file included from /home/hs/U-Boot-Patches/u-boot/include/config.h:5,
from include/common.h:35:/home/hs/U-Boot-Patches/u-boot/include/configs/SIMPC8313.h:81:1: warning: "CONFIG_MAX_MEM_MAPPED" redefined In file included from /home/hs/U-Boot-Patches/u-boot/include/config.h:4,
from include/common.h:35:/home/hs/U-Boot-Patches/u-boot/include/asm/config.h:28:1: warning: this is the location of the previous definition In file included from /home/hs/U-Boot-Patches/u-boot/include/config.h:5,
from start.S:30:
[...]
also with actual u-boot-mpc83xx.git:
[hs at pollux u-boot-mpc83xx]$ ./MAKEALL SIMPC8313_LP
...Large Page NAND...Configuring for SIMPC8313 board...
In file included from /home/hs/U-Boot-Patches/u-boot-mpc83xx/include/config.h:5,
from include/common.h:35:/home/hs/U-Boot-Patches/u-boot-mpc83xx/include/configs/SIMPC8313.h:81:1: warning: "CONFIG_MAX_MEM_MAPPED" redefined In file included from /home/hs/U-Boot-Patches/u-boot-mpc83xx/include/config.h:4,
from include/common.h:35:
[...]
Quoted 2 lines
and I think (because I haven't verified it), it's because of the above addition to
start.S; Can you please look into moving this fn elsewhere
Yes, that seems plausible, but see above, I didn;t get this error with actual u-boot-mpc83xx.git nor with actual u-boot.
Quoted 1 line
- see commit
455a4691and test rebuilding the SIMPC board?
Yes, I try to move get_svr to cpu.c?
thanks
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 8/12 83xx, kmeter: QE_ENET10 errata for Silicon Revision 2.1
Hello Kim,
Quoted 38 lines · Heiko Schocher
Quoted 19 lines · Kim Phillips
board/keymile/kmeter1/kmeter1.c static int board_init_i2c_busses (void) · line 91
Quoted 2 lines · On Wed, 11 Feb 2009 19:26:22 +0100 Heiko Schocher <[email protected]> wrote:
board/keymile/kmeter1/kmeter1.c +2
-0+switch (svid) { +case 0x0020 :'case' should be aligned directly under 'switch'.
cpu/mpc83xx/start.S get_pvr: · line 144
Quoted 10 lines
+++
b/cpu/mpc83xx/start.Scpu/mpc83xx/start.S +5
-0@@ -137,6 +137,11 @@ get_pvr: mfspr r3, PVR blr + .globl get_svr +get_svr: + mfspr r3, SVR + blr +on a ./MAKEALL
SIMPC8313_LP, I'm getting:Quoted 6 lines
powerpc-linux-gnu-ld: NAND bootstrap too big
powerpc-linux-gnu-ld: NAND bootstrap too big
make[1]: *** [/home/r1aaha/git/u-boot/nand_spl/u-boot-spl] Error 1
make: *** [nand_spl] Error 2
make: *** Waiting for unfinished jobs....
powerpc-linux-gnu-size: './u-boot': No such fileHmm.. with actual u-boot I get for this board (without my patches):
[hs at pollux u-boot]$ ./MAKEALL
SIMPC8313_LP
...Large Page NAND...Configuring for SIMPC8313 board...
In file included from/home/hs/U-Boot-Patches/u-boot/include/config.h:5,
frominclude/common.h:35:/home/hs/U-Boot-Patches/u-boot/include/configs/SIMPC8313.h:81:1: warning: "CONFIG_MAX_MEM_MAPPED" redefined In file included from/home/hs/U-Boot-Patches/u-boot/include/config.h:4,
frominclude/common.h:35:/home/hs/U-Boot-Patches/u-boot/include/asm/config.h:28:1: warning: this is the location of the previous definition In file included from/home/hs/U-Boot-Patches/u-boot/include/config.h:5,
Quoted 2 lines
from start.S:30:[...]
I was to fast, i get the error (I just have to wait for the end of the above warnings):
[hs at pollux u-boot]$ ./MAKEALL SIMPC8313_LP
...Large Page NAND...Configuring for SIMPC8313 board...
In file included from /home/hs/U-Boot-Patches/u-boot/include/config.h:5,
from include/common.h:35:
[..]/home/hs/U-Boot-Patches/u-boot/include/asm/config.h:28:1: warning: this is the location of the previous definition
ppc_82xx-ld: NAND bootstrap too big
ppc_82xx-ld: NAND bootstrap too big
make[1]: *** [/home/hs/U-Boot-Patches/u-boot/nand_spl/u-boot-spl] Fehler 1
make: *** [nand_spl] Fehler 2
make: *** Warte auf noch nicht beendete Prozesse...
ppc_82xx-size: './u-boot': No such file
[hs at pollux u-boot]$
I get this error just with actual u-boot.
bye
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 8/12 83xx, kmeter: QE_ENET10 errata for Silicon Revision 2.1
In reply to Kim PhillipsQuoted 28 lines · Kim Phillips
board/keymile/kmeter1/kmeter1.c static int board_init_i2c_busses (void) · line 91
Quoted 2 lines · On Wed, 11 Feb 2009 19:26:22 +0100 Heiko Schocher <[email protected]> wrote:
board/keymile/kmeter1/kmeter1.c +2
-0+switch (svid) { +case 0x0020 :'case' should be aligned directly under 'switch'.
cpu/mpc83xx/start.S get_pvr: · line 144
Quoted 10 lines
+++
b/cpu/mpc83xx/start.Scpu/mpc83xx/start.S +5
-0@@ -137,6 +137,11 @@ get_pvr: mfspr r3, PVR blr + .globl get_svr +get_svr: + mfspr r3, SVR + blr +on a ./MAKEALL
SIMPC8313_LP, I'm getting:powerpc-linux-gnu-ld: NAND bootstrap too big
powerpc-linux-gnu-ld: NAND bootstrap too big
make[1]: *** [/home/r1aaha/git/u-boot/nand_spl/u-boot-spl] Error 1
make: *** [nand_spl] Error 2
make: *** Waiting for unfinished jobs....
powerpc-linux-gnu-size: './u-boot': No such file
Quoted 3 lines
and I think (because I haven't verified it), it's because of the above addition to
start.S; Can you please look into moving this fn elsewhere
- see commit455a4691and test rebuilding the SIMPC board?
Seems like both get_pvr and get_svr should really be inline functions.
-Scott
PATCH 8/12 83xx, kmeter: QE_ENET10 errata for Silicon Revision 2.1
In reply to Heiko SchocherQuoted 9 lines · On Tue, 17 Feb 2009 09:54:51 +0100 Heiko Schocher <[email protected]> wrote:
ppc_82xx-ld: NAND bootstrap too big
ppc_82xx-ld: NAND bootstrap too big
make[1]: *** [/home/hs/U-Boot-Patches/u-boot/nand_spl/u-boot-spl] Fehler 1
make: *** [nand_spl] Fehler 2
make: *** Warte auf noch nicht beendete Prozesse...
ppc_82xx-size: './u-boot': No such file
[hs at pollux u-boot]$I get this error just with actual u-boot.
now that I've verified it, I see it too. I bisected it:
bced7ccefa08512c54a6d146658ff7dbc33d5dfe is first bad commit commit bced7ccefa08512c54a6d146658ff7dbc33d5dfe
Author: Kumar Gala <[email protected]> Date: Fri Feb 6 08:08:06 2009 -0600
ppc: Fix roll over bug in flush_cache()
If we call flush_cache(0xfffff000, 0x1000) it would never
terminate the loop since end = 0xffffffff and we'd roll over
our counter from 0xfffffe0 to 0 (assuming a 32-byte cache line)
Signed-off-by: Kumar Gala <[email protected]>the extra checks this patch makes makes flush_cache() consume a mere 16 more bytes, which makes the SIMPC8313 build fail.
I don't see an easy way out of this that satisfies everyone. Ideas?
Kim
PATCH 8/12 83xx, kmeter: QE_ENET10 errata for Silicon Revision 2.1
Quoted 29 lines · Kim Phillips
Quoted 10 lines · On Tue, 17 Feb 2009 09:54:51 +0100 Heiko Schocher <[email protected]> wrote:
ppc_82xx-ld: NAND bootstrap too big
ppc_82xx-ld: NAND bootstrap too big
make[1]: *** [/home/hs/U-Boot-Patches/u-boot/nand_spl/u-boot-spl] Fehler 1
make: *** [nand_spl] Fehler 2
make: *** Warte auf noch nicht beendete Prozesse...
ppc_82xx-size: './u-boot': No such file
[hs at pollux u-boot]$I get this error just with actual u-boot.
now that I've verified it, I see it too. I bisected it:
bced7ccefa08512c54a6d146658ff7dbc33d5dfeis first bad commit commitbced7ccefa08512c54a6d146658ff7dbc33d5dfeAuthor: Kumar Gala <[email protected]> Date: Fri Feb 6 08:08:06 2009 -0600ppc: Fix roll over bug in
flush_cache()If we call
flush_cache(0xfffff000, 0x1000)it would never terminate the loop since end =0xffffffffand we'd roll over our counter from0xfffffe0to 0 (assuming a 32-byte cache line)Signed-off-by Kumar Gala <[email protected]>
Quoted 7 lines
the extra checks this patch makes makes
flush_cache()consume a mere 16
more bytes, which makes the SIMPC8313 build fail.I don't see an easy way out of this that satisfies everyone. Ideas?
Kim
what params is flush_cache() being called width on SIMC8313?
- k
PATCH 8/12 83xx, kmeter: QE_ENET10 errata for Silicon Revision 2.1
Quoted 36 lines · Kumar Gala
Quoted 33 lines · Kim Phillips
Quoted 10 lines · On Tue, 17 Feb 2009 09:54:51 +0100 Heiko Schocher <[email protected]> wrote:
ppc_82xx-ld: NAND bootstrap too big
ppc_82xx-ld: NAND bootstrap too big
make[1]: *** [/home/hs/U-Boot-Patches/u-boot/nand_spl/u-boot-spl] Fehler 1
make: *** [nand_spl] Fehler 2
make: *** Warte auf noch nicht beendete Prozesse...
ppc_82xx-size: './u-boot': No such file
[hs at pollux u-boot]$I get this error just with actual u-boot.
now that I've verified it, I see it too. I bisected it:
bced7ccefa08512c54a6d146658ff7dbc33d5dfeis first bad commit commitbced7ccefa08512c54a6d146658ff7dbc33d5dfeAuthor: Kumar Gala <[email protected]> Date: Fri Feb 6 08:08:06 2009 -0600ppc: Fix roll over bug in
flush_cache()If we call
flush_cache(0xfffff000, 0x1000)it would never terminate the loop since end =0xffffffffand we'd roll over our counter from0xfffffe0to 0 (assuming a 32-byte cache line)Signed-off-by Kumar Gala <[email protected]>the extra checks this patch makes makes
flush_cache()consume a mere 16
more bytes, which makes the SIMPC8313 build fail.
Quoted 5 lines
Quoted 3 lines
I don't see an easy way out of this that satisfies everyone. Ideas?
Kim
what params is
flush_cache()being called width on SIMC8313?
As I read back through the thread I see its not the change in runtime its the fact that the code is bigger that is causing issues. I can't really help on that front.
- k
PATCH 8/12 83xx, kmeter: QE_ENET10 errata for Silicon Revision 2.1
In reply to Kim PhillipsQuoted 4 lines · Kim Phillips
the extra checks this patch makes makes
flush_cache()consume a mere 16 more bytes, which makes the SIMPC8313 build fail.I don't see an easy way out of this that satisfies everyone. Ideas?
Trim some bytes from elsewhere. Statically determine large v. small page, for example.
-Scott
PATCH 8/12 83xx, kmeter: QE_ENET10 errata for Silicon Revision 2.1
Quoted 8 lines · On Wed, 18 Feb 2009 11:20:18 -0600 Scott Wood <[email protected]> wrote:
Quoted 4 lines · Kim Phillips
the extra checks this patch makes makes
flush_cache()consume a mere 16 more bytes, which makes the SIMPC8313 build fail.I don't see an easy way out of this that satisfies everyone. Ideas?
Trim some bytes from elsewhere. Statically determine large v. small page, for example.
thanks, turns out a pending patch from Ron already fixes it:
http://lists.denx.de/pipermail/u-boot/2009-February/047793.html
Kim