Commit b23b0fd063be1a54979df6acbda09011c7e1b626
1 parent
8d13fcc0
ETRAX: Drop the _t for the internal PIC type.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Showing
1 changed file
with
8 additions
and
8 deletions
hw/etraxfs_pic.c
@@ -36,13 +36,13 @@ | @@ -36,13 +36,13 @@ | ||
36 | #define R_R_GURU 4 | 36 | #define R_R_GURU 4 |
37 | #define R_MAX 5 | 37 | #define R_MAX 5 |
38 | 38 | ||
39 | -struct fs_pic_state_t | 39 | +struct fs_pic_state |
40 | { | 40 | { |
41 | CPUState *env; | 41 | CPUState *env; |
42 | uint32_t regs[R_MAX]; | 42 | uint32_t regs[R_MAX]; |
43 | }; | 43 | }; |
44 | 44 | ||
45 | -static void pic_update(struct fs_pic_state_t *fs) | 45 | +static void pic_update(struct fs_pic_state *fs) |
46 | { | 46 | { |
47 | CPUState *env = fs->env; | 47 | CPUState *env = fs->env; |
48 | uint32_t vector = 0; | 48 | uint32_t vector = 0; |
@@ -80,7 +80,7 @@ static void pic_update(struct fs_pic_state_t *fs) | @@ -80,7 +80,7 @@ static void pic_update(struct fs_pic_state_t *fs) | ||
80 | 80 | ||
81 | static uint32_t pic_readl (void *opaque, target_phys_addr_t addr) | 81 | static uint32_t pic_readl (void *opaque, target_phys_addr_t addr) |
82 | { | 82 | { |
83 | - struct fs_pic_state_t *fs = opaque; | 83 | + struct fs_pic_state *fs = opaque; |
84 | uint32_t rval; | 84 | uint32_t rval; |
85 | 85 | ||
86 | rval = fs->regs[addr >> 2]; | 86 | rval = fs->regs[addr >> 2]; |
@@ -91,7 +91,7 @@ static uint32_t pic_readl (void *opaque, target_phys_addr_t addr) | @@ -91,7 +91,7 @@ static uint32_t pic_readl (void *opaque, target_phys_addr_t addr) | ||
91 | static void | 91 | static void |
92 | pic_writel (void *opaque, target_phys_addr_t addr, uint32_t value) | 92 | pic_writel (void *opaque, target_phys_addr_t addr, uint32_t value) |
93 | { | 93 | { |
94 | - struct fs_pic_state_t *fs = opaque; | 94 | + struct fs_pic_state *fs = opaque; |
95 | D(printf("%s addr=%x val=%x\n", __func__, addr, value)); | 95 | D(printf("%s addr=%x val=%x\n", __func__, addr, value)); |
96 | 96 | ||
97 | if (addr == R_RW_MASK) { | 97 | if (addr == R_RW_MASK) { |
@@ -120,7 +120,7 @@ void irq_info(Monitor *mon) | @@ -120,7 +120,7 @@ void irq_info(Monitor *mon) | ||
120 | 120 | ||
121 | static void irq_handler(void *opaque, int irq, int level) | 121 | static void irq_handler(void *opaque, int irq, int level) |
122 | { | 122 | { |
123 | - struct fs_pic_state_t *fs = (void *)opaque; | 123 | + struct fs_pic_state *fs = (void *)opaque; |
124 | irq -= 1; | 124 | irq -= 1; |
125 | fs->regs[R_R_VECT] &= ~(1 << irq); | 125 | fs->regs[R_R_VECT] &= ~(1 << irq); |
126 | fs->regs[R_R_VECT] |= (!!level << irq); | 126 | fs->regs[R_R_VECT] |= (!!level << irq); |
@@ -130,7 +130,7 @@ static void irq_handler(void *opaque, int irq, int level) | @@ -130,7 +130,7 @@ static void irq_handler(void *opaque, int irq, int level) | ||
130 | 130 | ||
131 | static void nmi_handler(void *opaque, int irq, int level) | 131 | static void nmi_handler(void *opaque, int irq, int level) |
132 | { | 132 | { |
133 | - struct fs_pic_state_t *fs = (void *)opaque; | 133 | + struct fs_pic_state *fs = (void *)opaque; |
134 | CPUState *env = fs->env; | 134 | CPUState *env = fs->env; |
135 | uint32_t mask; | 135 | uint32_t mask; |
136 | 136 | ||
@@ -148,13 +148,13 @@ static void nmi_handler(void *opaque, int irq, int level) | @@ -148,13 +148,13 @@ static void nmi_handler(void *opaque, int irq, int level) | ||
148 | 148 | ||
149 | static void guru_handler(void *opaque, int irq, int level) | 149 | static void guru_handler(void *opaque, int irq, int level) |
150 | { | 150 | { |
151 | - struct fs_pic_state_t *fs = (void *)opaque; | 151 | + struct fs_pic_state *fs = (void *)opaque; |
152 | cpu_abort(fs->env, "%s unsupported exception\n", __func__); | 152 | cpu_abort(fs->env, "%s unsupported exception\n", __func__); |
153 | } | 153 | } |
154 | 154 | ||
155 | struct etraxfs_pic *etraxfs_pic_init(CPUState *env, target_phys_addr_t base) | 155 | struct etraxfs_pic *etraxfs_pic_init(CPUState *env, target_phys_addr_t base) |
156 | { | 156 | { |
157 | - struct fs_pic_state_t *fs = NULL; | 157 | + struct fs_pic_state *fs = NULL; |
158 | struct etraxfs_pic *pic = NULL; | 158 | struct etraxfs_pic *pic = NULL; |
159 | int intr_vect_regs; | 159 | int intr_vect_regs; |
160 | 160 |