From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Chris Ball <chris@printf.net>, Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc@vger.kernel.org, kernel@pengutronix.de,
Markus Niebel <Markus.Niebel@tq-group.com>,
linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
Sascha Hauer <s.hauer@pengutronix.de>
Subject: Re: [PATCH v3] mmc: implement Driver Stage Register handling
Date: Wed, 13 Aug 2014 17:57:07 +0200 [thread overview]
Message-ID: <20140813155707.GP5134@pengutronix.de> (raw)
In-Reply-To: <1407944656-14592-1-git-send-email-u.kleine-koenig@pengutronix.de>
Hello,
On Wed, Aug 13, 2014 at 05:44:16PM +0200, Uwe Kleine-König wrote:
> diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
> index f51b5ba3bbea..37ed493d8030 100644
> --- a/drivers/mmc/core/mmc_ops.c
> +++ b/drivers/mmc/core/mmc_ops.c
> @@ -93,6 +93,27 @@ int mmc_deselect_cards(struct mmc_host *host)
> return _mmc_select_card(host, NULL);
> }
>
> +/*
> + * Write the value specified in the device tree or board code into the optional
> + * 16 bit Driver Stage Register. This can be used to tune raise/fall times and
> + * drive strength of the DAT and CMD outputs. The actual meaning of a given
> + * value is hardware dependant.
> + * The presence of the DSR register can be determined from the CSD register,
> + * bit 76.
> + */
> +int mmc_set_dsr(struct mmc_host *host)
> +{
> + int err;
The line declaring err can and should be dropped. I found that during my
tests, but failed to change this in the patch before sending it out.
If you consider applying my patch, please fix this up. If not I will
take this as an opportunity to remind you in a few days with a v4 :-)
Uwe
> + struct mmc_command cmd = {0};
> +
> + cmd.opcode = MMC_SET_DSR;
> +
> + cmd.arg = ((u32)host->dsr << 16) | 0xffff;
> + cmd.flags = MMC_RSP_NONE | MMC_CMD_AC;
> +
> + return mmc_wait_for_cmd(host, &cmd, MMC_CMD_RETRIES);
> +}
> +
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2014-08-13 15:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-13 15:44 [PATCH v3] mmc: implement Driver Stage Register handling Uwe Kleine-König
2014-08-13 15:57 ` Uwe Kleine-König [this message]
2014-08-14 9:26 ` Ulf Hansson
2014-08-14 9:49 ` Uwe Kleine-König
2014-08-14 10:29 ` Ulf Hansson
2014-08-15 8:21 ` Uwe Kleine-König
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=20140813155707.GP5134@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=Markus.Niebel@tq-group.com \
--cc=chris@printf.net \
--cc=devicetree@vger.kernel.org \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).