summaryrefslogtreecommitdiff
path: root/arch/arm/mach-shmobile/clock-r8a7779.c
diff options
context:
space:
mode:
authorSimon Horman <horms+renesas@verge.net.au>2014-05-15 20:32:01 +0900
committerSimon Horman <horms+renesas@verge.net.au>2014-06-17 19:56:18 +0900
commit3e05f24aa95bb043f1103b41392b61ce83d2675e (patch)
treefabff2f4596eeec7f4eb0b6baf2a88b172143a9f /arch/arm/mach-shmobile/clock-r8a7779.c
parent3325cbe8ab74731c88e70d172ffef74cbca13f18 (diff)
ARM: shmobile: r8a7779: Add helper to read mode pins
Add and use helper to read mode pins. This will be re-used when moving marzen-reference to the common clock framework. Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch/arm/mach-shmobile/clock-r8a7779.c')
-rw-r--r--arch/arm/mach-shmobile/clock-r8a7779.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c
index d81539a26dbd..5dd66a21f036 100644
--- a/arch/arm/mach-shmobile/clock-r8a7779.c
+++ b/arch/arm/mach-shmobile/clock-r8a7779.c
@@ -23,6 +23,7 @@
#include <linux/io.h>
#include <linux/sh_clk.h>
#include <linux/clkdev.h>
+#include <mach/r8a7779.h>
#include "clock.h"
#include "common.h"
@@ -52,9 +53,6 @@
#define MSTPCR3 IOMEM(0xffc8003c)
#define MSTPSR1 IOMEM(0xffc80044)
-#define MODEMR 0xffcc0020
-
-
/* ioremap() through clock mapping mandatory to avoid
* collision with ARM coherent DMA virtual memory range.
*/
@@ -207,14 +205,9 @@ static struct clk_lookup lookups[] = {
void __init r8a7779_clock_init(void)
{
- void __iomem *modemr = ioremap_nocache(MODEMR, PAGE_SIZE);
- u32 mode;
+ u32 mode = r8a7779_read_mode_pins();
int k, ret = 0;
- BUG_ON(!modemr);
- mode = ioread32(modemr);
- iounmap(modemr);
-
if (mode & MD(1)) {
plla_clk.rate = 1500000000;