blob: 1a55c1e9053208cf6f0d6905aee7e4cb72a7e97c [file] [log] [blame]
pbrook87ecb682007-11-17 17:14:51 +00001#ifndef QEMU_DEVICES_H
2#define QEMU_DEVICES_H
3
Richard Henderson27a9d2e2011-08-11 16:07:20 -07004/* ??? Not all users of this file can include cpu-common.h. */
5struct MemoryRegion;
6
pbrook87ecb682007-11-17 17:14:51 +00007/* Devices that have nowhere better to go. */
8
9/* smc91c111.c */
10void smc91c111_init(NICInfo *, uint32_t, qemu_irq);
11
Paul Brook2a424992009-11-16 17:06:43 +000012/* lan9118.c */
13void lan9118_init(NICInfo *, uint32_t, qemu_irq);
14
balroga5d7eb62008-04-14 21:28:11 +000015/* tsc210x.c */
Paul Brook22d83b12009-05-12 12:33:04 +010016uWireSlave *tsc2102_init(qemu_irq pint);
17uWireSlave *tsc2301_init(qemu_irq penirq, qemu_irq kbirq, qemu_irq dav);
Paul Brookbc24a222009-05-10 01:44:56 +010018I2SCodec *tsc210x_codec(uWireSlave *chip);
balroge927bb02008-05-07 14:30:38 +000019uint32_t tsc210x_txrx(void *opaque, uint32_t value, int len);
Paul Brookbc24a222009-05-10 01:44:56 +010020void tsc210x_set_transform(uWireSlave *chip,
21 MouseTransformInfo *info);
22void tsc210x_key_event(uWireSlave *chip, int key, int down);
balroga5d7eb62008-04-14 21:28:11 +000023
balroge927bb02008-05-07 14:30:38 +000024/* tsc2005.c */
25void *tsc2005_init(qemu_irq pintdav);
26uint32_t tsc2005_txrx(void *opaque, uint32_t value, int len);
Paul Brookbc24a222009-05-10 01:44:56 +010027void tsc2005_set_transform(void *opaque, MouseTransformInfo *info);
balroge927bb02008-05-07 14:30:38 +000028
pbrookcf0dbb22007-11-18 14:36:08 +000029/* stellaris_input.c */
30void stellaris_gamepad_init(int n, qemu_irq *irq, const int *keycode);
31
balrog7e7c5e42008-04-14 21:57:44 +000032/* blizzard.c */
aliguori3023f332009-01-16 19:04:14 +000033void *s1d13745_init(qemu_irq gpio_int);
balrog7e7c5e42008-04-14 21:57:44 +000034void s1d13745_write(void *opaque, int dc, uint16_t value);
35void s1d13745_write_block(void *opaque, int dc,
36 void *buf, size_t len, int pitch);
37uint16_t s1d13745_read(void *opaque, int dc);
38
39/* cbus.c */
Paul Brookbc24a222009-05-10 01:44:56 +010040typedef struct {
balrog7e7c5e42008-04-14 21:57:44 +000041 qemu_irq clk;
42 qemu_irq dat;
43 qemu_irq sel;
Paul Brookbc24a222009-05-10 01:44:56 +010044} CBus;
45CBus *cbus_init(qemu_irq dat_out);
46void cbus_attach(CBus *bus, void *slave_opaque);
balrog7e7c5e42008-04-14 21:57:44 +000047
48void *retu_init(qemu_irq irq, int vilma);
49void *tahvo_init(qemu_irq irq, int betty);
50
51void retu_key_event(void *retu, int state);
52
balrog88d2c952008-06-09 00:03:13 +000053/* tc6393xb.c */
Paul Brookbc24a222009-05-10 01:44:56 +010054typedef struct TC6393xbState TC6393xbState;
balrog64b40bc2008-11-04 09:04:41 +000055#define TC6393XB_RAM 0x110000 /* amount of ram for Video and USB */
Avi Kivityfe06bd92011-10-03 14:42:42 +020056TC6393xbState *tc6393xb_init(struct MemoryRegion *sysmem,
57 uint32_t base, qemu_irq irq);
Paul Brookbc24a222009-05-10 01:44:56 +010058void tc6393xb_gpio_out_set(TC6393xbState *s, int line,
balrog88d2c952008-06-09 00:03:13 +000059 qemu_irq handler);
Paul Brookbc24a222009-05-10 01:44:56 +010060qemu_irq *tc6393xb_gpio_in_get(TC6393xbState *s);
61qemu_irq tc6393xb_l3v_get(TC6393xbState *s);
balrog88d2c952008-06-09 00:03:13 +000062
blueswir1ffd39252008-11-05 20:24:35 +000063/* sm501.c */
Richard Henderson27a9d2e2011-08-11 16:07:20 -070064void sm501_init(struct MemoryRegion *address_space_mem, uint32_t base,
65 uint32_t local_mem_bytes, qemu_irq irq,
aurel32ac611342009-04-19 09:15:50 +000066 CharDriverState *chr);
67
pbrook87ecb682007-11-17 17:14:51 +000068#endif