summary refs log tree commit diff stats
path: root/hw/sh7750.c
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-21 21:06:42 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-21 21:06:42 +0000
commit96e2fc41a94f190994dfb56d47d609a658bfe67c (patch)
tree07bb16d585c39d29d4006830ebc2b5a3e7e0133d /hw/sh7750.c
parent380ce5ba932724aa2bb2b8564ee4cc47cea15570 (diff)
downloadfocaccia-qemu-96e2fc41a94f190994dfb56d47d609a658bfe67c.tar.gz
focaccia-qemu-96e2fc41a94f190994dfb56d47d609a658bfe67c.zip
SH4: Use qemu_irq in timer emulation.
        * hw/sh.h (tmu012_init): Accept qemu_irq, not intc_source.
        * hw/sh7750.c (sh7750_init): Pass qemu_irq to tmu012_init.
        * hw/sh_intc.c (sh_intc_set_irq): New.
        (sh_intc_init): Allocate irqs.
        * hw/sh_intc.h (struct intc_desc): New field irqs.
        * hw/sh_timer.c (sh_timer_state): Use qemu_irq, not intc_source.
        (sh_timer_update): Use qemu_set_irq, not sh_intc_toggle_source.
        (sh_timer_init, tmu012_init): Adjust.

(Vladimir Prus)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5768 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/sh7750.c')
-rw-r--r--hw/sh7750.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/sh7750.c b/hw/sh7750.c
index 62c226e371..f04d13a6f6 100644
--- a/hw/sh7750.c
+++ b/hw/sh7750.c
@@ -678,10 +678,10 @@ SH7750State *sh7750_init(CPUSH4State * cpu)
     tmu012_init(0x1fd80000,
 		TMU012_FEAT_TOCR | TMU012_FEAT_3CHAN | TMU012_FEAT_EXTCLK,
 		s->periph_freq,
-		sh_intc_source(&s->intc, TMU0),
-		sh_intc_source(&s->intc, TMU1),
-		sh_intc_source(&s->intc, TMU2_TUNI),
-		sh_intc_source(&s->intc, TMU2_TICPI));
+		s->intc.irqs[TMU0],
+		s->intc.irqs[TMU1],
+		s->intc.irqs[TMU2_TUNI],
+		s->intc.irqs[TMU2_TICPI]);
 
     if (cpu->id & (SH_CPU_SH7750 | SH_CPU_SH7750S | SH_CPU_SH7751)) {
         sh_intc_register_sources(&s->intc,
@@ -700,8 +700,8 @@ SH7750State *sh7750_init(CPUSH4State * cpu)
 				 _INTC_ARRAY(vectors_tmu34),
 				 NULL, 0);
         tmu012_init(0x1e100000, 0, s->periph_freq,
-		    sh_intc_source(&s->intc, TMU3),
-		    sh_intc_source(&s->intc, TMU4),
+		    s->intc.irqs[TMU3],
+		    s->intc.irqs[TMU4],
 		    NULL, NULL);
     }