summaryrefslogtreecommitdiff
path: root/arch/arm/mach-shmobile/clock-r8a7790.c
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2013-07-11 16:22:19 (GMT)
committerSimon Horman <horms+renesas@verge.net.au>2013-07-17 05:26:56 (GMT)
commit512e53bc7f0088e3adfd89b3fea3447495fc8423 (patch)
tree16f011bbec8839107a77e0fa4d71fb9a28bede51 /arch/arm/mach-shmobile/clock-r8a7790.c
parent9a1456242c7c644d0032032ba80e8538b8322d3c (diff)
downloadlinux-512e53bc7f0088e3adfd89b3fea3447495fc8423.tar.xz
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/clock-r8a7790.c')
-rw-r--r--arch/arm/mach-shmobile/clock-r8a7790.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
index 62d8162..50d96f9 100644
--- a/arch/arm/mach-shmobile/clock-r8a7790.c
+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
@@ -24,6 +24,7 @@
#include <linux/clkdev.h>
#include <mach/clock.h>
#include <mach/common.h>
+#include <mach/r8a7790.h>
/*
* MD EXTAL PLL0 PLL1 PLL3
@@ -42,8 +43,6 @@
* see "p1 / 2" on R8A7790_CLOCK_ROOT() below
*/
-#define MD(nr) (1 << nr)
-
#define CPG_BASE 0xe6150000
#define CPG_LEN 0x1000
@@ -53,7 +52,6 @@
#define SMSTPCR5 0xe6150144
#define SMSTPCR7 0xe615014c
-#define MODEMR 0xE6160060
#define SDCKCR 0xE6150074
#define SD2CKCR 0xE6150078
#define SD3CKCR 0xE615007C
@@ -288,14 +286,9 @@ static struct clk_lookup lookups[] = {
void __init r8a7790_clock_init(void)
{
- void __iomem *modemr = ioremap_nocache(MODEMR, PAGE_SIZE);
- u32 mode;
+ u32 mode = r8a7790_read_mode_pins();
int k, ret = 0;
- BUG_ON(!modemr);
- mode = ioread32(modemr);
- iounmap(modemr);
-
switch (mode & (MD(14) | MD(13))) {
case 0:
R8A7790_CLOCK_ROOT(15, &extal_clk, 172, 208, 106, 88);