mirror of
https://github.com/qemu/qemu.git
synced 2025-08-09 01:50:43 +00:00
hw/mips/r4k: Explicit CPU frequency is 200 MHz
Since its introduction in commit 6af0bf9c7c
,
the 'r4k' machine runs at 200 MHz.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20201012095804.3335117-14-f4bug@amsat.org>
This commit is contained in:
parent
7aaab96a9b
commit
dccf092d67
@ -13,6 +13,7 @@
|
|||||||
#include "qapi/error.h"
|
#include "qapi/error.h"
|
||||||
#include "qemu-common.h"
|
#include "qemu-common.h"
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
|
#include "hw/clock.h"
|
||||||
#include "hw/mips/mips.h"
|
#include "hw/mips/mips.h"
|
||||||
#include "hw/mips/cpudevs.h"
|
#include "hw/mips/cpudevs.h"
|
||||||
#include "hw/intc/i8259.h"
|
#include "hw/intc/i8259.h"
|
||||||
@ -182,6 +183,7 @@ void mips_r4k_init(MachineState *machine)
|
|||||||
MemoryRegion *isa_io = g_new(MemoryRegion, 1);
|
MemoryRegion *isa_io = g_new(MemoryRegion, 1);
|
||||||
MemoryRegion *isa_mem = g_new(MemoryRegion, 1);
|
MemoryRegion *isa_mem = g_new(MemoryRegion, 1);
|
||||||
int bios_size;
|
int bios_size;
|
||||||
|
Clock *cpuclk;
|
||||||
MIPSCPU *cpu;
|
MIPSCPU *cpu;
|
||||||
CPUMIPSState *env;
|
CPUMIPSState *env;
|
||||||
ResetData *reset_info;
|
ResetData *reset_info;
|
||||||
@ -192,8 +194,11 @@ void mips_r4k_init(MachineState *machine)
|
|||||||
DriveInfo *dinfo;
|
DriveInfo *dinfo;
|
||||||
int be;
|
int be;
|
||||||
|
|
||||||
|
cpuclk = clock_new(OBJECT(machine), "cpu-refclk");
|
||||||
|
clock_set_hz(cpuclk, 200000000); /* 200 MHz */
|
||||||
|
|
||||||
/* init CPUs */
|
/* init CPUs */
|
||||||
cpu = MIPS_CPU(cpu_create(machine->cpu_type));
|
cpu = mips_cpu_create_with_clock(machine->cpu_type, cpuclk);
|
||||||
env = &cpu->env;
|
env = &cpu->env;
|
||||||
|
|
||||||
reset_info = g_malloc0(sizeof(ResetData));
|
reset_info = g_malloc0(sizeof(ResetData));
|
||||||
|
Loading…
Reference in New Issue
Block a user