[U-Boot-Users] Bug in cpu/arm920t/imx/speed.c

22 Oct
2004
22 Oct
'04
9:03 a.m.
Hi there,
there are two bugs in cpu/arm920t/imx/speed.c preventing us from determine the correct speed of the processor.
CHANGELOG:
* Patch by Steven Scholz, 22 Oct 2004: - Fix masking bug in cpu/arm920t/imx/speed.c
--
Steven Scholz
imc Measurement & Control
Index: u-boot.SoC/cpu/arm920t/imx/speed.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/cpu/arm920t/imx/speed.c,v
retrieving revision 1.1
diff -u -r1.1 speed.c
--- u-boot.SoC/cpu/arm920t/imx/speed.c 9 Oct 2004 22:21:30 -0000 1.1
+++ u-boot.SoC/cpu/arm920t/imx/speed.c 22 Oct 2004 06:59:53 -0000
@@ -41,9 +41,9 @@
{
/* FIXME: We assume System_SEL = 0 here */
u32 spctl0 = SPCTL0;
+ u32 mfn = (spctl0 >> 0) & 0x3ff;
u32 mfi = (spctl0 >> 10) & 0xf;
- u32 mfn = spctl0 & 0x3f;
- u32 mfd = (spctl0 >> 16) & 0x3f;
+ u32 mfd = (spctl0 >> 16) & 0x3ff;
u32 pd = (spctl0 >> 26) & 0xf;
mfi = mfi<=5 ? 5 : mfi;
@@ -55,9 +55,9 @@
{
/* FIXME: We assume System_SEL = 0 here */
u32 mpctl0 = MPCTL0;
+ u32 mfn = (mpctl0 >> 0) & 0x3ff;
u32 mfi = (mpctl0 >> 10) & 0xf;
- u32 mfn = mpctl0 & 0x3f;
- u32 mfd = (mpctl0 >> 16) & 0x3f;
+ u32 mfd = (mpctl0 >> 16) & 0x3ff;
u32 pd = (mpctl0 >> 26) & 0xf;
mfi = mfi<=5 ? 5 : mfi;
@@ -74,7 +74,6 @@
ulong get_HCLK(void)
{
u32 bclkdiv = (( CSCR >> 10 ) & 0xf) + 1;
- printf("bclkdiv: %d\n", bclkdiv);
return get_systemPLLCLK() / bclkdiv;
}

23 Nov
23 Nov
3:16 p.m.
I wrote:
there are two bugs in cpu/arm920t/imx/speed.c preventing us from determine the correct speed of the processor.
CHANGELOG:
- Patch by Steven Scholz, 22 Oct 2004:
- Fix masking bug in cpu/arm920t/imx/speed.c
Just a reminder: The bug is still not fixed in CVS.
--
Steven
7469
Age (days ago)
7501
Last active (days ago)
1 comments
1 participants
participants (1)
-
Steven Scholz