Revision bc24a225 hw/pxa.h
b/hw/pxa.h | ||
---|---|---|
70 | 70 |
void pxa27x_timer_init(target_phys_addr_t base, qemu_irq *irqs, qemu_irq irq4); |
71 | 71 |
|
72 | 72 |
/* pxa2xx_gpio.c */ |
73 |
struct pxa2xx_gpio_info_s;
|
|
74 |
struct pxa2xx_gpio_info_s *pxa2xx_gpio_init(target_phys_addr_t base,
|
|
73 |
typedef struct PXA2xxGPIOInfo PXA2xxGPIOInfo;
|
|
74 |
PXA2xxGPIOInfo *pxa2xx_gpio_init(target_phys_addr_t base,
|
|
75 | 75 |
CPUState *env, qemu_irq *pic, int lines); |
76 |
qemu_irq *pxa2xx_gpio_in_get(struct pxa2xx_gpio_info_s *s);
|
|
77 |
void pxa2xx_gpio_out_set(struct pxa2xx_gpio_info_s *s,
|
|
76 |
qemu_irq *pxa2xx_gpio_in_get(PXA2xxGPIOInfo *s);
|
|
77 |
void pxa2xx_gpio_out_set(PXA2xxGPIOInfo *s,
|
|
78 | 78 |
int line, qemu_irq handler); |
79 |
void pxa2xx_gpio_read_notifier(struct pxa2xx_gpio_info_s *s, qemu_irq handler);
|
|
79 |
void pxa2xx_gpio_read_notifier(PXA2xxGPIOInfo *s, qemu_irq handler);
|
|
80 | 80 |
|
81 | 81 |
/* pxa2xx_dma.c */ |
82 |
struct pxa2xx_dma_state_s;
|
|
83 |
struct pxa2xx_dma_state_s *pxa255_dma_init(target_phys_addr_t base,
|
|
82 |
typedef struct PXA2xxDMAState PXA2xxDMAState;
|
|
83 |
PXA2xxDMAState *pxa255_dma_init(target_phys_addr_t base,
|
|
84 | 84 |
qemu_irq irq); |
85 |
struct pxa2xx_dma_state_s *pxa27x_dma_init(target_phys_addr_t base,
|
|
85 |
PXA2xxDMAState *pxa27x_dma_init(target_phys_addr_t base,
|
|
86 | 86 |
qemu_irq irq); |
87 |
void pxa2xx_dma_request(struct pxa2xx_dma_state_s *s, int req_num, int on);
|
|
87 |
void pxa2xx_dma_request(PXA2xxDMAState *s, int req_num, int on);
|
|
88 | 88 |
|
89 | 89 |
/* pxa2xx_lcd.c */ |
90 |
struct pxa2xx_lcdc_s;
|
|
91 |
struct pxa2xx_lcdc_s *pxa2xx_lcdc_init(target_phys_addr_t base,
|
|
90 |
typedef struct PXA2xxLCDState PXA2xxLCDState;
|
|
91 |
PXA2xxLCDState *pxa2xx_lcdc_init(target_phys_addr_t base,
|
|
92 | 92 |
qemu_irq irq); |
93 |
void pxa2xx_lcd_vsync_notifier(struct pxa2xx_lcdc_s *s, qemu_irq handler);
|
|
93 |
void pxa2xx_lcd_vsync_notifier(PXA2xxLCDState *s, qemu_irq handler);
|
|
94 | 94 |
void pxa2xx_lcdc_oritentation(void *opaque, int angle); |
95 | 95 |
|
96 | 96 |
/* pxa2xx_mmci.c */ |
97 |
struct pxa2xx_mmci_s;
|
|
98 |
struct pxa2xx_mmci_s *pxa2xx_mmci_init(target_phys_addr_t base,
|
|
97 |
typedef struct PXA2xxMMCIState PXA2xxMMCIState;
|
|
98 |
PXA2xxMMCIState *pxa2xx_mmci_init(target_phys_addr_t base,
|
|
99 | 99 |
BlockDriverState *bd, qemu_irq irq, void *dma); |
100 |
void pxa2xx_mmci_handlers(struct pxa2xx_mmci_s *s, qemu_irq readonly,
|
|
100 |
void pxa2xx_mmci_handlers(PXA2xxMMCIState *s, qemu_irq readonly,
|
|
101 | 101 |
qemu_irq coverswitch); |
102 | 102 |
|
103 | 103 |
/* pxa2xx_pcmcia.c */ |
104 |
struct pxa2xx_pcmcia_s;
|
|
105 |
struct pxa2xx_pcmcia_s *pxa2xx_pcmcia_init(target_phys_addr_t base);
|
|
106 |
int pxa2xx_pcmcia_attach(void *opaque, struct pcmcia_card_s *card);
|
|
104 |
typedef struct PXA2xxPCMCIAState PXA2xxPCMCIAState;
|
|
105 |
PXA2xxPCMCIAState *pxa2xx_pcmcia_init(target_phys_addr_t base);
|
|
106 |
int pxa2xx_pcmcia_attach(void *opaque, PCMCIACardState *card);
|
|
107 | 107 |
int pxa2xx_pcmcia_dettach(void *opaque); |
108 | 108 |
void pxa2xx_pcmcia_set_irq_cb(void *opaque, qemu_irq irq, qemu_irq cd_irq); |
109 | 109 |
|
... | ... | |
112 | 112 |
int column; |
113 | 113 |
int row; |
114 | 114 |
}; |
115 |
struct pxa2xx_keypad_s;
|
|
116 |
struct pxa2xx_keypad_s *pxa27x_keypad_init(target_phys_addr_t base,
|
|
115 |
typedef struct PXA2xxKeyPadState PXA2xxKeyPadState;
|
|
116 |
PXA2xxKeyPadState *pxa27x_keypad_init(target_phys_addr_t base,
|
|
117 | 117 |
qemu_irq irq); |
118 |
void pxa27x_register_keypad(struct pxa2xx_keypad_s *kp, struct keymap *map,
|
|
118 |
void pxa27x_register_keypad(PXA2xxKeyPadState *kp, struct keymap *map,
|
|
119 | 119 |
int size); |
120 | 120 |
|
121 | 121 |
/* pxa2xx.c */ |
122 |
struct pxa2xx_ssp_s;
|
|
123 |
void pxa2xx_ssp_attach(struct pxa2xx_ssp_s *port,
|
|
122 |
typedef struct PXA2xxSSPState PXA2xxSSPState;
|
|
123 |
void pxa2xx_ssp_attach(PXA2xxSSPState *port,
|
|
124 | 124 |
uint32_t (*readfn)(void *opaque), |
125 | 125 |
void (*writefn)(void *opaque, uint32_t value), void *opaque); |
126 | 126 |
|
127 |
struct pxa2xx_i2c_s;
|
|
128 |
struct pxa2xx_i2c_s *pxa2xx_i2c_init(target_phys_addr_t base,
|
|
127 |
typedef struct PXA2xxI2CState PXA2xxI2CState;
|
|
128 |
PXA2xxI2CState *pxa2xx_i2c_init(target_phys_addr_t base,
|
|
129 | 129 |
qemu_irq irq, uint32_t page_size); |
130 |
i2c_bus *pxa2xx_i2c_bus(struct pxa2xx_i2c_s *s);
|
|
130 |
i2c_bus *pxa2xx_i2c_bus(PXA2xxI2CState *s);
|
|
131 | 131 |
|
132 |
struct pxa2xx_i2s_s;
|
|
133 |
struct pxa2xx_fir_s;
|
|
132 |
typedef struct PXA2xxI2SState PXA2xxI2SState;
|
|
133 |
typedef struct PXA2xxFIrState PXA2xxFIrState;
|
|
134 | 134 |
|
135 |
struct pxa2xx_state_s {
|
|
135 |
typedef struct {
|
|
136 | 136 |
CPUState *env; |
137 | 137 |
qemu_irq *pic; |
138 | 138 |
qemu_irq reset; |
139 |
struct pxa2xx_dma_state_s *dma;
|
|
140 |
struct pxa2xx_gpio_info_s *gpio;
|
|
141 |
struct pxa2xx_lcdc_s *lcd;
|
|
142 |
struct pxa2xx_ssp_s **ssp;
|
|
143 |
struct pxa2xx_i2c_s *i2c[2];
|
|
144 |
struct pxa2xx_mmci_s *mmc;
|
|
145 |
struct pxa2xx_pcmcia_s *pcmcia[2];
|
|
146 |
struct pxa2xx_i2s_s *i2s;
|
|
147 |
struct pxa2xx_fir_s *fir;
|
|
148 |
struct pxa2xx_keypad_s *kp;
|
|
139 |
PXA2xxDMAState *dma;
|
|
140 |
PXA2xxGPIOInfo *gpio;
|
|
141 |
PXA2xxLCDState *lcd;
|
|
142 |
PXA2xxSSPState **ssp;
|
|
143 |
PXA2xxI2CState *i2c[2];
|
|
144 |
PXA2xxMMCIState *mmc;
|
|
145 |
PXA2xxPCMCIAState *pcmcia[2];
|
|
146 |
PXA2xxI2SState *i2s;
|
|
147 |
PXA2xxFIrState *fir;
|
|
148 |
PXA2xxKeyPadState *kp;
|
|
149 | 149 |
|
150 | 150 |
/* Power management */ |
151 | 151 |
target_phys_addr_t pm_base; |
... | ... | |
189 | 189 |
QEMUTimer *rtc_swal1; |
190 | 190 |
QEMUTimer *rtc_swal2; |
191 | 191 |
QEMUTimer *rtc_pi; |
192 |
}; |
|
192 |
} PXA2xxState;
|
|
193 | 193 |
|
194 |
struct pxa2xx_i2s_s {
|
|
194 |
struct PXA2xxI2SState {
|
|
195 | 195 |
qemu_irq irq; |
196 |
struct pxa2xx_dma_state_s *dma;
|
|
196 |
PXA2xxDMAState *dma;
|
|
197 | 197 |
void (*data_req)(void *, int, int); |
198 | 198 |
|
199 | 199 |
uint32_t control[2]; |
... | ... | |
215 | 215 |
# define PA_FMT "0x%08lx" |
216 | 216 |
# define REG_FMT "0x" TARGET_FMT_plx |
217 | 217 |
|
218 |
struct pxa2xx_state_s *pxa270_init(unsigned int sdram_size, const char *revision);
|
|
219 |
struct pxa2xx_state_s *pxa255_init(unsigned int sdram_size);
|
|
218 |
PXA2xxState *pxa270_init(unsigned int sdram_size, const char *revision);
|
|
219 |
PXA2xxState *pxa255_init(unsigned int sdram_size);
|
|
220 | 220 |
|
221 | 221 |
/* usb-ohci.c */ |
222 | 222 |
void usb_ohci_init_pxa(target_phys_addr_t base, int num_ports, int devfn, |
Also available in: Unified diff