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