From patchwork Tue Oct 30 08:12:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Changming-R66093 X-Patchwork-Id: 1669071 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 4A7F43FDDA for ; Tue, 30 Oct 2012 08:55:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756436Ab2J3IzY (ORCPT ); Tue, 30 Oct 2012 04:55:24 -0400 Received: from ch1ehsobe003.messaging.microsoft.com ([216.32.181.183]:28284 "EHLO ch1outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756422Ab2J3IzW (ORCPT ); Tue, 30 Oct 2012 04:55:22 -0400 Received: from mail236-ch1-R.bigfish.com (10.43.68.241) by CH1EHSOBE015.bigfish.com (10.43.70.65) with Microsoft SMTP Server id 14.1.225.23; Tue, 30 Oct 2012 08:55:21 +0000 Received: from mail236-ch1 (localhost [127.0.0.1]) by mail236-ch1-R.bigfish.com (Postfix) with ESMTP id 49DF5F801D4; Tue, 30 Oct 2012 08:55:21 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1202h1d1ah1d2ahzz8275bh8275dhz2dh2a8h668h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h1155h) Received: from mail236-ch1 (localhost.localdomain [127.0.0.1]) by mail236-ch1 (MessageSwitch) id 1351587319183119_27549; Tue, 30 Oct 2012 08:55:19 +0000 (UTC) Received: from CH1EHSMHS041.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.240]) by mail236-ch1.bigfish.com (Postfix) with ESMTP id 2A4AA1900049; Tue, 30 Oct 2012 08:55:19 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS041.bigfish.com (10.43.69.250) with Microsoft SMTP Server (TLS) id 14.1.225.23; Tue, 30 Oct 2012 08:55:19 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server (TLS) id 14.2.318.3; Tue, 30 Oct 2012 08:55:18 +0000 Received: from localhost (rock.ap.freescale.net [10.193.20.106]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id q9U8tBvL013054; Tue, 30 Oct 2012 01:55:16 -0700 From: To: CC: Jerry Huang , Anton Vorontsov , Chris Ball Subject: [PATCH 1/4 v3] MMC/core: Add f_min to mmc_power_on() Date: Tue, 30 Oct 2012 16:12:46 +0800 Message-ID: <1351584769-16662-1-git-send-email-r66093@freescale.com> X-Mailer: git-send-email 1.6.4 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Jerry Huang When f_init is zero, the SDHC can't work correctly. So f_min will replace f_init, when f_init is zero. Signed-off-by: Jerry Huang CC: Anton Vorontsov CC: Chris Ball --- changes for v2: - add the CC changes for v3: - enalbe the controller clock in platform, instead of core drivers/mmc/core/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 06c42cf..9c162cd 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1319,7 +1319,10 @@ static void mmc_power_up(struct mmc_host *host) */ mmc_delay(10); - host->ios.clock = host->f_init; + if (host->f_init) + host->ios.clock = host->f_init; + else + host->ios.clock = host->f_min; host->ios.power_mode = MMC_POWER_ON; mmc_set_ios(host);