root / hw / lm32 / lm32.h @ 216db403
History | View | Annotate | Download (507 Bytes)
1 | cb9c377f | Paolo Bonzini | #ifndef HW_LM32_H
|
---|---|---|---|
2 | cb9c377f | Paolo Bonzini | #define HW_LM32_H 1 |
3 | cb9c377f | Paolo Bonzini | |
4 | a0b97927 | Andreas Färber | #include "hw/char/lm32_juart.h" |
5 | f89286ae | Michael Walle | |
6 | f89286ae | Michael Walle | static inline DeviceState *lm32_pic_init(qemu_irq cpu_irq) |
7 | f89286ae | Michael Walle | { |
8 | f89286ae | Michael Walle | DeviceState *dev; |
9 | f89286ae | Michael Walle | SysBusDevice *d; |
10 | f89286ae | Michael Walle | |
11 | f89286ae | Michael Walle | dev = qdev_create(NULL, "lm32-pic"); |
12 | f89286ae | Michael Walle | qdev_init_nofail(dev); |
13 | 1356b98d | Andreas Färber | d = SYS_BUS_DEVICE(dev); |
14 | f89286ae | Michael Walle | sysbus_connect_irq(d, 0, cpu_irq);
|
15 | f89286ae | Michael Walle | |
16 | f89286ae | Michael Walle | return dev;
|
17 | f89286ae | Michael Walle | } |
18 | f89286ae | Michael Walle | |
19 | f89286ae | Michael Walle | static inline DeviceState *lm32_juart_init(void) |
20 | f89286ae | Michael Walle | { |
21 | f89286ae | Michael Walle | DeviceState *dev; |
22 | f89286ae | Michael Walle | |
23 | a0b97927 | Andreas Färber | dev = qdev_create(NULL, TYPE_LM32_JUART);
|
24 | f89286ae | Michael Walle | qdev_init_nofail(dev); |
25 | f89286ae | Michael Walle | |
26 | f89286ae | Michael Walle | return dev;
|
27 | f89286ae | Michael Walle | } |
28 | cb9c377f | Paolo Bonzini | |
29 | cb9c377f | Paolo Bonzini | #endif |