From patchwork Tue Dec 4 16:48:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 203688 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6E7F72C0090 for ; Wed, 5 Dec 2012 03:48:41 +1100 (EST) Received: from localhost ([::1]:57241 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tfvfj-0003BL-72 for incoming@patchwork.ozlabs.org; Tue, 04 Dec 2012 11:48:39 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tfvfa-0003B3-B8 for qemu-devel@nongnu.org; Tue, 04 Dec 2012 11:48:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TfvfT-0005po-Np for qemu-devel@nongnu.org; Tue, 04 Dec 2012 11:48:30 -0500 Received: from cantor2.suse.de ([195.135.220.15]:33204 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfvfT-0005pf-HN for qemu-devel@nongnu.org; Tue, 04 Dec 2012 11:48:23 -0500 Received: from relay1.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id BECB7A5204; Tue, 4 Dec 2012 17:48:22 +0100 (CET) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Tue, 4 Dec 2012 17:48:11 +0100 Message-Id: <1354639696-22168-2-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1354639696-22168-1-git-send-email-afaerber@suse.de> References: <1354639696-22168-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 195.135.220.15 Cc: Julien Grall , =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [PATCH 1/6] isa: Add isa_address_space_io() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Julien Grall This function permits to retrieve ISA IO address space. It will be usefull when we need to pass IO address space as argument. Signed-off-by: Julien Grall Acked-by: Avi Kivity Signed-off-by: Andreas Färber --- hw/isa-bus.c | 9 +++++++++ hw/isa.h | 1 + 2 Dateien geändert, 10 Zeilen hinzugefügt(+) diff --git a/hw/isa-bus.c b/hw/isa-bus.c index 685fdc0..144a88e 100644 --- a/hw/isa-bus.c +++ b/hw/isa-bus.c @@ -264,4 +264,13 @@ MemoryRegion *isa_address_space(ISADevice *dev) return get_system_memory(); } +MemoryRegion *isa_address_space_io(ISADevice *dev) +{ + if (dev) { + return isa_bus_from_device(dev)->address_space_io; + } + + return isabus->address_space_io; +} + type_init(isabus_register_types) diff --git a/hw/isa.h b/hw/isa.h index f9382e8..9d719fa 100644 --- a/hw/isa.h +++ b/hw/isa.h @@ -43,6 +43,7 @@ void isa_bus_irqs(ISABus *bus, qemu_irq *irqs); qemu_irq isa_get_irq(ISADevice *dev, int isairq); void isa_init_irq(ISADevice *dev, qemu_irq *p, int isairq); MemoryRegion *isa_address_space(ISADevice *dev); +MemoryRegion *isa_address_space_io(ISADevice *dev); ISADevice *isa_create(ISABus *bus, const char *name); ISADevice *isa_try_create(ISABus *bus, const char *name); ISADevice *isa_create_simple(ISABus *bus, const char *name);