[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 148/173] etraxfs_timer: Rename etrax_timer to ETRAXTi
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PULL 148/173] etraxfs_timer: Rename etrax_timer to ETRAXTimerState |
Date: |
Mon, 29 Jul 2013 21:20:05 +0200 |
Signed-off-by: Andreas Färber <address@hidden>
---
hw/timer/etraxfs_timer.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/hw/timer/etraxfs_timer.c b/hw/timer/etraxfs_timer.c
index 6dd1072..7e9807d 100644
--- a/hw/timer/etraxfs_timer.c
+++ b/hw/timer/etraxfs_timer.c
@@ -42,7 +42,7 @@
#define R_INTR 0x50
#define R_MASKED_INTR 0x54
-struct etrax_timer {
+typedef struct ETRAXTimerState {
SysBusDevice busdev;
MemoryRegion mmio;
qemu_irq irq;
@@ -72,12 +72,12 @@ struct etrax_timer {
uint32_t rw_ack_intr;
uint32_t r_intr;
uint32_t r_masked_intr;
-};
+} ETRAXTimerState;
static uint64_t
timer_read(void *opaque, hwaddr addr, unsigned int size)
{
- struct etrax_timer *t = opaque;
+ ETRAXTimerState *t = opaque;
uint32_t r = 0;
switch (addr) {
@@ -103,7 +103,7 @@ timer_read(void *opaque, hwaddr addr, unsigned int size)
return r;
}
-static void update_ctrl(struct etrax_timer *t, int tnum)
+static void update_ctrl(ETRAXTimerState *t, int tnum)
{
unsigned int op;
unsigned int freq;
@@ -167,7 +167,7 @@ static void update_ctrl(struct etrax_timer *t, int tnum)
}
}
-static void timer_update_irq(struct etrax_timer *t)
+static void timer_update_irq(ETRAXTimerState *t)
{
t->r_intr &= ~(t->rw_ack_intr);
t->r_masked_intr = t->r_intr & t->rw_intr_mask;
@@ -178,21 +178,21 @@ static void timer_update_irq(struct etrax_timer *t)
static void timer0_hit(void *opaque)
{
- struct etrax_timer *t = opaque;
+ ETRAXTimerState *t = opaque;
t->r_intr |= 1;
timer_update_irq(t);
}
static void timer1_hit(void *opaque)
{
- struct etrax_timer *t = opaque;
+ ETRAXTimerState *t = opaque;
t->r_intr |= 2;
timer_update_irq(t);
}
static void watchdog_hit(void *opaque)
{
- struct etrax_timer *t = opaque;
+ ETRAXTimerState *t = opaque;
if (t->wd_hits == 0) {
/* real hw gives a single tick before reseting but we are
a bit friendlier to compensate for our slower execution. */
@@ -206,7 +206,7 @@ static void watchdog_hit(void *opaque)
t->wd_hits++;
}
-static inline void timer_watchdog_update(struct etrax_timer *t, uint32_t value)
+static inline void timer_watchdog_update(ETRAXTimerState *t, uint32_t value)
{
unsigned int wd_en = t->rw_wd_ctrl & (1 << 8);
unsigned int wd_key = t->rw_wd_ctrl >> 9;
@@ -245,7 +245,7 @@ static void
timer_write(void *opaque, hwaddr addr,
uint64_t val64, unsigned int size)
{
- struct etrax_timer *t = opaque;
+ ETRAXTimerState *t = opaque;
uint32_t value = val64;
switch (addr)
@@ -298,7 +298,7 @@ static const MemoryRegionOps timer_ops = {
static void etraxfs_timer_reset(void *opaque)
{
- struct etrax_timer *t = opaque;
+ ETRAXTimerState *t = opaque;
ptimer_stop(t->ptimer_t0);
ptimer_stop(t->ptimer_t1);
@@ -311,7 +311,7 @@ static void etraxfs_timer_reset(void *opaque)
static int etraxfs_timer_init(SysBusDevice *dev)
{
- struct etrax_timer *t = FROM_SYSBUS(typeof (*t), dev);
+ ETRAXTimerState *t = FROM_SYSBUS(typeof (*t), dev);
t->bh_t0 = qemu_bh_new(timer0_hit, t);
t->bh_t1 = qemu_bh_new(timer1_hit, t);
@@ -340,7 +340,7 @@ static void etraxfs_timer_class_init(ObjectClass *klass,
void *data)
static const TypeInfo etraxfs_timer_info = {
.name = "etraxfs,timer",
.parent = TYPE_SYS_BUS_DEVICE,
- .instance_size = sizeof (struct etrax_timer),
+ .instance_size = sizeof(ETRAXTimerState),
.class_init = etraxfs_timer_class_init,
};
--
1.8.1.4
- [Qemu-devel] [PULL 137/173] sun4m: QOM cast cleanup for PROMState, (continued)
- [Qemu-devel] [PULL 137/173] sun4m: QOM cast cleanup for PROMState, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 139/173] sun4u: QOM cast cleanup for PROMState, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 140/173] sun4u: QOM cast cleanup for RamDevice, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 141/173] pl022: Rename pl022_state to PL022State, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 142/173] pl022: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 144/173] arm_timer: Rename sp804_state to SP804State, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 143/173] xilinx_spi: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 145/173] arm_timer: QOM cast cleanup for SP804State, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 146/173] arm_timer: QOM cast cleanup for icp_pit_state, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 147/173] cadence_ttc: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 148/173] etraxfs_timer: Rename etrax_timer to ETRAXTimerState,
Andreas Färber <=
- [Qemu-devel] [PULL 150/173] exynos4210_mct: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 149/173] etraxfs_timer: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 152/173] exynos4210_rtc: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 151/173] exynos4210_pwm: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 153/173] grlib_gptimer: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 154/173] lm32_timer: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 155/173] m48t59: QOM cast cleanup for M48t59SysBusState, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 156/173] milkymist-sysctl: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 157/173] pl031: Rename pl031_state to PL031State, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 158/173] pl031: QOM cast cleanup, Andreas Färber, 2013/07/29