From f9049203d33847562de155a7c5bc75fe7a3e77f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juha=20Riihim=C3=A4ki?= Date: Fri, 29 Jul 2011 16:35:14 +0100 Subject: hw/omap_l4.c: Add helper function omap_l4_region_base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell Signed-off-by: Andrzej Zaborowski --- hw/omap_l4.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'hw/omap_l4.c') diff --git a/hw/omap_l4.c b/hw/omap_l4.c index 4af0ca8ea6..59c84b19a2 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; -- cgit v1.2.3