[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 01/15] hw/omap_l4.c: Add helper function omap_l4_reg
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PATCH 01/15] hw/omap_l4.c: Add helper function omap_l4_region_base |
Date: |
Fri, 29 Jul 2011 16:35:14 +0100 |
From: Juha Riihimäki <address@hidden>
Add helper function omap_l4_region_base() to return the base address
of a particular region of an L4 target agent.
Signed-off-by: Juha Riihimäki <address@hidden>
[Riku Voipio: Fixes and restructuring patchset]
Signed-off-by: Riku Voipio <address@hidden>
[Peter Maydell: More fixes and cleanups for upstream submission]
Signed-off-by: Peter Maydell <address@hidden>
---
hw/omap.h | 2 ++
hw/omap_l4.c | 6 ++++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/hw/omap.h b/hw/omap.h
index c227a82..00a0ea9 100644
--- a/hw/omap.h
+++ b/hw/omap.h
@@ -93,6 +93,8 @@ struct omap_target_agent_s *omap_l4ta_get(
int cs);
target_phys_addr_t omap_l4_attach(struct omap_target_agent_s *ta, int region,
int iotype);
+target_phys_addr_t omap_l4_region_base(struct omap_target_agent_s *ta,
+ int region);
int l4_register_io_memory(CPUReadMemoryFunc * const *mem_read,
CPUWriteMemoryFunc * const *mem_write, void *opaque);
diff --git a/hw/omap_l4.c b/hw/omap_l4.c
index 4af0ca8..59c84b1 100644
--- a/hw/omap_l4.c
+++ b/hw/omap_l4.c
@@ -146,6 +146,12 @@ struct omap_l4_s *omap_l4_init(target_phys_addr_t base,
int ta_num)
return bus;
}
+target_phys_addr_t omap_l4_region_base(struct omap_target_agent_s *ta,
+ int region)
+{
+ return ta->bus->base + ta->start[region].offset;
+}
+
static uint32_t omap_l4ta_read(void *opaque, target_phys_addr_t addr)
{
struct omap_target_agent_s *s = (struct omap_target_agent_s *) opaque;
--
1.7.1
- [Qemu-devel] [PULL 00/15] omap patches (gpio, nand, onenand, lm832x), Peter Maydell, 2011/07/29
- [Qemu-devel] [PATCH 10/15] hw/nand: Writing to NAND can only clear bits, Peter Maydell, 2011/07/29
- [Qemu-devel] [PATCH 06/15] hw/nand: Pass block device state to init function, Peter Maydell, 2011/07/29
- [Qemu-devel] [PATCH 14/15] onenand: Ignore zero writes to boot command space, Peter Maydell, 2011/07/29
- [Qemu-devel] [PATCH 01/15] hw/omap_l4.c: Add helper function omap_l4_region_base,
Peter Maydell <=
- [Qemu-devel] [PATCH 08/15] hw/nand: Support devices wider than 8 bits, Peter Maydell, 2011/07/29
- [Qemu-devel] [PATCH 02/15] hw/omap_gpio.c: Don't complain about some writes to r/o registers, Peter Maydell, 2011/07/29
- [Qemu-devel] [PATCH 11/15] hw/nand: qdevify, Peter Maydell, 2011/07/29
- [Qemu-devel] [PATCH 15/15] hw/onenand: program actions can only clear bits, Peter Maydell, 2011/07/29
- [Qemu-devel] [PATCH 09/15] hw/nand: Support multiple reads following READ STATUS, Peter Maydell, 2011/07/29
- [Qemu-devel] [PATCH 13/15] onenand: Handle various ID fields separately, Peter Maydell, 2011/07/29
- [Qemu-devel] [PATCH 04/15] hw/omap_gpio.c: Convert to qdev, Peter Maydell, 2011/07/29