@@ -105,6 +105,23 @@ typedef struct ARMCPUInfo {
void (*class_init)(ARMCPUClass *klass, const struct ARMCPUInfo *info);
} ARMCPUInfo;
+static void ti925t_reset(CPUState *c)
+{
+ ARMCPU *cpu = ARM_CPU(c);
+ CPUARMState *env = &cpu->env;
+
+ arm_cpu_reset(c);
+
+ env->cp15.c0_cpuid = ARM_CPUID_TI925T; /* Depends on wiring. */
+}
+
+static void ti925t_class_init(ARMCPUClass *klass, const ARMCPUInfo *info)
+{
+ CPUClass *cpu_class = CPU_CLASS(klass);
+
+ cpu_class->reset = ti925t_reset;
+}
+
static const ARMCPUInfo arm_cpus[] = {
{
.name = "arm926",
@@ -157,6 +174,7 @@ static const ARMCPUInfo arm_cpus[] = {
{
.name = "ti925t",
.id = 0x54029252,
+ .class_init = ti925t_class_init,
},
{
.name = "sa1100",
@@ -196,7 +196,6 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id)
case ARM_CPUID_TI925T:
set_feature(env, ARM_FEATURE_V4T);
set_feature(env, ARM_FEATURE_OMAPCP);
- env->cp15.c0_cpuid = ARM_CPUID_TI925T; /* Depends on wiring. */
env->cp15.c0_cachetype = 0x5109149;
env->cp15.c1_sys = 0x00000070;
env->cp15.c15_i_max = 0x000;
The OMAPCP feature allows to switch between TI915T and TI925T via cp15 c15_ticonfig register. Move reset into ti925t-specific callback. Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Peter Maydell <peter.maydell@linaro.org> --- target-arm/cpu.c | 18 ++++++++++++++++++ target-arm/helper.c | 1 - 2 files changed, 18 insertions(+), 1 deletions(-)