All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>
To: Ulf Hansson <ulf.hansson@linaro.org>, Chris Ball <cjb@laptop.org>
Cc: Simon <horms@verge.net.au>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Linux-SH <linux-sh@vger.kernel.org>,
	linux-mmc <linux-mmc@vger.kernel.org>,
	Shinobu Uehara <shinobu.uehara.xc@renesas.com>
Subject: [PATCH][RFC] mmc: tmio_mmc: remove msleep(10) from tmio_mmc_clk_xxx()
Date: Mon, 08 Sep 2014 05:30:53 +0000	[thread overview]
Message-ID: <87vboyof05.wl%kuninori.morimoto.gx@gmail.com> (raw)

From: Shinobu Uehara <shinobu.uehara.xc@renesas.com>

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 <shinobu.uehara.xc@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 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)
-- 
1.7.9.5


WARNING: multiple messages have this Message-ID (diff)
From: Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>
To: Ulf Hansson <ulf.hansson@linaro.org>, Chris Ball <cjb@laptop.org>
Cc: Simon <horms@verge.net.au>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Linux-SH <linux-sh@vger.kernel.org>,
	linux-mmc <linux-mmc@vger.kernel.org>,
	Shinobu Uehara <shinobu.uehara.xc@renesas.com>
Subject: [PATCH][RFC] mmc: tmio_mmc: remove msleep(10) from tmio_mmc_clk_xxx()
Date: Sun, 07 Sep 2014 22:30:53 -0700 (PDT)	[thread overview]
Message-ID: <87vboyof05.wl%kuninori.morimoto.gx@gmail.com> (raw)

From: Shinobu Uehara <shinobu.uehara.xc@renesas.com>

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 <shinobu.uehara.xc@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 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)
-- 
1.7.9.5


             reply	other threads:[~2014-09-08  5:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-08  5:30 Kuninori Morimoto [this message]
2014-09-08  5:30 ` [PATCH][RFC] mmc: tmio_mmc: remove msleep(10) from tmio_mmc_clk_xxx() Kuninori Morimoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vboyof05.wl%kuninori.morimoto.gx@gmail.com \
    --to=kuninori.morimoto.gx@gmail.com \
    --cc=cjb@laptop.org \
    --cc=horms@verge.net.au \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=shinobu.uehara.xc@renesas.com \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.