Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755035Ab2KZPJK (ORCPT ); Mon, 26 Nov 2012 10:09:10 -0500 Received: from void.printf.net ([89.145.121.20]:47376 "EHLO void.printf.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754769Ab2KZPJI (ORCPT ); Mon, 26 Nov 2012 10:09:08 -0500 From: Chris Ball To: Viresh Kumar Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, spear-devel@list.st.com, Vipul Kumar Samar Subject: Re: [PATCH 1/2] mmc: sdhci-spear: Initialize sdhci clk to 50 MHz References: Date: Mon, 26 Nov 2012 10:09:01 -0500 In-Reply-To: (Viresh Kumar's message of "Thu, 8 Nov 2012 20:39:09 +0530") Message-ID: <87obik9zaq.fsf@octavius.laptop.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1404 Lines: 44 Hi, On Thu, Nov 08 2012, Viresh Kumar wrote: > 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)) { Can I change this to a dev_err()? No-one's going to see a dev_dbg(). Thanks, - Chris. -- Chris Ball One Laptop Per Child -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/