root / hw / pxa2xx_pic.c @ ebb9518a
History | View | Annotate | Download (9.7 kB)
1 | c1713132 | balrog | /*
|
---|---|---|---|
2 | c1713132 | balrog | * Intel XScale PXA Programmable Interrupt Controller.
|
3 | c1713132 | balrog | *
|
4 | c1713132 | balrog | * Copyright (c) 2006 Openedhand Ltd.
|
5 | c1713132 | balrog | * Copyright (c) 2006 Thorsten Zitterell
|
6 | c1713132 | balrog | * Written by Andrzej Zaborowski <balrog@zabor.org>
|
7 | c1713132 | balrog | *
|
8 | 8e31bf38 | Matthew Fernandez | * This code is licensed under the GPL.
|
9 | c1713132 | balrog | */
|
10 | c1713132 | balrog | |
11 | 87ecb68b | pbrook | #include "hw.h" |
12 | 87ecb68b | pbrook | #include "pxa.h" |
13 | e1f8c729 | Dmitry Eremin-Solenikov | #include "sysbus.h" |
14 | c1713132 | balrog | |
15 | c1713132 | balrog | #define ICIP 0x00 /* Interrupt Controller IRQ Pending register */ |
16 | c1713132 | balrog | #define ICMR 0x04 /* Interrupt Controller Mask register */ |
17 | c1713132 | balrog | #define ICLR 0x08 /* Interrupt Controller Level register */ |
18 | c1713132 | balrog | #define ICFP 0x0c /* Interrupt Controller FIQ Pending register */ |
19 | c1713132 | balrog | #define ICPR 0x10 /* Interrupt Controller Pending register */ |
20 | c1713132 | balrog | #define ICCR 0x14 /* Interrupt Controller Control register */ |
21 | c1713132 | balrog | #define ICHP 0x18 /* Interrupt Controller Highest Priority register */ |
22 | c1713132 | balrog | #define IPR0 0x1c /* Interrupt Controller Priority register 0 */ |
23 | c1713132 | balrog | #define IPR31 0x98 /* Interrupt Controller Priority register 31 */ |
24 | c1713132 | balrog | #define ICIP2 0x9c /* Interrupt Controller IRQ Pending register 2 */ |
25 | c1713132 | balrog | #define ICMR2 0xa0 /* Interrupt Controller Mask register 2 */ |
26 | c1713132 | balrog | #define ICLR2 0xa4 /* Interrupt Controller Level register 2 */ |
27 | c1713132 | balrog | #define ICFP2 0xa8 /* Interrupt Controller FIQ Pending register 2 */ |
28 | c1713132 | balrog | #define ICPR2 0xac /* Interrupt Controller Pending register 2 */ |
29 | c1713132 | balrog | #define IPR32 0xb0 /* Interrupt Controller Priority register 32 */ |
30 | c1713132 | balrog | #define IPR39 0xcc /* Interrupt Controller Priority register 39 */ |
31 | c1713132 | balrog | |
32 | c1713132 | balrog | #define PXA2XX_PIC_SRCS 40 |
33 | c1713132 | balrog | |
34 | bc24a225 | Paul Brook | typedef struct { |
35 | e1f8c729 | Dmitry Eremin-Solenikov | SysBusDevice busdev; |
36 | 90e8e5a3 | Benoît Canet | MemoryRegion iomem; |
37 | e9d872cf | Andreas Färber | ARMCPU *cpu; |
38 | c1713132 | balrog | uint32_t int_enabled[2];
|
39 | c1713132 | balrog | uint32_t int_pending[2];
|
40 | c1713132 | balrog | uint32_t is_fiq[2];
|
41 | c1713132 | balrog | uint32_t int_idle; |
42 | c1713132 | balrog | uint32_t priority[PXA2XX_PIC_SRCS]; |
43 | bc24a225 | Paul Brook | } PXA2xxPICState; |
44 | c1713132 | balrog | |
45 | c1713132 | balrog | static void pxa2xx_pic_update(void *opaque) |
46 | c1713132 | balrog | { |
47 | c1713132 | balrog | uint32_t mask[2];
|
48 | bc24a225 | Paul Brook | PXA2xxPICState *s = (PXA2xxPICState *) opaque; |
49 | c1713132 | balrog | |
50 | e9d872cf | Andreas Färber | if (s->cpu->env.halted) {
|
51 | c1713132 | balrog | mask[0] = s->int_pending[0] & (s->int_enabled[0] | s->int_idle); |
52 | c1713132 | balrog | mask[1] = s->int_pending[1] & (s->int_enabled[1] | s->int_idle); |
53 | e9d872cf | Andreas Färber | if (mask[0] || mask[1]) { |
54 | e9d872cf | Andreas Färber | cpu_interrupt(&s->cpu->env, CPU_INTERRUPT_EXITTB); |
55 | e9d872cf | Andreas Färber | } |
56 | c1713132 | balrog | } |
57 | c1713132 | balrog | |
58 | c1713132 | balrog | mask[0] = s->int_pending[0] & s->int_enabled[0]; |
59 | c1713132 | balrog | mask[1] = s->int_pending[1] & s->int_enabled[1]; |
60 | c1713132 | balrog | |
61 | e9d872cf | Andreas Färber | if ((mask[0] & s->is_fiq[0]) || (mask[1] & s->is_fiq[1])) { |
62 | e9d872cf | Andreas Färber | cpu_interrupt(&s->cpu->env, CPU_INTERRUPT_FIQ); |
63 | e9d872cf | Andreas Färber | } else {
|
64 | e9d872cf | Andreas Färber | cpu_reset_interrupt(&s->cpu->env, CPU_INTERRUPT_FIQ); |
65 | e9d872cf | Andreas Färber | } |
66 | c1713132 | balrog | |
67 | e9d872cf | Andreas Färber | if ((mask[0] & ~s->is_fiq[0]) || (mask[1] & ~s->is_fiq[1])) { |
68 | e9d872cf | Andreas Färber | cpu_interrupt(&s->cpu->env, CPU_INTERRUPT_HARD); |
69 | e9d872cf | Andreas Färber | } else {
|
70 | e9d872cf | Andreas Färber | cpu_reset_interrupt(&s->cpu->env, CPU_INTERRUPT_HARD); |
71 | e9d872cf | Andreas Färber | } |
72 | c1713132 | balrog | } |
73 | c1713132 | balrog | |
74 | c1713132 | balrog | /* Note: Here level means state of the signal on a pin, not
|
75 | c1713132 | balrog | * IRQ/FIQ distinction as in PXA Developer Manual. */
|
76 | c1713132 | balrog | static void pxa2xx_pic_set_irq(void *opaque, int irq, int level) |
77 | c1713132 | balrog | { |
78 | bc24a225 | Paul Brook | PXA2xxPICState *s = (PXA2xxPICState *) opaque; |
79 | c1713132 | balrog | int int_set = (irq >= 32); |
80 | c1713132 | balrog | irq &= 31;
|
81 | c1713132 | balrog | |
82 | c1713132 | balrog | if (level)
|
83 | c1713132 | balrog | s->int_pending[int_set] |= 1 << irq;
|
84 | c1713132 | balrog | else
|
85 | c1713132 | balrog | s->int_pending[int_set] &= ~(1 << irq);
|
86 | c1713132 | balrog | |
87 | c1713132 | balrog | pxa2xx_pic_update(opaque); |
88 | c1713132 | balrog | } |
89 | c1713132 | balrog | |
90 | bc24a225 | Paul Brook | static inline uint32_t pxa2xx_pic_highest(PXA2xxPICState *s) { |
91 | c1713132 | balrog | int i, int_set, irq;
|
92 | c1713132 | balrog | uint32_t bit, mask[2];
|
93 | c1713132 | balrog | uint32_t ichp = 0x003f003f; /* Both IDs invalid */ |
94 | c1713132 | balrog | |
95 | c1713132 | balrog | mask[0] = s->int_pending[0] & s->int_enabled[0]; |
96 | c1713132 | balrog | mask[1] = s->int_pending[1] & s->int_enabled[1]; |
97 | c1713132 | balrog | |
98 | c1713132 | balrog | for (i = PXA2XX_PIC_SRCS - 1; i >= 0; i --) { |
99 | c1713132 | balrog | irq = s->priority[i] & 0x3f;
|
100 | c1713132 | balrog | if ((s->priority[i] & (1 << 31)) && irq < PXA2XX_PIC_SRCS) { |
101 | c1713132 | balrog | /* Source peripheral ID is valid. */
|
102 | c1713132 | balrog | bit = 1 << (irq & 31); |
103 | c1713132 | balrog | int_set = (irq >= 32);
|
104 | c1713132 | balrog | |
105 | c1713132 | balrog | if (mask[int_set] & bit & s->is_fiq[int_set]) {
|
106 | c1713132 | balrog | /* FIQ asserted */
|
107 | c1713132 | balrog | ichp &= 0xffff0000;
|
108 | c1713132 | balrog | ichp |= (1 << 15) | irq; |
109 | c1713132 | balrog | } |
110 | c1713132 | balrog | |
111 | c1713132 | balrog | if (mask[int_set] & bit & ~s->is_fiq[int_set]) {
|
112 | c1713132 | balrog | /* IRQ asserted */
|
113 | c1713132 | balrog | ichp &= 0x0000ffff;
|
114 | c1713132 | balrog | ichp |= (1 << 31) | (irq << 16); |
115 | c1713132 | balrog | } |
116 | c1713132 | balrog | } |
117 | c1713132 | balrog | } |
118 | c1713132 | balrog | |
119 | c1713132 | balrog | return ichp;
|
120 | c1713132 | balrog | } |
121 | c1713132 | balrog | |
122 | 90e8e5a3 | Benoît Canet | static uint64_t pxa2xx_pic_mem_read(void *opaque, target_phys_addr_t offset, |
123 | 90e8e5a3 | Benoît Canet | unsigned size)
|
124 | c1713132 | balrog | { |
125 | bc24a225 | Paul Brook | PXA2xxPICState *s = (PXA2xxPICState *) opaque; |
126 | c1713132 | balrog | |
127 | c1713132 | balrog | switch (offset) {
|
128 | c1713132 | balrog | case ICIP: /* IRQ Pending register */ |
129 | c1713132 | balrog | return s->int_pending[0] & ~s->is_fiq[0] & s->int_enabled[0]; |
130 | c1713132 | balrog | case ICIP2: /* IRQ Pending register 2 */ |
131 | c1713132 | balrog | return s->int_pending[1] & ~s->is_fiq[1] & s->int_enabled[1]; |
132 | c1713132 | balrog | case ICMR: /* Mask register */ |
133 | c1713132 | balrog | return s->int_enabled[0]; |
134 | c1713132 | balrog | case ICMR2: /* Mask register 2 */ |
135 | c1713132 | balrog | return s->int_enabled[1]; |
136 | c1713132 | balrog | case ICLR: /* Level register */ |
137 | c1713132 | balrog | return s->is_fiq[0]; |
138 | c1713132 | balrog | case ICLR2: /* Level register 2 */ |
139 | c1713132 | balrog | return s->is_fiq[1]; |
140 | c1713132 | balrog | case ICCR: /* Idle mask */ |
141 | c1713132 | balrog | return (s->int_idle == 0); |
142 | c1713132 | balrog | case ICFP: /* FIQ Pending register */ |
143 | c1713132 | balrog | return s->int_pending[0] & s->is_fiq[0] & s->int_enabled[0]; |
144 | c1713132 | balrog | case ICFP2: /* FIQ Pending register 2 */ |
145 | c1713132 | balrog | return s->int_pending[1] & s->is_fiq[1] & s->int_enabled[1]; |
146 | c1713132 | balrog | case ICPR: /* Pending register */ |
147 | c1713132 | balrog | return s->int_pending[0]; |
148 | c1713132 | balrog | case ICPR2: /* Pending register 2 */ |
149 | c1713132 | balrog | return s->int_pending[1]; |
150 | c1713132 | balrog | case IPR0 ... IPR31:
|
151 | c1713132 | balrog | return s->priority[0 + ((offset - IPR0 ) >> 2)]; |
152 | c1713132 | balrog | case IPR32 ... IPR39:
|
153 | c1713132 | balrog | return s->priority[32 + ((offset - IPR32) >> 2)]; |
154 | c1713132 | balrog | case ICHP: /* Highest Priority register */ |
155 | c1713132 | balrog | return pxa2xx_pic_highest(s);
|
156 | c1713132 | balrog | default:
|
157 | c1713132 | balrog | printf("%s: Bad register offset " REG_FMT "\n", __FUNCTION__, offset); |
158 | c1713132 | balrog | return 0; |
159 | c1713132 | balrog | } |
160 | c1713132 | balrog | } |
161 | c1713132 | balrog | |
162 | c227f099 | Anthony Liguori | static void pxa2xx_pic_mem_write(void *opaque, target_phys_addr_t offset, |
163 | 90e8e5a3 | Benoît Canet | uint64_t value, unsigned size)
|
164 | c1713132 | balrog | { |
165 | bc24a225 | Paul Brook | PXA2xxPICState *s = (PXA2xxPICState *) opaque; |
166 | c1713132 | balrog | |
167 | c1713132 | balrog | switch (offset) {
|
168 | c1713132 | balrog | case ICMR: /* Mask register */ |
169 | c1713132 | balrog | s->int_enabled[0] = value;
|
170 | c1713132 | balrog | break;
|
171 | c1713132 | balrog | case ICMR2: /* Mask register 2 */ |
172 | c1713132 | balrog | s->int_enabled[1] = value;
|
173 | c1713132 | balrog | break;
|
174 | c1713132 | balrog | case ICLR: /* Level register */ |
175 | c1713132 | balrog | s->is_fiq[0] = value;
|
176 | c1713132 | balrog | break;
|
177 | c1713132 | balrog | case ICLR2: /* Level register 2 */ |
178 | c1713132 | balrog | s->is_fiq[1] = value;
|
179 | c1713132 | balrog | break;
|
180 | c1713132 | balrog | case ICCR: /* Idle mask */ |
181 | c1713132 | balrog | s->int_idle = (value & 1) ? 0 : ~0; |
182 | c1713132 | balrog | break;
|
183 | c1713132 | balrog | case IPR0 ... IPR31:
|
184 | c1713132 | balrog | s->priority[0 + ((offset - IPR0 ) >> 2)] = value & 0x8000003f; |
185 | c1713132 | balrog | break;
|
186 | c1713132 | balrog | case IPR32 ... IPR39:
|
187 | c1713132 | balrog | s->priority[32 + ((offset - IPR32) >> 2)] = value & 0x8000003f; |
188 | c1713132 | balrog | break;
|
189 | c1713132 | balrog | default:
|
190 | c1713132 | balrog | printf("%s: Bad register offset " REG_FMT "\n", __FUNCTION__, offset); |
191 | c1713132 | balrog | return;
|
192 | c1713132 | balrog | } |
193 | c1713132 | balrog | pxa2xx_pic_update(opaque); |
194 | c1713132 | balrog | } |
195 | c1713132 | balrog | |
196 | c1713132 | balrog | /* Interrupt Controller Coprocessor Space Register Mapping */
|
197 | c1713132 | balrog | static const int pxa2xx_cp_reg_map[0x10] = { |
198 | c1713132 | balrog | [0x0 ... 0xf] = -1, |
199 | c1713132 | balrog | [0x0] = ICIP,
|
200 | c1713132 | balrog | [0x1] = ICMR,
|
201 | c1713132 | balrog | [0x2] = ICLR,
|
202 | c1713132 | balrog | [0x3] = ICFP,
|
203 | c1713132 | balrog | [0x4] = ICPR,
|
204 | c1713132 | balrog | [0x5] = ICHP,
|
205 | c1713132 | balrog | [0x6] = ICIP2,
|
206 | c1713132 | balrog | [0x7] = ICMR2,
|
207 | c1713132 | balrog | [0x8] = ICLR2,
|
208 | c1713132 | balrog | [0x9] = ICFP2,
|
209 | c1713132 | balrog | [0xa] = ICPR2,
|
210 | c1713132 | balrog | }; |
211 | c1713132 | balrog | |
212 | c1713132 | balrog | static uint32_t pxa2xx_pic_cp_read(void *opaque, int op2, int reg, int crm) |
213 | c1713132 | balrog | { |
214 | c227f099 | Anthony Liguori | target_phys_addr_t offset; |
215 | c1713132 | balrog | |
216 | c1713132 | balrog | if (pxa2xx_cp_reg_map[reg] == -1) { |
217 | c1713132 | balrog | printf("%s: Bad register 0x%x\n", __FUNCTION__, reg);
|
218 | c1713132 | balrog | return 0; |
219 | c1713132 | balrog | } |
220 | c1713132 | balrog | |
221 | 8da3ff18 | pbrook | offset = pxa2xx_cp_reg_map[reg]; |
222 | 90e8e5a3 | Benoît Canet | return pxa2xx_pic_mem_read(opaque, offset, 4); |
223 | c1713132 | balrog | } |
224 | c1713132 | balrog | |
225 | c1713132 | balrog | static void pxa2xx_pic_cp_write(void *opaque, int op2, int reg, int crm, |
226 | c1713132 | balrog | uint32_t value) |
227 | c1713132 | balrog | { |
228 | c227f099 | Anthony Liguori | target_phys_addr_t offset; |
229 | c1713132 | balrog | |
230 | c1713132 | balrog | if (pxa2xx_cp_reg_map[reg] == -1) { |
231 | c1713132 | balrog | printf("%s: Bad register 0x%x\n", __FUNCTION__, reg);
|
232 | c1713132 | balrog | return;
|
233 | c1713132 | balrog | } |
234 | c1713132 | balrog | |
235 | 8da3ff18 | pbrook | offset = pxa2xx_cp_reg_map[reg]; |
236 | 90e8e5a3 | Benoît Canet | pxa2xx_pic_mem_write(opaque, offset, value, 4);
|
237 | c1713132 | balrog | } |
238 | c1713132 | balrog | |
239 | 90e8e5a3 | Benoît Canet | static const MemoryRegionOps pxa2xx_pic_ops = { |
240 | 90e8e5a3 | Benoît Canet | .read = pxa2xx_pic_mem_read, |
241 | 90e8e5a3 | Benoît Canet | .write = pxa2xx_pic_mem_write, |
242 | 90e8e5a3 | Benoît Canet | .endianness = DEVICE_NATIVE_ENDIAN, |
243 | c1713132 | balrog | }; |
244 | c1713132 | balrog | |
245 | e1f8c729 | Dmitry Eremin-Solenikov | static int pxa2xx_pic_post_load(void *opaque, int version_id) |
246 | aa941b94 | balrog | { |
247 | aa941b94 | balrog | pxa2xx_pic_update(opaque); |
248 | aa941b94 | balrog | return 0; |
249 | aa941b94 | balrog | } |
250 | aa941b94 | balrog | |
251 | f161bcd0 | Andreas Färber | DeviceState *pxa2xx_pic_init(target_phys_addr_t base, ARMCPU *cpu) |
252 | c1713132 | balrog | { |
253 | f161bcd0 | Andreas Färber | CPUARMState *env = &cpu->env; |
254 | e1f8c729 | Dmitry Eremin-Solenikov | DeviceState *dev = qdev_create(NULL, "pxa2xx_pic"); |
255 | e1f8c729 | Dmitry Eremin-Solenikov | PXA2xxPICState *s = FROM_SYSBUS(PXA2xxPICState, sysbus_from_qdev(dev)); |
256 | c1713132 | balrog | |
257 | e9d872cf | Andreas Färber | s->cpu = cpu; |
258 | c1713132 | balrog | |
259 | c1713132 | balrog | s->int_pending[0] = 0; |
260 | c1713132 | balrog | s->int_pending[1] = 0; |
261 | c1713132 | balrog | s->int_enabled[0] = 0; |
262 | c1713132 | balrog | s->int_enabled[1] = 0; |
263 | c1713132 | balrog | s->is_fiq[0] = 0; |
264 | c1713132 | balrog | s->is_fiq[1] = 0; |
265 | c1713132 | balrog | |
266 | e1f8c729 | Dmitry Eremin-Solenikov | qdev_init_nofail(dev); |
267 | e1f8c729 | Dmitry Eremin-Solenikov | |
268 | e1f8c729 | Dmitry Eremin-Solenikov | qdev_init_gpio_in(dev, pxa2xx_pic_set_irq, PXA2XX_PIC_SRCS); |
269 | c1713132 | balrog | |
270 | c1713132 | balrog | /* Enable IC memory-mapped registers access. */
|
271 | 90e8e5a3 | Benoît Canet | memory_region_init_io(&s->iomem, &pxa2xx_pic_ops, s, |
272 | 90e8e5a3 | Benoît Canet | "pxa2xx-pic", 0x00100000); |
273 | 750ecd44 | Avi Kivity | sysbus_init_mmio(sysbus_from_qdev(dev), &s->iomem); |
274 | 7c29d6ce | Andrzej Zaborowski | sysbus_mmio_map(sysbus_from_qdev(dev), 0, base);
|
275 | c1713132 | balrog | |
276 | c1713132 | balrog | /* Enable IC coprocessor access. */
|
277 | c1713132 | balrog | cpu_arm_set_cp_io(env, 6, pxa2xx_pic_cp_read, pxa2xx_pic_cp_write, s);
|
278 | c1713132 | balrog | |
279 | e1f8c729 | Dmitry Eremin-Solenikov | return dev;
|
280 | e1f8c729 | Dmitry Eremin-Solenikov | } |
281 | e1f8c729 | Dmitry Eremin-Solenikov | |
282 | e1f8c729 | Dmitry Eremin-Solenikov | static VMStateDescription vmstate_pxa2xx_pic_regs = {
|
283 | e1f8c729 | Dmitry Eremin-Solenikov | .name = "pxa2xx_pic",
|
284 | e1f8c729 | Dmitry Eremin-Solenikov | .version_id = 0,
|
285 | e1f8c729 | Dmitry Eremin-Solenikov | .minimum_version_id = 0,
|
286 | e1f8c729 | Dmitry Eremin-Solenikov | .minimum_version_id_old = 0,
|
287 | e1f8c729 | Dmitry Eremin-Solenikov | .post_load = pxa2xx_pic_post_load, |
288 | e1f8c729 | Dmitry Eremin-Solenikov | .fields = (VMStateField[]) { |
289 | e1f8c729 | Dmitry Eremin-Solenikov | VMSTATE_UINT32_ARRAY(int_enabled, PXA2xxPICState, 2),
|
290 | e1f8c729 | Dmitry Eremin-Solenikov | VMSTATE_UINT32_ARRAY(int_pending, PXA2xxPICState, 2),
|
291 | e1f8c729 | Dmitry Eremin-Solenikov | VMSTATE_UINT32_ARRAY(is_fiq, PXA2xxPICState, 2),
|
292 | e1f8c729 | Dmitry Eremin-Solenikov | VMSTATE_UINT32(int_idle, PXA2xxPICState), |
293 | e1f8c729 | Dmitry Eremin-Solenikov | VMSTATE_UINT32_ARRAY(priority, PXA2xxPICState, PXA2XX_PIC_SRCS), |
294 | e1f8c729 | Dmitry Eremin-Solenikov | VMSTATE_END_OF_LIST(), |
295 | e1f8c729 | Dmitry Eremin-Solenikov | }, |
296 | e1f8c729 | Dmitry Eremin-Solenikov | }; |
297 | aa941b94 | balrog | |
298 | e1f8c729 | Dmitry Eremin-Solenikov | static int pxa2xx_pic_initfn(SysBusDevice *dev) |
299 | e1f8c729 | Dmitry Eremin-Solenikov | { |
300 | e1f8c729 | Dmitry Eremin-Solenikov | return 0; |
301 | e1f8c729 | Dmitry Eremin-Solenikov | } |
302 | e1f8c729 | Dmitry Eremin-Solenikov | |
303 | 999e12bb | Anthony Liguori | static void pxa2xx_pic_class_init(ObjectClass *klass, void *data) |
304 | 999e12bb | Anthony Liguori | { |
305 | 39bffca2 | Anthony Liguori | DeviceClass *dc = DEVICE_CLASS(klass); |
306 | 999e12bb | Anthony Liguori | SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); |
307 | 999e12bb | Anthony Liguori | |
308 | 999e12bb | Anthony Liguori | k->init = pxa2xx_pic_initfn; |
309 | 39bffca2 | Anthony Liguori | dc->desc = "PXA2xx PIC";
|
310 | 39bffca2 | Anthony Liguori | dc->vmsd = &vmstate_pxa2xx_pic_regs; |
311 | 999e12bb | Anthony Liguori | } |
312 | 999e12bb | Anthony Liguori | |
313 | 39bffca2 | Anthony Liguori | static TypeInfo pxa2xx_pic_info = {
|
314 | 39bffca2 | Anthony Liguori | .name = "pxa2xx_pic",
|
315 | 39bffca2 | Anthony Liguori | .parent = TYPE_SYS_BUS_DEVICE, |
316 | 39bffca2 | Anthony Liguori | .instance_size = sizeof(PXA2xxPICState),
|
317 | 39bffca2 | Anthony Liguori | .class_init = pxa2xx_pic_class_init, |
318 | e1f8c729 | Dmitry Eremin-Solenikov | }; |
319 | e1f8c729 | Dmitry Eremin-Solenikov | |
320 | 83f7d43a | Andreas Färber | static void pxa2xx_pic_register_types(void) |
321 | e1f8c729 | Dmitry Eremin-Solenikov | { |
322 | 39bffca2 | Anthony Liguori | type_register_static(&pxa2xx_pic_info); |
323 | c1713132 | balrog | } |
324 | 83f7d43a | Andreas Färber | |
325 | 83f7d43a | Andreas Färber | type_init(pxa2xx_pic_register_types) |