From: "Alex Bennée" <alex.bennee@linaro.org>
To: Fabian Aggeler <aggelerf@ethz.ch>
Cc: peter.maydell@linaro.org, peter.crosthwaite@xilinx.com,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] hw/arm/vexpress: add SP810 to the vexpress
Date: Wed, 16 Jul 2014 16:05:13 +0100 [thread overview]
Message-ID: <871ttl5oo1.fsf@linaro.org> (raw)
In-Reply-To: <1405521777-24085-3-git-send-email-aggelerf@ethz.ch>
Fabian Aggeler writes:
> The SP810, which is present in the Versatile Express motherboards,
> allows to set the timing reference to either REFCLK or TIMCLK.
> QEMU currently sets the SP804 timer to 1MHz by default. To reflect
> this, we set the TimerEn0Sel, TimerEn1Sel, TimerEn2Sel, and
> TimerEn3Sel of the system control register (SCCTRL) to TIMCLK (1).
>
> Signed-off-by: Fabian Aggeler <aggelerf@ethz.ch>
> ---
> hw/arm/vexpress.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c
> index a88732c..b96c3fd 100644
> --- a/hw/arm/vexpress.c
> +++ b/hw/arm/vexpress.c
> @@ -512,7 +512,7 @@ static pflash_t *ve_pflash_cfi01_register(hwaddr base, const char *name,
> static void vexpress_common_init(VEDBoardInfo *daughterboard,
> MachineState *machine)
> {
> - DeviceState *dev, *sysctl, *pl041;
> + DeviceState *dev, *sysctl, *pl041, *sp810;
> qemu_irq pic[64];
> uint32_t sys_id;
> DriveInfo *dinfo;
> @@ -575,7 +575,14 @@ static void vexpress_common_init(VEDBoardInfo *daughterboard,
> qdev_init_nofail(sysctl);
> sysbus_mmio_map(SYS_BUS_DEVICE(sysctl), 0, map[VE_SYSREGS]);
>
> - /* VE_SP810: not modelled */
> + /* VE_SP810 */
> + sp810 = qdev_create(NULL, "arm_sp810");
> + /* SP804 is already running at 1MHz (TIMCLK) so SCCTRL TimerEnXSel=1 */
> + qdev_prop_set_uint32(sp810, "sc-ctrl", (1 << 15) | (1 << 17)
> + | (1 << 19) | (1 << 21));
<snip>
Could the #defines in the first patch be moved into a header and used
here rather than manually setting these bits?
--
Alex Bennée
next prev parent reply other threads:[~2014-07-16 15:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-16 14:42 [Qemu-devel] [PATCH 0/2] Add SP810 to Versatile Express boards Fabian Aggeler
2014-07-16 14:42 ` [Qemu-devel] [PATCH 1/2] hw/misc/arm_sp810: Create SP810 device Fabian Aggeler
2014-07-16 23:21 ` Peter Crosthwaite
2014-07-16 14:42 ` [Qemu-devel] [PATCH 2/2] hw/arm/vexpress: add SP810 to the vexpress Fabian Aggeler
2014-07-16 15:05 ` Alex Bennée [this message]
2014-07-16 23:29 ` Peter Crosthwaite
2014-08-05 9:22 ` Aggeler Fabian
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=871ttl5oo1.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=aggelerf@ethz.ch \
--cc=peter.crosthwaite@xilinx.com \
--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 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).