~ubuntu-branches/ubuntu/vivid/qemu-linaro/vivid

« back to all changes in this revision

Viewing changes to hw/ide/piix.c

  • Committer: Ricardo Salveti de Araujo
  • Date: 2012-09-20 18:39:31 UTC
  • mfrom: (12922.1.2 qemu-linaro)
  • Revision ID: ricardo.salveti@linaro.org-20120920183931-sp3cg6kpdl8dmwo9
* New upstream release.
  - support emulated systems with more than 2G of memory. (LP: #1030588)
* Drop powerpc-missing-include.patch - merged upstream.
* Update debian/control:
  - drop perl build dependency.
  - add libfdt-dev build dependency.
* Update debian/qemu-keymaps.install file.
* Update debian/rules:
  - update QEMU_CPU for ARM architecture: armv4l -> armv7l.
  - update conf_audio_drv: default to PulseAudio since PA is the default on
    Ubuntu.
  - enable KVM on ARM architecture.
  - enable flat device tree support (--enable-fdt). (LP: #1030594)

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
23
 * THE SOFTWARE.
24
24
 */
 
25
 
25
26
#include <hw/hw.h>
26
27
#include <hw/pc.h>
27
28
#include <hw/pci.h>
28
29
#include <hw/isa.h>
29
 
#include "block.h"
 
30
#include "blockdev.h"
30
31
#include "sysemu.h"
31
32
#include "dma.h"
32
33
 
72
73
#endif
73
74
    switch(addr & 3) {
74
75
    case 0:
75
 
        return bmdma_cmd_writeb(bm, val);
 
76
        bmdma_cmd_writeb(bm, val);
 
77
        break;
76
78
    case 2:
77
79
        bm->status = (val & 0x60) | (bm->status & 1) | (bm->status & ~val & 0x06);
78
80
        break;
79
81
    }
80
82
}
81
83
 
82
 
static MemoryRegionOps piix_bmdma_ops = {
 
84
static const MemoryRegionOps piix_bmdma_ops = {
83
85
    .read = bmdma_read,
84
86
    .write = bmdma_write,
85
87
};
199
201
    return dev;
200
202
}
201
203
 
202
 
static int pci_piix_ide_exitfn(PCIDevice *dev)
 
204
static void pci_piix_ide_exitfn(PCIDevice *dev)
203
205
{
204
206
    PCIIDEState *d = DO_UPCAST(PCIIDEState, dev, dev);
205
207
    unsigned i;
211
213
        memory_region_destroy(&d->bmdma[i].addr_ioport);
212
214
    }
213
215
    memory_region_destroy(&d->bmdma_bar);
214
 
 
215
 
    return 0;
216
216
}
217
217
 
218
218
/* hd_table must contain 4 block drivers */