]> git.proxmox.com Git - mirror_qemu.git/blame - hw/sh.h
CRIS: remove unused op_template.h.
[mirror_qemu.git] / hw / sh.h
CommitLineData
87ecb68b
PB
1#ifndef QEMU_SH_H
2#define QEMU_SH_H
3/* Definitions for SH board emulation. */
4
703243a0
AZ
5#include "sh_intc.h"
6
87ecb68b
PB
7/* sh7750.c */
8struct SH7750State;
9
10struct SH7750State *sh7750_init(CPUState * cpu);
11
12typedef 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
24int 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)
703243a0
AZ
30void 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
87ecb68b
PB
34
35/* sh_serial.c */
36#define SH_SERIAL_FEAT_SCIF (1 << 0)
37void sh_serial_init (target_phys_addr_t base, int feat,
bf5b7423
AJ
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);
87ecb68b
PB
44
45/* tc58128.c */
7ccfb2eb 46int tc58128_init(struct SH7750State *s, const char *zone1, const char *zone2);
87ecb68b
PB
47
48#endif