diff options
author | Magnus Damm <damm@opensource.se> | 2013-07-11 18:22:19 +0200 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-07-17 07:26:56 +0200 |
commit | 512e53bc7f0088e3adfd89b3fea3447495fc8423 (patch) | |
tree | 16f011bbec8839107a77e0fa4d71fb9a28bede51 /arch/arm/mach-shmobile/setup-r8a7790.c | |
parent | ARM: shmobile: r8a7740: add MMCIF DMA definitions (diff) | |
download | linux-512e53bc7f0088e3adfd89b3fea3447495fc8423.tar.xz linux-512e53bc7f0088e3adfd89b3fea3447495fc8423.zip |
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.c | 14 |
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; |