blob: c60bcabae33bde2915bba6910b43010d5eee1a78 [file] [log] [blame]
pbrook87ecb682007-11-17 17:14:51 +00001#ifndef QEMU_DEVICES_H
2#define QEMU_DEVICES_H
3
Igor Mammedov5202ef92012-10-16 03:57:21 +02004#include "hw/irq.h"
5
Richard Henderson27a9d2e2011-08-11 16:07:20 -07006/* ??? Not all users of this file can include cpu-common.h. */
7struct MemoryRegion;
8
pbrook87ecb682007-11-17 17:14:51 +00009/* Devices that have nowhere better to go. */
10
11/* smc91c111.c */
12void smc91c111_init(NICInfo *, uint32_t, qemu_irq);
13
Paul Brook2a424992009-11-16 17:06:43 +000014/* lan9118.c */
15void lan9118_init(NICInfo *, uint32_t, qemu_irq);
16
balroga5d7eb62008-04-14 21:28:11 +000017/* tsc210x.c */
Paul Brook22d83b12009-05-12 12:33:04 +010018uWireSlave *tsc2102_init(qemu_irq pint);
19uWireSlave *tsc2301_init(qemu_irq penirq, qemu_irq kbirq, qemu_irq dav);
Paul Brookbc24a222009-05-10 01:44:56 +010020I2SCodec *tsc210x_codec(uWireSlave *chip);
balroge927bb02008-05-07 14:30:38 +000021uint32_t tsc210x_txrx(void *opaque, uint32_t value, int len);
Paul Brookbc24a222009-05-10 01:44:56 +010022void tsc210x_set_transform(uWireSlave *chip,
23 MouseTransformInfo *info);
24void tsc210x_key_event(uWireSlave *chip, int key, int down);
balroga5d7eb62008-04-14 21:28:11 +000025
balroge927bb02008-05-07 14:30:38 +000026/* tsc2005.c */
27void *tsc2005_init(qemu_irq pintdav);
28uint32_t tsc2005_txrx(void *opaque, uint32_t value, int len);
Paul Brookbc24a222009-05-10 01:44:56 +010029void tsc2005_set_transform(void *opaque, MouseTransformInfo *info);
balroge927bb02008-05-07 14:30:38 +000030
pbrookcf0dbb22007-11-18 14:36:08 +000031/* stellaris_input.c */
32void stellaris_gamepad_init(int n, qemu_irq *irq, const int *keycode);
33
balrog7e7c5e42008-04-14 21:57:44 +000034/* blizzard.c */
aliguori3023f332009-01-16 19:04:14 +000035void *s1d13745_init(qemu_irq gpio_int);
balrog7e7c5e42008-04-14 21:57:44 +000036void s1d13745_write(void *opaque, int dc, uint16_t value);
37void s1d13745_write_block(void *opaque, int dc,
38 void *buf, size_t len, int pitch);
39uint16_t s1d13745_read(void *opaque, int dc);
40
41/* cbus.c */
Paul Brookbc24a222009-05-10 01:44:56 +010042typedef struct {
balrog7e7c5e42008-04-14 21:57:44 +000043 qemu_irq clk;
44 qemu_irq dat;
45 qemu_irq sel;
Paul Brookbc24a222009-05-10 01:44:56 +010046} CBus;
47CBus *cbus_init(qemu_irq dat_out);
48void cbus_attach(CBus *bus, void *slave_opaque);
balrog7e7c5e42008-04-14 21:57:44 +000049
50void *retu_init(qemu_irq irq, int vilma);
51void *tahvo_init(qemu_irq irq, int betty);
52
53void retu_key_event(void *retu, int state);
54
balrog88d2c952008-06-09 00:03:13 +000055/* tc6393xb.c */
Paul Brookbc24a222009-05-10 01:44:56 +010056typedef struct TC6393xbState TC6393xbState;
balrog64b40bc2008-11-04 09:04:41 +000057#define TC6393XB_RAM 0x110000 /* amount of ram for Video and USB */
Avi Kivityfe06bd92011-10-03 14:42:42 +020058TC6393xbState *tc6393xb_init(struct MemoryRegion *sysmem,
59 uint32_t base, qemu_irq irq);
Paul Brookbc24a222009-05-10 01:44:56 +010060void tc6393xb_gpio_out_set(TC6393xbState *s, int line,
balrog88d2c952008-06-09 00:03:13 +000061 qemu_irq handler);
Paul Brookbc24a222009-05-10 01:44:56 +010062qemu_irq *tc6393xb_gpio_in_get(TC6393xbState *s);
63qemu_irq tc6393xb_l3v_get(TC6393xbState *s);
balrog88d2c952008-06-09 00:03:13 +000064
blueswir1ffd39252008-11-05 20:24:35 +000065/* sm501.c */
Richard Henderson27a9d2e2011-08-11 16:07:20 -070066void sm501_init(struct MemoryRegion *address_space_mem, uint32_t base,
67 uint32_t local_mem_bytes, qemu_irq irq,
aurel32ac611342009-04-19 09:15:50 +000068 CharDriverState *chr);
69
pbrook87ecb682007-11-17 17:14:51 +000070#endif