From: "Benoît Canet" <benoit.canet@gmail.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, "Benoît Canet" <benoit.canet@gmail.com>,
agraf@suse.de
Subject: [Qemu-devel] [PATCH v2 3/3] sysbus: remove sysbus_init_mmio_cb2
Date: Wed, 14 Dec 2011 15:32:09 +0100 [thread overview]
Message-ID: <1323873129-29742-4-git-send-email-benoit.canet@gmail.com> (raw)
In-Reply-To: <1323873129-29742-1-git-send-email-benoit.canet@gmail.com>
This function is not longer in use so remove it.
Signed-off-by: Benoît Canet <benoit.canet@gmail.com>
---
hw/sysbus.c | 16 ----------------
hw/sysbus.h | 5 -----
2 files changed, 0 insertions(+), 21 deletions(-)
diff --git a/hw/sysbus.c b/hw/sysbus.c
index b315a8c..81a57bd 100644
--- a/hw/sysbus.c
+++ b/hw/sysbus.c
@@ -53,8 +53,6 @@ void sysbus_mmio_map(SysBusDevice *dev, int n, target_phys_addr_t addr)
if (dev->mmio[n].memory) {
memory_region_del_subregion(get_system_memory(),
dev->mmio[n].memory);
- } else if (dev->mmio[n].unmap) {
- dev->mmio[n].unmap(dev, dev->mmio[n].addr);
}
}
dev->mmio[n].addr = addr;
@@ -62,8 +60,6 @@ void sysbus_mmio_map(SysBusDevice *dev, int n, target_phys_addr_t addr)
memory_region_add_subregion(get_system_memory(),
addr,
dev->mmio[n].memory);
- } else if (dev->mmio[n].cb) {
- dev->mmio[n].cb(dev, addr);
}
}
@@ -89,18 +85,6 @@ void sysbus_pass_irq(SysBusDevice *dev, SysBusDevice *target)
}
}
-void sysbus_init_mmio_cb2(SysBusDevice *dev,
- mmio_mapfunc cb, mmio_mapfunc unmap)
-{
- int n;
-
- assert(dev->num_mmio < QDEV_MAX_MMIO);
- n = dev->num_mmio++;
- dev->mmio[n].addr = -1;
- dev->mmio[n].cb = cb;
- dev->mmio[n].unmap = unmap;
-}
-
void sysbus_init_mmio(SysBusDevice *dev, MemoryRegion *memory)
{
int n;
diff --git a/hw/sysbus.h b/hw/sysbus.h
index 9bac582..2f4025b 100644
--- a/hw/sysbus.h
+++ b/hw/sysbus.h
@@ -11,7 +11,6 @@
#define QDEV_MAX_IRQ 256
typedef struct SysBusDevice SysBusDevice;
-typedef void (*mmio_mapfunc)(SysBusDevice *dev, target_phys_addr_t addr);
struct SysBusDevice {
DeviceState qdev;
@@ -21,8 +20,6 @@ struct SysBusDevice {
int num_mmio;
struct {
target_phys_addr_t addr;
- mmio_mapfunc cb;
- mmio_mapfunc unmap;
MemoryRegion *memory;
} mmio[QDEV_MAX_MMIO];
int num_pio;
@@ -43,8 +40,6 @@ typedef struct {
void sysbus_register_dev(const char *name, size_t size, sysbus_initfn init);
void sysbus_register_withprop(SysBusDeviceInfo *info);
void *sysbus_new(void);
-void sysbus_init_mmio_cb2(SysBusDevice *dev,
- mmio_mapfunc cb, mmio_mapfunc unmap);
void sysbus_init_mmio(SysBusDevice *dev, MemoryRegion *memory);
MemoryRegion *sysbus_mmio_get_region(SysBusDevice *dev, int n);
void sysbus_init_irq(SysBusDevice *dev, qemu_irq *p);
--
1.7.7.4
next prev parent reply other threads:[~2011-12-14 14:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-14 14:32 [Qemu-devel] [PATCH v2 0/3] remove sysbus_init_mmio_cb2 usage Benoît Canet
2011-12-14 14:32 ` [Qemu-devel] [PATCH v2 1/3] sh_pci: " Benoît Canet
2011-12-14 14:32 ` [Qemu-devel] [PATCH v2 2/3] ppce500_pci: " Benoît Canet
2011-12-14 14:32 ` Benoît Canet [this message]
2011-12-15 16:22 ` [Qemu-devel] [PATCH v2 0/3] " Anthony Liguori
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=1323873129-29742-4-git-send-email-benoit.canet@gmail.com \
--to=benoit.canet@gmail.com \
--cc=agraf@suse.de \
--cc=peter.maydell@linaro.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.