arm: rmobile: lager: Fix CPU frequency setting
authorNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Wed, 30 Jul 2014 03:28:00 +0000 (12:28 +0900)
committerNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Thu, 9 Oct 2014 05:45:03 +0000 (14:45 +0900)
Setting to change the CPU frequency is only used version2.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
board/renesas/lager/lager.c

index a5a0474cd7a0f9c685c1636833c56acaaed308bb..5302839b33a9c960916c6910f93f65d5adeef2ca 100644 (file)
@@ -29,15 +29,17 @@ 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.4GHz */
-       stc = ((1500 / CLK2MHZ(CONFIG_SYS_CLK_FREQ)) - 1) << PLL0_STC_BIT;
-       clrsetbits_le32(PLL0CR, PLL0_STC_MASK, stc);
+       if (rmobile_get_cpu_rev_integer() >= R8A7790_CUT_ES2X) {
+               u32 stc = ((1400 / CLK2MHZ(CONFIG_SYS_CLK_FREQ)) - 1)
+                       << PLL0_STC_BIT;
+               clrsetbits_le32(PLL0CR, PLL0_STC_MASK, stc);
+       }
 
        /* QoS(Quality-of-Service) Init */
        qos_init();