Statistics
| Branch: | Revision:

root / hw / sh.h @ 9596ebb7

History | View | Annotate | Download (1.1 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 87ecb68b pbrook
/* sh7750.c */
6 87ecb68b pbrook
struct SH7750State;
7 87ecb68b pbrook
8 87ecb68b pbrook
struct SH7750State *sh7750_init(CPUState * cpu);
9 87ecb68b pbrook
10 87ecb68b pbrook
typedef struct {
11 87ecb68b pbrook
    /* The callback will be triggered if any of the designated lines change */
12 87ecb68b pbrook
    uint16_t portamask_trigger;
13 87ecb68b pbrook
    uint16_t portbmask_trigger;
14 87ecb68b pbrook
    /* Return 0 if no action was taken */
15 87ecb68b pbrook
    int (*port_change_cb) (uint16_t porta, uint16_t portb,
16 87ecb68b pbrook
                           uint16_t * periph_pdtra,
17 87ecb68b pbrook
                           uint16_t * periph_portdira,
18 87ecb68b pbrook
                           uint16_t * periph_pdtrb,
19 87ecb68b pbrook
                           uint16_t * periph_portdirb);
20 87ecb68b pbrook
} sh7750_io_device;
21 87ecb68b pbrook
22 87ecb68b pbrook
int sh7750_register_io_device(struct SH7750State *s,
23 87ecb68b pbrook
                              sh7750_io_device * device);
24 87ecb68b pbrook
/* sh_timer.c */
25 87ecb68b pbrook
#define TMU012_FEAT_TOCR   (1 << 0)
26 87ecb68b pbrook
#define TMU012_FEAT_3CHAN  (1 << 1)
27 87ecb68b pbrook
#define TMU012_FEAT_EXTCLK (1 << 2)
28 87ecb68b pbrook
void tmu012_init(uint32_t base, int feat, uint32_t freq);
29 87ecb68b pbrook
30 87ecb68b pbrook
/* sh_serial.c */
31 87ecb68b pbrook
#define SH_SERIAL_FEAT_SCIF (1 << 0)
32 87ecb68b pbrook
void sh_serial_init (target_phys_addr_t base, int feat,
33 87ecb68b pbrook
                     uint32_t freq, CharDriverState *chr);
34 87ecb68b pbrook
35 87ecb68b pbrook
/* tc58128.c */
36 87ecb68b pbrook
int tc58128_init(struct SH7750State *s, char *zone1, char *zone2);
37 87ecb68b pbrook
38 87ecb68b pbrook
#endif