Skip to content

Commit

Permalink
ARM: shmobile: r8a7791: Use rcar_gen2_read_mode_pins() helper
Browse files Browse the repository at this point in the history
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
  • Loading branch information
Geert Uytterhoeven authored and Simon Horman committed Apr 14, 2014
1 parent c9eaa44 commit edcf139
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions arch/arm/mach-shmobile/clock-r8a7791.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <linux/clkdev.h>
#include <mach/clock.h>
#include <mach/common.h>
#include <mach/rcar-gen2.h>

/*
* MD EXTAL PLL0 PLL1 PLL3
Expand All @@ -43,8 +44,6 @@
* see "p1 / 2" on R8A7791_CLOCK_ROOT() below
*/

#define MD(nr) (1 << nr)

#define CPG_BASE 0xe6150000
#define CPG_LEN 0x1000

Expand All @@ -68,7 +67,6 @@
#define MSTPSR9 IOMEM(0xe61509a4)
#define MSTPSR11 IOMEM(0xe61509ac)

#define MODEMR 0xE6160060
#define SDCKCR 0xE6150074
#define SD1CKCR 0xE6150078
#define SD2CKCR 0xE615026c
Expand Down Expand Up @@ -295,14 +293,9 @@ static struct clk_lookup lookups[] = {

void __init r8a7791_clock_init(void)
{
void __iomem *modemr = ioremap_nocache(MODEMR, PAGE_SIZE);
u32 mode;
u32 mode = rcar_gen2_read_mode_pins();
int k, ret = 0;

BUG_ON(!modemr);
mode = ioread32(modemr);
iounmap(modemr);

switch (mode & (MD(14) | MD(13))) {
case 0:
R8A7791_CLOCK_ROOT(15, &extal_clk, 172, 208, 106, 88);
Expand Down

0 comments on commit edcf139

Please sign in to comment.