aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-05-04 19:00:34 +0200
committerAndreas Färber <afaerber@suse.de>2012-06-04 23:00:41 +0200
commitb143559655d0b558627cd7b6f71ad350451e3b3b (patch)
tree26baa3c6c4a2d8fab2f644e686314da5e8026592 /hw
parent47dc4fa211aa3eaf408c9af521dcb3ad8e98ab65 (diff)
lm32_boards: Store LM32CPU in ResetInfo
Allows us to use cpu_reset() in place of cpu_state_reset() in main_cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael Walle <michael@walle.cc>
Diffstat (limited to 'hw')
-rw-r--r--hw/lm32_boards.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/lm32_boards.c b/hw/lm32_boards.c
index ffb273cbf5..b76d8008be 100644
--- a/hw/lm32_boards.c
+++ b/hw/lm32_boards.c
@@ -31,7 +31,7 @@
#include "exec-memory.h"
typedef struct {
- CPULM32State *env;
+ LM32CPU *cpu;
target_phys_addr_t bootstrap_pc;
target_phys_addr_t flash_base;
target_phys_addr_t hwsetup_base;
@@ -54,9 +54,9 @@ static void cpu_irq_handler(void *opaque, int irq, int level)
static void main_cpu_reset(void *opaque)
{
ResetInfo *reset_info = opaque;
- CPULM32State *env = reset_info->env;
+ CPULM32State *env = &reset_info->cpu->env;
- cpu_state_reset(env);
+ cpu_reset(CPU(reset_info->cpu));
/* init defaults */
env->pc = (uint32_t)reset_info->bootstrap_pc;
@@ -104,7 +104,7 @@ static void lm32_evr_init(ram_addr_t ram_size_not_used,
}
cpu = cpu_lm32_init(cpu_model);
env = &cpu->env;
- reset_info->env = env;
+ reset_info->cpu = cpu;
reset_info->flash_base = flash_base;
@@ -201,7 +201,7 @@ static void lm32_uclinux_init(ram_addr_t ram_size_not_used,
}
cpu = cpu_lm32_init(cpu_model);
env = &cpu->env;
- reset_info->env = env;
+ reset_info->cpu = cpu;
reset_info->flash_base = flash_base;