mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
Follow coding conventions
Remove explicit struct qualifiers and rename structure types. Signed-off-by: Paul Brook <paul@codesourcery.com>
This commit is contained in:
parent
d4ec522882
commit
bc24a225af
56 changed files with 864 additions and 862 deletions
28
hw/zaurus.c
28
hw/zaurus.c
|
@ -29,7 +29,7 @@
|
|||
|
||||
/* SCOOP devices */
|
||||
|
||||
struct scoop_info_s {
|
||||
struct ScoopInfo {
|
||||
qemu_irq handler[16];
|
||||
qemu_irq *in;
|
||||
uint16_t status;
|
||||
|
@ -58,7 +58,7 @@ struct scoop_info_s {
|
|||
#define SCOOP_GPWR 0x24
|
||||
#define SCOOP_GPRR 0x28
|
||||
|
||||
static inline void scoop_gpio_handler_update(struct scoop_info_s *s) {
|
||||
static inline void scoop_gpio_handler_update(ScoopInfo *s) {
|
||||
uint32_t level, diff;
|
||||
int bit;
|
||||
level = s->gpio_level & s->gpio_dir;
|
||||
|
@ -73,7 +73,7 @@ static inline void scoop_gpio_handler_update(struct scoop_info_s *s) {
|
|||
|
||||
static uint32_t scoop_readb(void *opaque, target_phys_addr_t addr)
|
||||
{
|
||||
struct scoop_info_s *s = (struct scoop_info_s *) opaque;
|
||||
ScoopInfo *s = (ScoopInfo *) opaque;
|
||||
|
||||
switch (addr) {
|
||||
case SCOOP_MCR:
|
||||
|
@ -106,7 +106,7 @@ static uint32_t scoop_readb(void *opaque, target_phys_addr_t addr)
|
|||
|
||||
static void scoop_writeb(void *opaque, target_phys_addr_t addr, uint32_t value)
|
||||
{
|
||||
struct scoop_info_s *s = (struct scoop_info_s *) opaque;
|
||||
ScoopInfo *s = (ScoopInfo *) opaque;
|
||||
value &= 0xffff;
|
||||
|
||||
switch (addr) {
|
||||
|
@ -160,7 +160,7 @@ static CPUWriteMemoryFunc *scoop_writefn[] = {
|
|||
|
||||
void scoop_gpio_set(void *opaque, int line, int level)
|
||||
{
|
||||
struct scoop_info_s *s = (struct scoop_info_s *) s;
|
||||
ScoopInfo *s = (ScoopInfo *) s;
|
||||
|
||||
if (level)
|
||||
s->gpio_level |= (1 << line);
|
||||
|
@ -168,12 +168,12 @@ void scoop_gpio_set(void *opaque, int line, int level)
|
|||
s->gpio_level &= ~(1 << line);
|
||||
}
|
||||
|
||||
qemu_irq *scoop_gpio_in_get(struct scoop_info_s *s)
|
||||
qemu_irq *scoop_gpio_in_get(ScoopInfo *s)
|
||||
{
|
||||
return s->in;
|
||||
}
|
||||
|
||||
void scoop_gpio_out_set(struct scoop_info_s *s, int line,
|
||||
void scoop_gpio_out_set(ScoopInfo *s, int line,
|
||||
qemu_irq handler) {
|
||||
if (line >= 16) {
|
||||
fprintf(stderr, "No GPIO pin %i\n", line);
|
||||
|
@ -185,7 +185,7 @@ void scoop_gpio_out_set(struct scoop_info_s *s, int line,
|
|||
|
||||
static void scoop_save(QEMUFile *f, void *opaque)
|
||||
{
|
||||
struct scoop_info_s *s = (struct scoop_info_s *) opaque;
|
||||
ScoopInfo *s = (ScoopInfo *) opaque;
|
||||
qemu_put_be16s(f, &s->status);
|
||||
qemu_put_be16s(f, &s->power);
|
||||
qemu_put_be32s(f, &s->gpio_level);
|
||||
|
@ -202,7 +202,7 @@ static void scoop_save(QEMUFile *f, void *opaque)
|
|||
static int scoop_load(QEMUFile *f, void *opaque, int version_id)
|
||||
{
|
||||
uint16_t dummy;
|
||||
struct scoop_info_s *s = (struct scoop_info_s *) opaque;
|
||||
ScoopInfo *s = (ScoopInfo *) opaque;
|
||||
qemu_get_be16s(f, &s->status);
|
||||
qemu_get_be16s(f, &s->power);
|
||||
qemu_get_be32s(f, &s->gpio_level);
|
||||
|
@ -220,15 +220,15 @@ static int scoop_load(QEMUFile *f, void *opaque, int version_id)
|
|||
return 0;
|
||||
}
|
||||
|
||||
struct scoop_info_s *scoop_init(struct pxa2xx_state_s *cpu,
|
||||
ScoopInfo *scoop_init(PXA2xxState *cpu,
|
||||
int instance,
|
||||
target_phys_addr_t target_base) {
|
||||
int iomemtype;
|
||||
struct scoop_info_s *s;
|
||||
ScoopInfo *s;
|
||||
|
||||
s = (struct scoop_info_s *)
|
||||
qemu_mallocz(sizeof(struct scoop_info_s));
|
||||
memset(s, 0, sizeof(struct scoop_info_s));
|
||||
s = (ScoopInfo *)
|
||||
qemu_mallocz(sizeof(ScoopInfo));
|
||||
memset(s, 0, sizeof(ScoopInfo));
|
||||
|
||||
s->status = 0x02;
|
||||
s->in = qemu_allocate_irqs(scoop_gpio_set, s, 16);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue