Skip to contentSkip to conversation

m68k: change default system clock for m5208evb

PATCH Applied Greg Ungerer 4 participants 7 messages Sep 28, 2016 – Sep 29, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 m68k: change default system clock for m5208evb

The shipping default setting for the Freescale M5208EVB board is to run the CPU at 166.67MHz. The current qemu emulation code for this board is defaulting to 66MHz. This results in time appearing to run way to slowly. So a "sleep 5" in a standard ColdFire Linux build takes almost 15 seconds in real time to actually complete.

Change the hard coded default to match the default hardware setting.

---
 hw/m68k/mcf5208.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

v2: more accurately set frequency (166666666 instead of 166000000)

hw/m68k/mcf5208.c +1 -1
index 9240ebf..3438314 100644
@@ -21,7 +21,7 @@
 #include "elf.h"
 #include "exec/address-spaces.h"
 
-#define SYS_FREQ 66000000
+#define SYS_FREQ 166666666
 
 #define PCSR_EN         0x0001
 #define PCSR_RLD        0x0002
Signature · 1 line
1.9.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 9 lines · Greg Ungerer

The shipping default setting for the Freescale M5208EVB board is to run the CPU at 166.67MHz. The current qemu emulation code for this board is defaulting to 66MHz. This results in time appearing to run way to slowly. So a "sleep 5" in a standard ColdFire Linux build takes almost 15 seconds in real time to actually complete.

Change the hard coded default to match the default hardware setting.

This solution is as good as another, so:

Quoted 20 lines
---
 hw/m68k/mcf5208.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

v2: more accurately set frequency (166666666 instead of 166000000)

hw/m68k/mcf5208.c +1 -1
index 9240ebf..3438314 100644
@@ -21,7 +21,7 @@
 #include "elf.h"
 #include "exec/address-spaces.h"
 
-#define SYS_FREQ 66000000
+#define SYS_FREQ 166666666
 
 #define PCSR_EN         0x0001
 #define PCSR_RLD        0x0002
Reviewed-by
#2 lore raw
Quoted 9 lines · Laurent Vivier
Quoted 6 lines · Greg Ungerer

The shipping default setting for the Freescale M5208EVB board is to run the CPU at 166.67MHz. The current qemu emulation code for this board is defaulting to 66MHz. This results in time appearing to run way to slowly. So a "sleep 5" in a standard ColdFire Linux build takes almost 15 seconds in real time to actually complete.

Quoted 7 lines
Quoted 3 lines

Change the hard coded default to match the default hardware setting.

This solution is as good as another, so:

Fine for me, too, so:

By the way, we still do not have a m68k maintainer yet ... Laurent, maybe you could finally send a pull request for that patch here:
https://lists.gnu.org/archive/html/qemu-devel/2016-05/msg00805.html ?

Meanwhile, Peter, could you please take this patch here from Greg directly? Or should it go via qemu-trivial instead?

Thomas

Quoted 21 lines
Quoted 20 lines
---
 hw/m68k/mcf5208.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

v2: more accurately set frequency (166666666 instead of 166000000)

hw/m68k/mcf5208.c +1 -1
index 9240ebf..3438314 100644
@@ -21,7 +21,7 @@
 #include "elf.h"
 #include "exec/address-spaces.h"
 
-#define SYS_FREQ 66000000
+#define SYS_FREQ 166666666
 
 #define PCSR_EN         0x0001
 #define PCSR_RLD        0x0002
#3 lore raw
Quoted 18 lines · Thomas Huth
Quoted 9 lines · Laurent Vivier
Quoted 6 lines · Greg Ungerer

The shipping default setting for the Freescale M5208EVB board is to run the CPU at 166.67MHz. The current qemu emulation code for this board is defaulting to 66MHz. This results in time appearing to run way to slowly. So a "sleep 5" in a standard ColdFire Linux build takes almost 15 seconds in real time to actually complete.

Quoted 7 lines
Quoted 3 lines

Change the hard coded default to match the default hardware setting.

This solution is as good as another, so:

Quoted 7 lines

Fine for me, too, so:

By the way, we still do not have a m68k maintainer yet ... Laurent, maybe you could finally send a pull request for that patch here:
https://lists.gnu.org/archive/html/qemu-devel/2016-05/msg00805.html ?

Well, this patch was waiting I resend my 680x0 support series, and I didn't have the time to rework it until now... but if you want to merge it as is, don't hesitate.

Thanks,
Laurent

#4 lore raw
In reply to Thomas Huth

Hi Thomas,

Quoted 14 lines · Thomas Huth
Quoted 13 lines · Laurent Vivier
Quoted 9 lines · Greg Ungerer

The shipping default setting for the Freescale M5208EVB board is to run the CPU at 166.67MHz. The current qemu emulation code for this board is defaulting to 66MHz. This results in time appearing to run way to slowly. So a "sleep 5" in a standard ColdFire Linux build takes almost 15 seconds in real time to actually complete.

Change the hard coded default to match the default hardware setting.

Quoted 7 lines
Quoted 3 lines

This solution is as good as another, so:

Fine for me, too, so:

Thanks for the review.

Regards
Greg

Quoted 33 lines

By the way, we still do not have a m68k maintainer yet ... Laurent, maybe you could finally send a pull request for that patch here:
https://lists.gnu.org/archive/html/qemu-devel/2016-05/msg00805.html ?

Meanwhile, Peter, could you please take this patch here from Greg directly? Or should it go via qemu-trivial instead?

Thomas

Quoted 21 lines
Quoted 20 lines
---
 hw/m68k/mcf5208.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

v2: more accurately set frequency (166666666 instead of 166000000)

hw/m68k/mcf5208.c +1 -1
index 9240ebf..3438314 100644
@@ -21,7 +21,7 @@
 #include "elf.h"
 #include "exec/address-spaces.h"
 
-#define SYS_FREQ 66000000
+#define SYS_FREQ 166666666
 
 #define PCSR_EN         0x0001
 #define PCSR_RLD        0x0002
#5 lore raw
In reply to Laurent Vivier

Hi Laurent,

Quoted 7 lines · Laurent Vivier
Quoted 6 lines · Greg Ungerer

The shipping default setting for the Freescale M5208EVB board is to run the CPU at 166.67MHz. The current qemu emulation code for this board is defaulting to 66MHz. This results in time appearing to run way to slowly. So a "sleep 5" in a standard ColdFire Linux build takes almost 15 seconds in real time to actually complete.

Quoted 7 lines
Quoted 3 lines

Change the hard coded default to match the default hardware setting.

This solution is as good as another, so:

Thanks for the review and comments, much appreciated.

Regards
Greg

Quoted 21 lines
Quoted 20 lines
---
 hw/m68k/mcf5208.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

v2: more accurately set frequency (166666666 instead of 166000000)

hw/m68k/mcf5208.c +1 -1
index 9240ebf..3438314 100644
@@ -21,7 +21,7 @@
 #include "elf.h"
 #include "exec/address-spaces.h"
 
-#define SYS_FREQ 66000000
+#define SYS_FREQ 166666666
 
 #define PCSR_EN         0x0001
 #define PCSR_RLD        0x0002