From patchwork Mon Sep 8 05:30:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 4859981 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BBC689F3AE for ; Mon, 8 Sep 2014 05:30:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D0F6B2012F for ; Mon, 8 Sep 2014 05:30:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E7D0F2011E for ; Mon, 8 Sep 2014 05:30:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751891AbaIHFaz (ORCPT ); Mon, 8 Sep 2014 01:30:55 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:56858 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751512AbaIHFay (ORCPT ); Mon, 8 Sep 2014 01:30:54 -0400 Received: by mail-pa0-f48.google.com with SMTP id hz1so4973219pad.21 for ; Sun, 07 Sep 2014 22:30:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:message-id:from:subject:user-agent:to:cc:mime-version :content-type; bh=dNobs3XCj/4ps/j7L9C8iWTDlk1hAYMaFZJUVskB+Tc=; b=OrV7Q9KFGJfip9x4t8eB/i44mGqXG8ayou2hKCeIvTAXhhESiSsz3au6JTC0lrjZ22 XhRsoEXR1c8oDZFE8bgNN1yA6MGtK1c5qL9G4CFsRAAt91+UjbUH7C0rXVdU1Kz/MbQt WsZPg7GBhuEWlOipAs+xUPo8JUY9yleIEGz0E/f4y8M0K9+ng+2+tYkjkS3rKi0HkwkG QTpS8l256AMFoMqpBQV7khX40fkOYeLWP3R7uouF7ekDQB2GBbpk71j/lN/zK75DlP25 wM6GBORuVV/X5MeDPPS7Mv39Juyof3q0kDBBQ/JyOGdfByrfj0kDM9l8N2p5JVeMta58 F8+Q== X-Received: by 10.70.98.129 with SMTP id ei1mr43787050pdb.27.1410154254314; Sun, 07 Sep 2014 22:30:54 -0700 (PDT) Received: from remon.gmail.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPSA id v1sm7831250pdn.93.2014.09.07.22.30.51 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 07 Sep 2014 22:30:53 -0700 (PDT) Date: Sun, 07 Sep 2014 22:30:53 -0700 (PDT) Message-ID: <87vboyof05.wl%kuninori.morimoto.gx@gmail.com> From: Kuninori Morimoto Subject: [PATCH][RFC] mmc: tmio_mmc: remove msleep(10) from tmio_mmc_clk_xxx() User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Ulf Hansson , Chris Ball Cc: Simon , Kuninori Morimoto , Linux-SH , linux-mmc , Shinobu Uehara MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 From: Shinobu Uehara Current tmio_mmc driver is calling msleep(10) in tmio_mmc_clk_xxx(). But, it has not been documented, and will be low performance, especially if CONFIG_MMC_CLKGATE was enabled. This patch remove it [Kuninori Morimoto: tidyuped for upstreaming] Signed-off-by: Shinobu Uehara Signed-off-by: Kuninori Morimoto --- drivers/mmc/host/tmio_mmc_pio.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c index ba45413..657c33d 100644 --- a/drivers/mmc/host/tmio_mmc_pio.c +++ b/drivers/mmc/host/tmio_mmc_pio.c @@ -170,33 +170,26 @@ static void tmio_mmc_set_clock(struct tmio_mmc_host *host, host->set_clk_div(host->pdev, (clk>>22) & 1); sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, clk & 0x1ff); - msleep(10); } static void tmio_mmc_clk_stop(struct tmio_mmc_host *host) { /* implicit BUG_ON(!res) */ - if (host->pdata->flags & TMIO_MMC_HAVE_HIGH_REG) { + if (host->pdata->flags & TMIO_MMC_HAVE_HIGH_REG) sd_ctrl_write16(host, CTL_CLK_AND_WAIT_CTL, 0x0000); - msleep(10); - } sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, ~0x0100 & sd_ctrl_read16(host, CTL_SD_CARD_CLK_CTL)); - msleep(10); } static void tmio_mmc_clk_start(struct tmio_mmc_host *host) { sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, 0x0100 | sd_ctrl_read16(host, CTL_SD_CARD_CLK_CTL)); - msleep(10); /* implicit BUG_ON(!res) */ - if (host->pdata->flags & TMIO_MMC_HAVE_HIGH_REG) { + if (host->pdata->flags & TMIO_MMC_HAVE_HIGH_REG) sd_ctrl_write16(host, CTL_CLK_AND_WAIT_CTL, 0x0100); - msleep(10); - } } static void tmio_mmc_reset(struct tmio_mmc_host *host) @@ -206,11 +199,10 @@ static void tmio_mmc_reset(struct tmio_mmc_host *host) /* implicit BUG_ON(!res) */ if (host->pdata->flags & TMIO_MMC_HAVE_HIGH_REG) sd_ctrl_write16(host, CTL_RESET_SDIO, 0x0000); - msleep(10); + sd_ctrl_write16(host, CTL_RESET_SD, 0x0001); if (host->pdata->flags & TMIO_MMC_HAVE_HIGH_REG) sd_ctrl_write16(host, CTL_RESET_SDIO, 0x0001); - msleep(10); } static void tmio_mmc_reset_work(struct work_struct *work)