Revision 47103572 hw/ppc_prep.c

b/hw/ppc_prep.c
1 1
/*
2 2
 * QEMU PPC PREP hardware System Emulator
3 3
 * 
4
 * Copyright (c) 2003-2004 Jocelyn Mayer
4
 * Copyright (c) 2003-2007 Jocelyn Mayer
5 5
 * 
6 6
 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 7
 * of this software and associated documentation files (the "Software"), to deal
......
84 84
#endif
85 85
}
86 86

  
87
static uint32_t speaker_ioport_read(void *opaque, uint32_t addr)
87
static uint32_t speaker_ioport_read (void *opaque, uint32_t addr)
88 88
{
89 89
#if 0
90 90
    int out;
91 91
    out = pit_get_out(pit, 2, qemu_get_clock(vm_clock));
92 92
    dummy_refresh_clock ^= 1;
93 93
    return (speaker_data_on << 1) | pit_get_gate(pit, 2) | (out << 5) |
94
      (dummy_refresh_clock << 4);
94
        (dummy_refresh_clock << 4);
95 95
#endif
96 96
    return 0;
97 97
}
98 98

  
99
static void pic_irq_request(void *opaque, int level)
99
static void pic_irq_request (void *opaque, int level)
100 100
{
101
    if (level)
102
        cpu_interrupt(first_cpu, CPU_INTERRUPT_HARD);
103
    else
104
        cpu_reset_interrupt(first_cpu, CPU_INTERRUPT_HARD);
101
    ppc_set_irq(opaque, PPC_INTERRUPT_EXT, level);
105 102
}
106 103

  
107 104
/* PCI intack register */
108 105
/* Read-only register (?) */
109
static void _PPC_intack_write (void *opaque, target_phys_addr_t addr, uint32_t value)
106
static void _PPC_intack_write (void *opaque,
107
                               target_phys_addr_t addr, uint32_t value)
110 108
{
111 109
    //    printf("%s: 0x%08x => 0x%08x\n", __func__, addr, value);
112 110
}
......
294 292
        /* Special port 92 */
295 293
        /* Check soft reset asked */
296 294
        if (val & 0x01) {
297
            //            cpu_interrupt(first_cpu, CPU_INTERRUPT_RESET);
295
            //            cpu_interrupt(first_cpu, PPC_INTERRUPT_RESET);
298 296
        }
299 297
        /* Check LE mode */
300 298
        if (val & 0x02) {

Also available in: Unified diff