From patchwork Mon Apr 4 15:28:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 89665 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]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CFEB7B6F12 for ; Tue, 5 Apr 2011 03:09:54 +1000 (EST) Received: from localhost ([127.0.0.1]:48326 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q6lke-0002OS-Eo for incoming@patchwork.ozlabs.org; Mon, 04 Apr 2011 11:31:36 -0400 Received: from [140.186.70.92] (port=33235 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q6lhe-0001yR-HG for qemu-devel@nongnu.org; Mon, 04 Apr 2011 11:28:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q6lhZ-0001nd-3m for qemu-devel@nongnu.org; Mon, 04 Apr 2011 11:28:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49046) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q6lhY-0001n4-Q1 for qemu-devel@nongnu.org; Mon, 04 Apr 2011 11:28:25 -0400 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.14.4/8.14.4) with ESMTP id p34FSOBB029253 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 4 Apr 2011 11:28:24 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p34FSM8k009709 for ; Mon, 4 Apr 2011 11:28:23 -0400 Received: from s01.tlv.redhat.com (s01.tlv.redhat.com [10.35.255.8]) by cleopatra.tlv.redhat.com (Postfix) with ESMTP id 4C575250B11; Mon, 4 Apr 2011 18:28:16 +0300 (IDT) From: Avi Kivity To: "Michael S. Tsirkin" Date: Mon, 4 Apr 2011 18:28:02 +0300 Message-Id: <1301930887-20705-6-git-send-email-avi@redhat.com> In-Reply-To: <1301930887-20705-1-git-send-email-avi@redhat.com> References: <1301930887-20705-1-git-send-email-avi@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. X-Received-From: 209.132.183.28 Cc: qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 05/10] ich/ahci: convert to pci_register_bar_simple() 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 Signed-off-by: Avi Kivity --- hw/ide/ahci.c | 9 --------- hw/ide/ahci.h | 3 --- hw/ide/ich.c | 3 +-- 3 files changed, 1 insertions(+), 14 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 98bdf70..c6e0c77 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1129,15 +1129,6 @@ void ahci_uninit(AHCIState *s) qemu_free(s->dev); } -void ahci_pci_map(PCIDevice *pci_dev, int region_num, - pcibus_t addr, pcibus_t size, int type) -{ - struct AHCIPCIState *d = (struct AHCIPCIState *)pci_dev; - AHCIState *s = &d->ahci; - - cpu_register_physical_memory(addr, size, s->mem); -} - void ahci_reset(void *opaque) { struct AHCIPCIState *d = opaque; diff --git a/hw/ide/ahci.h b/hw/ide/ahci.h index a4560c4..dc86951 100644 --- a/hw/ide/ahci.h +++ b/hw/ide/ahci.h @@ -325,9 +325,6 @@ typedef struct NCQFrame { void ahci_init(AHCIState *s, DeviceState *qdev, int ports); void ahci_uninit(AHCIState *s); -void ahci_pci_map(PCIDevice *pci_dev, int region_num, - pcibus_t addr, pcibus_t size, int type); - void ahci_reset(void *opaque); #endif /* HW_IDE_AHCI_H */ diff --git a/hw/ide/ich.c b/hw/ide/ich.c index f242d7a..eb00f03 100644 --- a/hw/ide/ich.c +++ b/hw/ide/ich.c @@ -95,8 +95,7 @@ static int pci_ich9_ahci_init(PCIDevice *dev) qemu_register_reset(ahci_reset, d); /* XXX BAR size should be 1k, but that breaks, so bump it to 4k for now */ - pci_register_bar(&d->card, 5, 0x1000, PCI_BASE_ADDRESS_SPACE_MEMORY, - ahci_pci_map); + pci_register_bar_simple(&d->card, 5, 0x1000, 0, d->ahci.mem); msi_init(dev, 0x50, 1, true, false);