root / hw / sh.h @ a245f2e7
History | View | Annotate | Download (1.4 kB)
1 | 87ecb68b | pbrook | #ifndef QEMU_SH_H
|
---|---|---|---|
2 | 87ecb68b | pbrook | #define QEMU_SH_H
|
3 | 87ecb68b | pbrook | /* Definitions for SH board emulation. */
|
4 | 87ecb68b | pbrook | |
5 | 703243a0 | balrog | #include "sh_intc.h" |
6 | 703243a0 | balrog | |
7 | 87ecb68b | pbrook | /* sh7750.c */
|
8 | 87ecb68b | pbrook | struct SH7750State;
|
9 | 87ecb68b | pbrook | |
10 | 87ecb68b | pbrook | struct SH7750State *sh7750_init(CPUState * cpu);
|
11 | 87ecb68b | pbrook | |
12 | 87ecb68b | pbrook | typedef struct { |
13 | 87ecb68b | pbrook | /* The callback will be triggered if any of the designated lines change */
|
14 | 87ecb68b | pbrook | uint16_t portamask_trigger; |
15 | 87ecb68b | pbrook | uint16_t portbmask_trigger; |
16 | 87ecb68b | pbrook | /* Return 0 if no action was taken */
|
17 | 87ecb68b | pbrook | int (*port_change_cb) (uint16_t porta, uint16_t portb,
|
18 | 87ecb68b | pbrook | uint16_t * periph_pdtra, |
19 | 87ecb68b | pbrook | uint16_t * periph_portdira, |
20 | 87ecb68b | pbrook | uint16_t * periph_pdtrb, |
21 | 87ecb68b | pbrook | uint16_t * periph_portdirb); |
22 | 87ecb68b | pbrook | } sh7750_io_device; |
23 | 87ecb68b | pbrook | |
24 | 87ecb68b | pbrook | int sh7750_register_io_device(struct SH7750State *s, |
25 | 87ecb68b | pbrook | sh7750_io_device * device); |
26 | 87ecb68b | pbrook | /* sh_timer.c */
|
27 | 87ecb68b | pbrook | #define TMU012_FEAT_TOCR (1 << 0) |
28 | 87ecb68b | pbrook | #define TMU012_FEAT_3CHAN (1 << 1) |
29 | 87ecb68b | pbrook | #define TMU012_FEAT_EXTCLK (1 << 2) |
30 | 703243a0 | balrog | void tmu012_init(target_phys_addr_t base, int feat, uint32_t freq, |
31 | 703243a0 | balrog | struct intc_source *ch0_irq, struct intc_source *ch1_irq, |
32 | 703243a0 | balrog | struct intc_source *ch2_irq0, struct intc_source *ch2_irq1); |
33 | 703243a0 | balrog | |
34 | 87ecb68b | pbrook | |
35 | 87ecb68b | pbrook | /* sh_serial.c */
|
36 | 87ecb68b | pbrook | #define SH_SERIAL_FEAT_SCIF (1 << 0) |
37 | 87ecb68b | pbrook | void sh_serial_init (target_phys_addr_t base, int feat, |
38 | bf5b7423 | aurel32 | uint32_t freq, CharDriverState *chr, |
39 | bf5b7423 | aurel32 | struct intc_source *eri_source,
|
40 | bf5b7423 | aurel32 | struct intc_source *rxi_source,
|
41 | bf5b7423 | aurel32 | struct intc_source *txi_source,
|
42 | bf5b7423 | aurel32 | struct intc_source *tei_source,
|
43 | bf5b7423 | aurel32 | struct intc_source *bri_source);
|
44 | 87ecb68b | pbrook | |
45 | 87ecb68b | pbrook | /* tc58128.c */
|
46 | 87ecb68b | pbrook | int tc58128_init(struct SH7750State *s, char *zone1, char *zone2); |
47 | 87ecb68b | pbrook | |
48 | 87ecb68b | pbrook | #endif |