qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 01/17] tosa: convert to memory API
Date: Sun, 30 Oct 2011 16:33:38 +0200	[thread overview]
Message-ID: <1319985234-32371-2-git-send-email-avi@redhat.com> (raw)
In-Reply-To: <1319985234-32371-1-git-send-email-avi@redhat.com>

Signed-off-by: Avi Kivity <avi@redhat.com>
---
 hw/tosa.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/hw/tosa.c b/hw/tosa.c
index b992b99..67a71fe 100644
--- a/hw/tosa.c
+++ b/hw/tosa.c
@@ -208,6 +208,7 @@ static void tosa_init(ram_addr_t ram_size,
                 const char *initrd_filename, const char *cpu_model)
 {
     MemoryRegion *address_space_mem = get_system_memory();
+    MemoryRegion *rom = g_new(MemoryRegion, 1);
     PXA2xxState *cpu;
     TC6393xbState *tmio;
     DeviceState *scp0, *scp1;
@@ -217,8 +218,9 @@ static void tosa_init(ram_addr_t ram_size,
 
     cpu = pxa255_init(address_space_mem, tosa_binfo.ram_size);
 
-    cpu_register_physical_memory(0, TOSA_ROM,
-                    qemu_ram_alloc(NULL, "tosa.rom", TOSA_ROM) | IO_MEM_ROM);
+    memory_region_init_ram(rom, NULL, "tosa.rom", TOSA_ROM);
+    memory_region_set_readonly(rom, true);
+    memory_region_add_subregion(address_space_mem, 0, rom);
 
     tmio = tc6393xb_init(address_space_mem, 0x10000000,
             qdev_get_gpio_in(cpu->gpio, TOSA_GPIO_TC6393XB_INT));
-- 
1.7.6.3

  reply	other threads:[~2011-10-30 14:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-30 14:33 [Qemu-devel] [PATCH 00/17] Memory API conversions, batch 13 Avi Kivity
2011-10-30 14:33 ` Avi Kivity [this message]
2011-10-30 14:33 ` [Qemu-devel] [PATCH 02/17] versatilepb: convert to memory API Avi Kivity
2011-10-30 14:33 ` [Qemu-devel] [PATCH 03/17] vexpress: " Avi Kivity
2011-10-30 14:33 ` [Qemu-devel] [PATCH 04/17] virtex_ml507: " Avi Kivity
2011-10-30 14:33 ` [Qemu-devel] [PATCH 05/17] shix: " Avi Kivity
2011-10-30 14:33 ` [Qemu-devel] [PATCH 06/17] jazz_led: " Avi Kivity
2011-10-30 14:33 ` [Qemu-devel] [PATCH 07/17] parallel: " Avi Kivity
2011-10-30 14:33 ` [Qemu-devel] [PATCH 08/17] zaurus: " Avi Kivity
2011-10-30 14:33 ` [Qemu-devel] [PATCH 09/17] pl011: " Avi Kivity
2011-10-30 14:33 ` [Qemu-devel] [PATCH 10/17] pl022: " Avi Kivity
2011-10-30 14:33 ` [Qemu-devel] [PATCH 11/17] pl031: " Avi Kivity
2011-10-30 14:33 ` [Qemu-devel] [PATCH 12/17] pl050: " Avi Kivity
2011-10-30 14:33 ` [Qemu-devel] [PATCH 13/17] pl061: " Avi Kivity
2011-10-30 14:33 ` [Qemu-devel] [PATCH 14/17] pl080: " Avi Kivity
2011-10-30 14:33 ` [Qemu-devel] [PATCH 15/17] pl110: " Avi Kivity
2011-10-30 14:33 ` [Qemu-devel] [PATCH 16/17] pl181: " Avi Kivity
2011-10-30 14:33 ` [Qemu-devel] [PATCH 17/17] pl190: " Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1319985234-32371-2-git-send-email-avi@redhat.com \
    --to=avi@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).