summaryrefslogtreecommitdiff
path: root/hw/sh_timer.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-01 18:59:50 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-01 18:59:50 +0000
commit8da3ff180974732fc4272cb4433fef85c1822961 (patch)
treef23cfaffa61efb36aa46dfeb771ad33cbfd4f3aa /hw/sh_timer.c
parent6ad1d22b15c0a091edb1d8efc983c1d75f74ef45 (diff)
downloadqemu-8da3ff180974732fc4272cb4433fef85c1822961.tar.gz
Change MMIO callbacks to use offsets, not absolute addresses.
Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5849 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/sh_timer.c')
-rw-r--r--hw/sh_timer.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/hw/sh_timer.c b/hw/sh_timer.c
index 743a970a4b..4557a8354c 100644
--- a/hw/sh_timer.c
+++ b/hw/sh_timer.c
@@ -211,7 +211,6 @@ typedef struct {
int level[3];
uint32_t tocr;
uint32_t tstr;
- target_phys_addr_t base;
int feat;
} tmu012_state;
@@ -222,7 +221,6 @@ static uint32_t tmu012_read(void *opaque, target_phys_addr_t offset)
#ifdef DEBUG_TIMER
printf("tmu012_read 0x%lx\n", (unsigned long) offset);
#endif
- offset -= s->base;
if (offset >= 0x20) {
if (!(s->feat & TMU012_FEAT_3CHAN))
@@ -256,7 +254,6 @@ static void tmu012_write(void *opaque, target_phys_addr_t offset,
#ifdef DEBUG_TIMER
printf("tmu012_write 0x%lx 0x%08x\n", (unsigned long) offset, value);
#endif
- offset -= s->base;
if (offset >= 0x20) {
if (!(s->feat & TMU012_FEAT_3CHAN))
@@ -315,7 +312,6 @@ void tmu012_init(target_phys_addr_t base, int feat, uint32_t freq,
int timer_feat = (feat & TMU012_FEAT_EXTCLK) ? TIMER_FEAT_EXTCLK : 0;
s = (tmu012_state *)qemu_mallocz(sizeof(tmu012_state));
- s->base = base;
s->feat = feat;
s->timer[0] = sh_timer_init(freq, timer_feat, ch0_irq);
s->timer[1] = sh_timer_init(freq, timer_feat, ch1_irq);