aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-shmobile/setup-r8a7790.c
diff options
context:
space:
mode:
authorMagnus Damm2013-07-12 01:22:19 +0900
committerSimon Horman2013-07-17 14:26:56 +0900
commit512e53bc7f0088e3adfd89b3fea3447495fc8423 (patch)
tree16f011bbec8839107a77e0fa4d71fb9a28bede51 /arch/arm/mach-shmobile/setup-r8a7790.c
parent9a1456242c7c644d0032032ba80e8538b8322d3c (diff)
ARM: shmobile: Introduce r8a7790_read_mode_pins()
Break out the r8a7790 boot mode code into a separate function so it can be shared by multiple users. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch/arm/mach-shmobile/setup-r8a7790.c')
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7790.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
index f01542e13e58..6acddc139d88 100644
--- a/arch/arm/mach-shmobile/setup-r8a7790.c
+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
@@ -196,6 +196,20 @@ void __init r8a7790_add_standard_devices(void)
r8a7790_register_cmt(00);
}
+#define MODEMR 0xe6160060
+
+u32 __init r8a7790_read_mode_pins(void)
+{
+ void __iomem *modemr = ioremap_nocache(MODEMR, 4);
+ u32 mode;
+
+ BUG_ON(!modemr);
+ mode = ioread32(modemr);
+ iounmap(modemr);
+
+ return mode;
+}
+
void __init r8a7790_timer_init(void)
{
void __iomem *cntcr;