From patchwork Fri Dec 17 17:44:31 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 75944 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by ozlabs.org (Postfix) with ESMTP id 56E8E1007D6 for ; Sat, 18 Dec 2010 05:15:48 +1100 (EST) Received: from localhost ([127.0.0.1]:33654 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTel6-00063X-W5 for incoming@patchwork.ozlabs.org; Fri, 17 Dec 2010 13:10:25 -0500 Received: from [140.186.70.92] (port=51950 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTeNL-0001QD-4e for qemu-devel@nongnu.org; Fri, 17 Dec 2010 12:46:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PTeM2-00034n-0M for qemu-devel@nongnu.org; Fri, 17 Dec 2010 12:45:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:16585) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PTeM1-00034f-Of for qemu-devel@nongnu.org; Fri, 17 Dec 2010 12:44:29 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oBHHiPku022814 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 17 Dec 2010 12:44:25 -0500 Received: from dhcp-5-188.str.redhat.com (vpn1-5-143.ams2.redhat.com [10.36.5.143]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id oBHHhdMZ031047; Fri, 17 Dec 2010 12:44:24 -0500 From: Kevin Wolf To: anthony@codemonkey.ws Date: Fri, 17 Dec 2010 18:44:31 +0100 Message-Id: <1292607893-13461-17-git-send-email-kwolf@redhat.com> In-Reply-To: <1292607893-13461-1-git-send-email-kwolf@redhat.com> References: <1292607893-13461-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: kwolf@redhat.com, qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 16/38] ahci: set SATA Mode Select X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Sebastian Herbszt Set SATA Mode Select to AHCI in the Address Map Register. Signed-off-by: Sebastian Herbszt Signed-off-by: Kevin Wolf --- hw/ide/ahci.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index f937a92..8ae236a 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -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 */