From d8659c6d25219e3f89b6696b86c3b18dcf5c3fb5 Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Fri, 31 Oct 2014 16:08:11 +0900 Subject: arm: rmobile: lager: Fix change of the CPU frequency The change of the CPU frequency is waited for until PLL0ST of the PLLECR is set to 1. Signed-off-by: Hisashi Nakamura Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Nobuhiro Iwamatsu --- board/renesas/lager/lager.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'board/renesas') diff --git a/board/renesas/lager/lager.c b/board/renesas/lager/lager.c index 5302839..1fc5833 100644 --- a/board/renesas/lager/lager.c +++ b/board/renesas/lager/lager.c @@ -36,9 +36,14 @@ void s_init(void) /* CPU frequency setting. Set to 1.4GHz */ if (rmobile_get_cpu_rev_integer() >= R8A7790_CUT_ES2X) { + u32 stat = 0; u32 stc = ((1400 / CLK2MHZ(CONFIG_SYS_CLK_FREQ)) - 1) << PLL0_STC_BIT; clrsetbits_le32(PLL0CR, PLL0_STC_MASK, stc); + + do { + stat = readl(PLLECR) & PLL0ST; + } while (stat == 0x0); } /* QoS(Quality-of-Service) Init */ -- cgit v1.1