Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 181123
b: refs/heads/master
c: dea3cf1
h: refs/heads/master
i:
  181121: f3f4b10
  181119: e118208
v: v3
  • Loading branch information
Paul Mundt committed Jan 19, 2010
1 parent 9d65e72 commit 10d80fe
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c8098218271d19e7123d8b9137b9a4b87e5ffec0
refs/heads/master: dea3cf1c3935047a5b0d21b21d26718e09135f97
25 changes: 24 additions & 1 deletion trunk/arch/sh/boards/board-urquell.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Renesas Technology Corp. SH7786 Urquell Support.
*
* Copyright (C) 2008 Kuninori Morimoto <morimoto.kuninori@renesas.com>
* Copyright (C) 2009 Paul Mundt
* Copyright (C) 2009, 2010 Paul Mundt
*
* Based on board-sh7785lcr.c
* Copyright (C) 2008 Yoshihiro Shimoda
Expand All @@ -19,6 +19,7 @@
#include <linux/delay.h>
#include <linux/gpio.h>
#include <linux/irq.h>
#include <linux/clk.h>
#include <mach/urquell.h>
#include <cpu/sh7786.h>
#include <asm/heartbeat.h>
Expand Down Expand Up @@ -175,6 +176,27 @@ static int urquell_mode_pins(void)
return __raw_readw(UBOARDREG(MDSWMR));
}

static int urquell_clk_init(void)
{
struct clk *clk;
int ret;

/*
* Only handle the EXTAL case, anyone interfacing a crystal
* resonator will need to provide their own input clock.
*/
if (test_mode_pin(MODE_PIN9))
return -EINVAL;

clk = clk_get(NULL, "extal");
if (!clk || IS_ERR(clk))
return PTR_ERR(clk);
ret = clk_set_rate(clk, 33333333);
clk_put(clk);

return ret;
}

/* Initialize the board */
static void __init urquell_setup(char **cmdline_p)
{
Expand All @@ -191,4 +213,5 @@ static struct sh_machine_vector mv_urquell __initmv = {
.mv_setup = urquell_setup,
.mv_init_irq = urquell_init_irq,
.mv_mode_pins = urquell_mode_pins,
.mv_clk_init = urquell_clk_init,
};

0 comments on commit 10d80fe

Please sign in to comment.