From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934477AbZHEOKY (ORCPT ); Wed, 5 Aug 2009 10:10:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934458AbZHEOKX (ORCPT ); Wed, 5 Aug 2009 10:10:23 -0400 Received: from mail.mnementh.co.uk ([173.45.232.4]:60750 "EHLO mnementh.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934410AbZHEOKW (ORCPT ); Wed, 5 Aug 2009 10:10:22 -0400 Message-ID: <4A7992C1.2070900@mnementh.co.uk> Date: Wed, 05 Aug 2009 15:10:09 +0100 From: Ian Molton User-Agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: Guennadi Liakhovetski CC: pHilipp Zabel , Paul Mundt , Magnus Damm , Mark Brown , linux-kernel@vger.kernel.org, Pierre Ossman Subject: Re: MMC: Make the configuration memory resource optional References: <20090729115817.GA12223@rakim.wolfsonmicro.main> <20090729124233.GA12802@rakim.wolfsonmicro.main> <4A704777.70001@mnementh.co.uk> <4A7053E8.8050303@mnementh.co.uk> <20090729201702.GA28202@linux-sh.org> <74d0deb30907291355n39df7db0v1d7afc93917adc14@mail.gmail.com> <4A716F1C.2050805@mnementh.co.uk> <4A71F2A5.4060206@mnementh.co.uk> <4A7731C8.9040407@mnementh.co.uk> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Guennadi Liakhovetski wrote: > Hi Ian Hi, > With my patches the tmio_mmc_clk_stop() function looked like this > (pseudocode): > > tmio_mmc_clk_stop() > { > CTL_CLK_AND_WAIT_CTL = 0x0000; > msleep(10); > CTL_SD_CARD_CLK_CTL &= ~0x0100; > msleep(10); > clk_disable(clk); > } > > I splitted the clk_disable() call out in a separate function and moved > _only_ it after the reset() call - it worked too. Does this answer your > question? What is clk? HCLK? If so, then I'm not surprised it didn't work. tmio_mmc_clk_stop/start() are for controlling the card clock. What you have done is too disable the host clock when you disable the card clock. Frankly, I'm amazed it worked at all. The correct fix would be to remove the clk_disable(clk) from your function. The host clock should be running constantly (unless suspended). The card clock is gated. You should probably also check the placement of wherever your clk_enable() is too. -Ian