Revision 5f4ef08b hw/omap1.c

b/hw/omap1.c
1519 1519
{
1520 1520
    omap_clk clk;
1521 1521

  
1522
    if (value & (1 << 11))				/* SETARM_IDLE */
1523
        cpu_interrupt(s->env, CPU_INTERRUPT_HALT);
1522
    if (value & (1 << 11)) {                            /* SETARM_IDLE */
1523
        cpu_interrupt(&s->cpu->env, CPU_INTERRUPT_HALT);
1524
    }
1524 1525
    if (!(value & (1 << 10)))				/* WKUP_MODE */
1525 1526
        qemu_system_shutdown_request();	/* XXX: disable wakeup from IRQ */
1526 1527

  
......
1734 1735

  
1735 1736
    case 0x18:	/* DSP_SYSST */
1736 1737
        return (s->clkm.clocking_scheme << 11) | s->clkm.cold_start |
1737
                (s->env->halted << 6);	/* Quite useless... */
1738
                (s->cpu->env.halted << 6);      /* Quite useless... */
1738 1739
    }
1739 1740

  
1740 1741
    OMAP_BAD_REG(addr);
......
3701 3702
    omap_lpg_reset(mpu->led[0]);
3702 3703
    omap_lpg_reset(mpu->led[1]);
3703 3704
    omap_clkm_reset(mpu);
3704
    cpu_state_reset(mpu->env);
3705
    cpu_reset(CPU(mpu->cpu));
3705 3706
}
3706 3707

  
3707 3708
static const struct omap_map_s {
......
3751 3752
{
3752 3753
    struct omap_mpu_state_s *mpu = (struct omap_mpu_state_s *) opaque;
3753 3754

  
3754
    if (mpu->env->halted)
3755
        cpu_interrupt(mpu->env, CPU_INTERRUPT_EXITTB);
3755
    if (mpu->cpu->env.halted) {
3756
        cpu_interrupt(&mpu->cpu->env, CPU_INTERRUPT_EXITTB);
3757
    }
3756 3758
}
3757 3759

  
3758 3760
static const struct dma_irq_map omap1_dma_irq_map[] = {
......
3829 3831

  
3830 3832
    /* Core */
3831 3833
    s->mpu_model = omap310;
3832
    s->env = cpu_init(core);
3833
    if (!s->env) {
3834
    s->cpu = cpu_arm_init(core);
3835
    if (s->cpu == NULL) {
3834 3836
        fprintf(stderr, "Unable to find CPU definition\n");
3835 3837
        exit(1);
3836 3838
    }
......
3852 3854

  
3853 3855
    omap_clkm_init(system_memory, 0xfffece00, 0xe1008000, s);
3854 3856

  
3855
    cpu_irq = arm_pic_init_cpu(s->env);
3857
    cpu_irq = arm_pic_init_cpu(&s->cpu->env);
3856 3858
    s->ih[0] = qdev_create(NULL, "omap-intc");
3857 3859
    qdev_prop_set_uint32(s->ih[0], "size", 0x100);
3858 3860
    qdev_prop_set_ptr(s->ih[0], "clk", omap_findclk(s, "arminth_ck"));

Also available in: Unified diff