From patchwork Thu Jul 30 07:46:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 6899841 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0EA649F38B for ; Thu, 30 Jul 2015 07:51:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3BCBA2051C for ; Thu, 30 Jul 2015 07:51:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5C4B920511 for ; Thu, 30 Jul 2015 07:51:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751258AbbG3Hu4 (ORCPT ); Thu, 30 Jul 2015 03:50:56 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:46787 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753855AbbG3HrP (ORCPT ); Thu, 30 Jul 2015 03:47:15 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id t6U7ktMr010446; Thu, 30 Jul 2015 02:46:55 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id t6U7kt4s009486; Thu, 30 Jul 2015 02:46:55 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.224.2; Thu, 30 Jul 2015 02:46:55 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id t6U7kZVZ006418; Thu, 30 Jul 2015 02:46:52 -0500 From: Kishon Vijay Abraham I To: , , , , , , CC: , , Subject: [PATCH 05/11] mmc: host: omap_hsmmc: set clk rate to the max frequency Date: Thu, 30 Jul 2015 13:16:28 +0530 Message-ID: <1438242394-25599-6-git-send-email-kishon@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1438242394-25599-1-git-send-email-kishon@ti.com> References: <1438242394-25599-1-git-send-email-kishon@ti.com> MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Set the clock rate of the functional clock to the max frequency that is passed to the driver either using pdata or dt. Also remove unnecessary setting of host->fclk to NULL. Signed-off-by: Kishon Vijay Abraham I --- drivers/mmc/host/omap_hsmmc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index e960b5c..0452a8b 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -2219,7 +2219,12 @@ static int omap_hsmmc_probe(struct platform_device *pdev) host->fclk = devm_clk_get(&pdev->dev, "fck"); if (IS_ERR(host->fclk)) { ret = PTR_ERR(host->fclk); - host->fclk = NULL; + goto err1; + } + + ret = clk_set_rate(host->fclk, mmc->f_max); + if (ret) { + dev_err(&pdev->dev, "failed to set clock to %d\n", mmc->f_max); goto err1; }