]> xenbits.xensource.com Git - qemu-xen-4.1-testing.git/commitdiff
ahci: set SATA Mode Select
authorSebastian Herbszt <herbszt@gmx.de>
Tue, 14 Dec 2010 00:34:43 +0000 (01:34 +0100)
committerKevin Wolf <kwolf@redhat.com>
Fri, 17 Dec 2010 15:11:03 +0000 (16:11 +0100)
Set SATA Mode Select to AHCI in the Address Map Register.

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/ide/ahci.c

index f937a92edf3feebc82072ef585d26ecd3e7ce7fd..8ae236af30408359f3e3f66f97e1f5089dab1e22 100644 (file)
@@ -1473,6 +1473,9 @@ static int pci_ahci_init(PCIDevice *dev)
     d->card.config[PCI_LATENCY_TIMER]   = 0x00;  /* Latency timer */
     pci_config_set_interrupt_pin(d->card.config, 1);
 
+    /* XXX Software should program this register */
+    d->card.config[0x90]   = 1 << 6; /* Address Map Register - AHCI mode */
+
     qemu_register_reset(ahci_reset, d);
 
     /* XXX BAR size should be 1k, but that breaks, so bump it to 4k for now */