From: Bamvor Jian Zhang <bjzhang@suse.com>
To: xen-devel@lists.xen.org
Cc: bjzhang@suse.com, andre.przywara@calxeda.com,
julien.grall@linaro.org, ian.campbell@citrix.com,
Stefano.Stabellini@eu.citrix.com
Subject: [PATCH 4/4] xen/arm: enable switch to hyper mode for sun6i
Date: Fri, 31 May 2013 20:53:34 +0800 [thread overview]
Message-ID: <1370004814-30686-5-git-send-email-bjzhang@suse.com> (raw)
In-Reply-To: <1370004814-30686-1-git-send-email-bjzhang@suse.com>
Signed-off-by: Bamvor Jian Zhang <bjzhang@suse.com>
---
xen/arch/arm/arm32/mode_switch.S | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/xen/arch/arm/arm32/mode_switch.S b/xen/arch/arm/arm32/mode_switch.S
index c92a1cf..0fc26e0 100644
--- a/xen/arch/arm/arm32/mode_switch.S
+++ b/xen/arch/arm/arm32/mode_switch.S
@@ -21,6 +21,7 @@
#include <asm/page.h>
#include <asm/platforms/vexpress.h>
#include <asm/platforms/exynos5.h>
+#include <asm/platforms/sun6i.h>
#include <asm/asm_defns.h>
#include <asm/gic.h>
@@ -90,15 +91,23 @@ enter_hyp_mode:
bic r0, r0, #0xe /* Clear EA, FIQ and IRQ */
mcr CP32(r0, SCR)
- ldr r2, =MACH_TYPE_SMDK5250 /* r4 := Arndale machine ID */
/* By default load Arndale defaults values */
+ ldr r2, =MACH_TYPE_SMDK5250 /* r4 := Arndale machine ID */
ldr r0, =EXYNOS5_TIMER_FREQUENCY /* r0 := timer's frequency */
ldr r1, =EXYNOS5_GIC_BASE_ADDRESS /* r1 := GIC base address */
- /* If it's not the Arndale machine ID, load VE values */
teq r5, r2
+ beq board_set_done
+ /* If it's not the Arndale machine ID, try sun6i */
+ ldr r2, =MACH_TYPE_SUN6I /* r2 := sun6i machine ID */
+ ldr r0, =SUN6I_TIMER_FREQUENCY /* r0 := timer's frequency */
+ ldr r1, =SUN6I_GIC_BASE_ADDRESS /* r1 := GIC base address */
+ teq r5, r2
+ beq board_set_done
+ /* If it's not the sun6i machine ID, load VE values */
ldrne r0, =V2M_TIMER_FREQUENCY
ldrne r1, =V2M_GIC_BASE_ADDRESS
+board_set_done:
/* Ugly: the system timer's frequency register is only
* programmable in Secure state. Since we don't know where its
* memory-mapped control registers live, we can't find out the
--
1.8.1.4
next prev parent reply other threads:[~2013-05-31 12:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-31 12:53 [PATCH 0/4] xen/arm: assemble support for Allwinner A31 Bamvor Jian Zhang
2013-05-31 12:53 ` [PATCH 1/4] xen/arm: introduce Cortex-A7 support Bamvor Jian Zhang
2013-06-12 9:57 ` Ian Campbell
2013-06-18 6:34 ` Bamvor Jian Zhang
2013-06-18 9:24 ` Ian Campbell
2013-05-31 12:53 ` [PATCH 2/4] xen/arm: introduce Allwinner sun6i SOC basic support Bamvor Jian Zhang
2013-06-12 10:17 ` Ian Campbell
2013-06-18 6:35 ` Bamvor Jian Zhang
2013-06-18 9:53 ` Ian Campbell
2013-06-18 10:23 ` Bamvor Jian Zhang
2013-05-31 12:53 ` [PATCH 3/4] xen/arm: enable early printk for sun6i Bamvor Jian Zhang
2013-06-12 10:17 ` Ian Campbell
2013-06-18 6:35 ` ReL " Bamvor Jian Zhang
2013-06-18 9:54 ` Ian Campbell
2013-06-18 6:49 ` Bamvor Jian Zhang
2013-05-31 12:53 ` Bamvor Jian Zhang [this message]
2013-06-12 10:17 ` [PATCH 4/4] xen/arm: enable switch to hyper mode " Ian Campbell
2013-06-18 6:38 ` Bamvor Jian Zhang
2013-06-18 10:00 ` Ian Campbell
2013-06-18 10:39 ` Bamvor Jian Zhang
2013-06-18 10:45 ` Ian Campbell
2013-05-31 15:14 ` [PATCH 0/4] xen/arm: assemble support for Allwinner A31 Ian Campbell
2013-05-31 15:49 ` Bamvor Jian Zhang
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=1370004814-30686-5-git-send-email-bjzhang@suse.com \
--to=bjzhang@suse.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=andre.przywara@calxeda.com \
--cc=ian.campbell@citrix.com \
--cc=julien.grall@linaro.org \
--cc=xen-devel@lists.xen.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).