ARM MXC: Make-sure-ipg_per_clk-is-generated-by-ipg_clk-and-not-usb_pll
authorAlberto Panizzo <maramaopercheseimorto@gmail.com>
Fri, 15 May 2009 16:48:13 +0000 (18:48 +0200)
committerSascha Hauer <s.hauer@pengutronix.de>
Sat, 16 May 2009 14:19:02 +0000 (16:19 +0200)
From ff1fd9d7015d9b9ad3e0df2016d0415e2719747c Mon Sep 17 00:00:00 2001
From: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Date: Fri, 15 May 2009 17:21:21 +0200
Subject: [PATCH] Make sure ipg_per_clk is generated by ipg_clk and not usb_pll

Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
arch/arm/mach-mx3/clock.c

index 09cbd4a15f816d63b5fb11f65da673cdb04ae057..28bd11dc89b8762da7ddb2a7c42afadff93d37ce 100644 (file)
@@ -579,6 +579,12 @@ int __init mx31_clocks_init(unsigned long fref)
                                           MX32, but still required to be set */
                     MXC_CCM_CGR2);
 
+       /*
+        * Before turning off usb_pll make sure ipg_per_clk is generated
+        * by ipg_clk and not usb_pll.
+        */
+       __raw_writel(__raw_readl(MXC_CCM_CCMR) | (1 << 24), MXC_CCM_CCMR);
+
        usb_pll_disable(&usb_pll_clk);
 
        pr_info("Clock input source is %ld\n", clk_get_rate(&ckih_clk));