summaryrefslogtreecommitdiffstats
path: root/board/renesas/koelsch
diff options
context:
space:
mode:
authorNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>2014-03-31 11:52:51 +0900
committerNobuhiro Iwamatsu <iwamatsu@nigauri.org>2014-04-28 04:35:12 +0900
commitccde6771dca4e792018392931d3c30b10ce137b1 (patch)
treeaa8cb2c1c4f2d74ccd5d5952d94f51cb02c30832 /board/renesas/koelsch
parente05b98dadfa6a9a14d6d9445d11b611eda477457 (diff)
downloadtalos-obmc-uboot-ccde6771dca4e792018392931d3c30b10ce137b1.tar.gz
talos-obmc-uboot-ccde6771dca4e792018392931d3c30b10ce137b1.zip
arm: rmobile: koelsch: Change to maximum CPU frequency
Maximum CPU clock of R8A7791 that are used in koelsch board is 1.5GHz. This change to use the maximum clock in this board. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Diffstat (limited to 'board/renesas/koelsch')
-rw-r--r--board/renesas/koelsch/koelsch.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/board/renesas/koelsch/koelsch.c b/board/renesas/koelsch/koelsch.c
index d4f63724b4..bfd0cc6884 100644
--- a/board/renesas/koelsch/koelsch.c
+++ b/board/renesas/koelsch/koelsch.c
@@ -19,19 +19,26 @@
#include <netdev.h>
#include <miiphy.h>
#include <i2c.h>
+#include <div64.h>
#include "qos.h"
DECLARE_GLOBAL_DATA_PTR;
+#define CLK2MHZ(clk) (clk / 1000 / 1000)
void s_init(void)
{
struct rcar_rwdt *rwdt = (struct rcar_rwdt *)RWDT_BASE;
struct rcar_swdt *swdt = (struct rcar_swdt *)SWDT_BASE;
+ u32 stc;
/* Watchdog init */
writel(0xA5A5A500, &rwdt->rwtcsra);
writel(0xA5A5A500, &swdt->swtcsra);
+ /* CPU frequency setting. Set to 1.5GHz */
+ stc = ((1500 / CLK2MHZ(CONFIG_SYS_CLK_FREQ)) - 1) << PLL0_STC_BIT;
+ clrsetbits_le32(PLL0CR, PLL0_STC_MASK, stc);
+
/* QoS */
qos_init();
}
OpenPOWER on IntegriCloud