From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Riku Voipio" <riku.voipio@iki.fi>,
"Juha Riihimäki" <juha.riihimaki@nokia.com>,
patches@linaro.org
Subject: [Qemu-devel] [PATCH 1/3] hw/omap_l4.c: Add helper function omap_l4_base
Date: Wed, 29 Jun 2011 19:53:09 +0100 [thread overview]
Message-ID: <1309373591-30380-2-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1309373591-30380-1-git-send-email-peter.maydell@linaro.org>
From: Juha Riihimäki <juha.riihimaki@nokia.com>
Add helper function omap_l4_base() to return the base address of a
particular region of an L4 target agent.
Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
[Riku Voipio: Fixes and restructuring patchset]
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
[Peter Maydell: More fixes and cleanups for upstream submission]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/omap.h | 1 +
hw/omap_l4.c | 5 +++++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/hw/omap.h b/hw/omap.h
index c227a82..339cc00 100644
--- a/hw/omap.h
+++ b/hw/omap.h
@@ -93,6 +93,7 @@ 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_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..8ab811d 100644
--- a/hw/omap_l4.c
+++ b/hw/omap_l4.c
@@ -146,6 +146,11 @@ struct omap_l4_s *omap_l4_init(target_phys_addr_t base, int ta_num)
return bus;
}
+target_phys_addr_t omap_l4_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
next prev parent reply other threads:[~2011-06-29 18:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-29 18:53 [Qemu-devel] [PATCH 0/3] omap_gpio: convert to qdev Peter Maydell
2011-06-29 18:53 ` Peter Maydell [this message]
2011-06-29 18:53 ` [Qemu-devel] [PATCH 2/3] hw/omap_gpio.c: Don't complain about some writes to r/o registers Peter Maydell
2011-06-29 20:07 ` Edgar E. Iglesias
2011-06-29 20:39 ` Peter Maydell
2011-06-29 20:49 ` Edgar E. Iglesias
2011-06-29 18:53 ` [Qemu-devel] [PATCH 3/3] hw/omap_gpio.c: Convert to qdev Peter Maydell
2011-07-04 22:39 ` andrzej zaborowski
2011-07-05 13:19 ` Peter Maydell
2011-07-07 15:29 ` andrzej zaborowski
2011-07-07 16:00 ` Peter Maydell
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=1309373591-30380-2-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=juha.riihimaki@nokia.com \
--cc=patches@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
/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).