From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
To: Michael Grzeschik <mgr@pengutronix.de>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
barebox@lists.infradead.org
Subject: Re: [RFC 2/2] mci: add Marvell Dove SDHCI driver
Date: Wed, 18 Feb 2015 20:34:45 +0100 [thread overview]
Message-ID: <54E4E955.1040908@gmail.com> (raw)
In-Reply-To: <20150217234351.GD21880@pengutronix.de>
On 18.02.2015 00:43, Michael Grzeschik wrote:
> On Fri, Jul 05, 2013 at 11:22:19PM +0200, Sebastian Hesselbarth wrote:
Nice! It just bumped up the RFC from 1.5yrs back to top in my barebox
mail folder ;)
>> This adds a driver for the SDHCI controller found on Marvell Dove SoCs.
>> Despite a missing pinctrl driver, corresponding MPP config has to be
>> set on a per board basis.
[...]
>> diff --git a/drivers/mci/dove-sdhci.c b/drivers/mci/dove-sdhci.c
>> new file mode 100644
>> index 0000000..91ef8b0
>> --- /dev/null
>> +++ b/drivers/mci/dove-sdhci.c
[...]
>> +static int dove_sdhci_mci_send_cmd(struct mci_host *mci, struct mci_cmd *cmd,
>> + struct mci_data *data)
>> +{
>> + u16 val;
>> + u64 start;
>> + int ret;
>> + struct dove_sdhci *host = priv_from_mci_host(mci);
>> +
>> + dove_sdhci_writel(host, SDHCI_INT_STATUS, ~0);
>> +
>> + /* Do not wait for CMD_INHIBIT_DAT on stop commands */
>> + if (cmd->cmdidx == MMC_CMD_STOP_TRANSMISSION)
>> + val = SDHCI_CMD_INHIBIT_CMD;
>> + else
>> + val = SDHCI_CMD_INHIBIT_CMD | SDHCI_CMD_INHIBIT_DATA;
>> +
>> + /* Wait for bus idle */
>> + start = get_time_ns();
>> + while (1) {
>> + if (!(dove_sdhci_readw(host, SDHCI_PRESENT_STATE0) & val))
>> + break;
>> + if (is_timeout(start, 10 * MSECOND)) {
>
> I had to set something higher than 10 milliseconds to make this driver
> work with solidrun cubox. Otherwise it was always running into the
> timeout.
Can you tell to what value you had to increase the timeout?
I have no problem increasing the timeout, we shouldn't run into
any of them anyway at this point.
Sebastian
>> + dev_err(host->mci.hw_dev, "SDHCI timeout while waiting for idle\n");
>> + return -ETIMEDOUT;
>> + }
>> + }
[...]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2015-02-18 19:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-05 21:22 [RFC 0/2] mci: Dove SDHCI driver Sebastian Hesselbarth
2013-07-05 21:22 ` [RFC 1/2] mci: add more defines to sdhci include Sebastian Hesselbarth
2013-07-05 21:22 ` [RFC 2/2] mci: add Marvell Dove SDHCI driver Sebastian Hesselbarth
2015-02-17 23:43 ` Michael Grzeschik
2015-02-18 19:34 ` Sebastian Hesselbarth [this message]
2015-02-19 11:59 ` Michael Grzeschik
2013-07-09 17:38 ` [RFC 0/2] mci: " Sascha Hauer
2013-07-10 22:51 ` Sebastian Hesselbarth
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=54E4E955.1040908@gmail.com \
--to=sebastian.hesselbarth@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=mgr@pengutronix.de \
--cc=thomas.petazzoni@free-electrons.com \
/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.