Received: from eggs.gnu.org ([2001:4830:134:3::10]:43346) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrYNd-0002QL-LE for qemu-devel@nongnu.org; Tue, 25 Jun 2013 14:54:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrYNa-00086c-Fm for qemu-devel@nongnu.org; Tue, 25 Jun 2013 14:54:17 -0400 Received: from 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa ([2001:8b0:1d0::1]:58202 helo=mnementh.archaic.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrYNa-00086L-7h for qemu-devel@nongnu.org; Tue, 25 Jun 2013 14:54:14 -0400 From: Peter Maydell Date: Tue, 25 Jun 2013 19:21:53 +0100 Message-Id: <1372184516-32397-6-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1372184516-32397-1-git-send-email-peter.maydell@linaro.org> References: <1372184516-32397-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PULL 5/8] i.MX31: Fix PRCS bit test List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, Paul Brook From: Stefan Weil cppcheck detected a condition which was always false. According to the MCIMX31 Reference Manual, the PRCS bits have to be 01 to select the Frequency Pre-Multiplier (FPM). PRCS uses bits 1 and 2, so we have to test for 2. Signed-off-by: Stefan Weil Signed-off-by: Peter Chubb Message-id: 1370810662-32320-1-git-send-email-sw@weilnetz.de Signed-off-by: Peter Maydell --- hw/misc/imx_ccm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/imx_ccm.c b/hw/misc/imx_ccm.c index c153a24..427ce5c 100644 --- a/hw/misc/imx_ccm.c +++ b/hw/misc/imx_ccm.c @@ -153,7 +153,7 @@ static void update_clocks(IMXCCMState *s) * approach */ - if ((s->ccmr & CCMR_PRCS) == 1) { + if ((s->ccmr & CCMR_PRCS) == 2) { s->pll_refclk_freq = CKIL_FREQ * 1024; } else { s->pll_refclk_freq = CKIH_FREQ; -- 1.7.9.5