[PATCH v2] watchdog: imx: use clk_get to acquire the watchdogclock

Sascha Hauer s.hauer at pengutronix.de
Tue Dec 7 13:50:02 EST 2010


On Tue, Dec 07, 2010 at 03:16:15PM -0200, Fabio Estevam wrote:
> Hi Sascha,
>
> On 12/7/2010 2:49 PM, Sascha Hauer wrote:
> ...
>> I should have seen this happen. This breaks i.MX1 reset which uses
>> imx-wdt.0.
>
> I think it doesn´t break current mx1 reset mechanism. Please see the  
> code below (arcm/arm/plat-mxc/system.c):
>
> 	if (cpu_is_mx1()) {
> 		wcr_enable = (1 << 0);
> 	} else {
> 		struct clk *clk;
>
> 		clk = clk_get_sys("imx2-wdt.0", NULL);
> 		if (!IS_ERR(clk))
> 			clk_enable(clk);
> 		wcr_enable = (1 << 2);
> 	}
>
> For mx1 the clk_get_sys function is not called.

Oh, you are right. In this case your patch is ok.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the linux-arm-kernel mailing list