From patchwork Thu Nov 8 15:09:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 1716251 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id C5F22DF280 for ; Thu, 8 Nov 2012 15:09:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756080Ab2KHPJS (ORCPT ); Thu, 8 Nov 2012 10:09:18 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:33299 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752626Ab2KHPJS (ORCPT ); Thu, 8 Nov 2012 10:09:18 -0500 Received: by mail-pa0-f46.google.com with SMTP id hz1so2045988pad.19 for ; Thu, 08 Nov 2012 07:09:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=KD4YDXPN4v8yUE7jNX5XRX/7+FL1AZ1M4CM7NSLp+5Q=; b=a9l75cVkwAvrbRekvzWTMpnSMk1YvXGtH60jmLnlpa9miYmrLfeC6nJ8O6SRxXkjwo 3JMhTjHQfhdPsRG++aQBgCFdPXaU5kj9mHm3j5c5G84m8tqKPpPy+UiZcHwkx9emAkQ/ h02GKXKHtzKy6ggJmaQ0F+SRCg/lYTl3RHrX2VeCIGe1mYL1IqqTCzxvhSfertTxodNU lMs7ydnwfqrMt0TGbAHhQxL4wpquQDh3twQa5r9utO3MyU95Qn8z/Y1DZQZkdbonLvCn GKHAMfeURJljs4Kw4VMoLPnv93harrL4/F8AWdaGPvEO1i8U/m/W9CEqlW1EW4AlXyms fXlg== Received: by 10.66.86.102 with SMTP id o6mr16861280paz.11.1352387357999; Thu, 08 Nov 2012 07:09:17 -0800 (PST) Received: from localhost ([122.167.75.112]) by mx.google.com with ESMTPS id o11sm16078721pby.8.2012.11.08.07.09.14 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 08 Nov 2012 07:09:17 -0800 (PST) From: Viresh Kumar To: cjb@laptop.org Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, spear-devel@list.st.com, Vipul Kumar Samar , Viresh Kumar Subject: [PATCH 1/2] mmc: sdhci-spear: Initialize sdhci clk to 50 MHz Date: Thu, 8 Nov 2012 20:39:09 +0530 Message-Id: X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e X-Gm-Message-State: ALoCoQlLUmHzvheElNS/j0SK88OIZaKS7mYQRDWF67HmCocxuxLZxbry8ZIKJUzmxGvfw6hhJkOg Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Vipul Kumar Samar SPEAr sdhci driver expects the clock to be set to 50 MHz for proper functioning. This patch sets clk to 50 MHz in probe. Signed-off-by: Vipul Kumar Samar Signed-off-by: Viresh Kumar --- drivers/mmc/host/sdhci-spear.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c index 6be89c0..fea8bf9 100644 --- a/drivers/mmc/host/sdhci-spear.c +++ b/drivers/mmc/host/sdhci-spear.c @@ -146,6 +146,11 @@ static int __devinit sdhci_probe(struct platform_device *pdev) goto put_clk; } + ret = clk_set_rate(sdhci->clk, 50000000); + if (ret) + dev_dbg(&pdev->dev, "Error setting desired clk, clk=%lu\n", + clk_get_rate(sdhci->clk)); + if (np) { sdhci->data = sdhci_probe_config_dt(pdev); if (IS_ERR(sdhci->data)) {