mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Juergen Beisert <jbe@pengutronix.de>
To: barebox@lists.infradead.org
Subject: Re: [PATCH 7/7] Add S3C2440 MCI card support
Date: Thu, 7 Oct 2010 19:51:24 +0200	[thread overview]
Message-ID: <201010071951.24867.jbe@pengutronix.de> (raw)
In-Reply-To: <20101007171003.GK28242@pengutronix.de>

Sascha Hauer wrote:
> [...]
> > +#define CLOCKRATE_MIN (1 * 1000 * 1000)
>
> Isn't this a bit high? I thought the initialization frequnency should be
> 400Khz at maximum. Or does the hardware not allow lower rates?

I see you know more about MCI cards than me. This limit is a new fact to me.

Maybe this is the reason why the old 16 MiB MMC fails... will check.

And no: There is *mostly* no limit for the minimal clockrate. I should 
calculate it at runtime, because it depends on some other settings in the 
clock tree. In the i.MX23 driver I do so already.

> [...]
> > +/**
> > + * Prepare engine's bits for the next command transfer
> > + * @param cmd_flags MCI's command flags
> > + * @param data_flags MCI's data flags
> > + * @return Register bits for this transfer
> > + */
> > +static uint32_t s3c_prepare_command_setup(unsigned cmd_flags, unsigned
> > data_flags) +{
> > +	uint32_t reg;
> > +
> > +	/* source (=host) */
> > +	reg = SDICMDCON_SENDERHOST;
> > +
> > +	if (cmd_flags & MMC_RSP_PRESENT) {
> > +		reg |= SDICMDCON_WAITRSP;
> > +		pr_debug("Command with response\n");
> > +	}
> > +	if (cmd_flags & MMC_RSP_136) {
> > +		reg |= SDICMDCON_LONGRSP;
> > +		pr_debug("Command with long response\n");
> > +	}
> > +	if (cmd_flags & MMC_RSP_CRC)
> > +		; /* FIXME */
> > +	if (cmd_flags & MMC_RSP_BUSY)
> > +		; /* FIXME */
> > +	if (cmd_flags & MMC_RSP_OPCODE)
> > +		; /* FIXME */
>
> It's ok that these flags are not handled in the first run, but I think
> the driver should issue a warning when one of these flags is set.

I'm still not sure what bits to set in the various registers to match these 
settings. So, a warning would be a good idea.

> [...]

jbe

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | Phone: +49-8766-939 228     |
Vertretung Sued/Muenchen, Germany             | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686              | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2010-10-07 17:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-07 13:24 [RFC] Add MCI card support to barebox Juergen Beisert
2010-10-07 13:24 ` [PATCH 1/7] x-functions do not return in case of failure Juergen Beisert
2010-10-07 13:24 ` [PATCH 2/7] Make the disk driver less noisy Juergen Beisert
2010-10-07 13:24 ` [PATCH 3/7] Don't use a sector buffer on stack Juergen Beisert
2010-10-07 13:24 ` [PATCH 4/7] Don't try to guess the size of a disk if its size value is already given Juergen Beisert
2010-10-07 13:24 ` [PATCH 5/7] Add MCI card support to barebox Juergen Beisert
2010-10-07 15:37   ` Sascha Hauer
2010-10-07 16:00     ` Juergen Beisert
2010-10-07 16:59       ` Sascha Hauer
2010-10-07 17:39         ` Juergen Beisert
2010-10-07 13:24 ` [PATCH 6/7] Add i.MX23 MCI card support Juergen Beisert
2010-10-07 13:24 ` [PATCH 7/7] Add S3C2440 " Juergen Beisert
2010-10-07 17:10   ` Sascha Hauer
2010-10-07 17:51     ` Juergen Beisert [this message]
2010-10-07 15:16 ` [RFC] Add MCI card support to barebox Jean-Christophe PLAGNIOL-VILLARD

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=201010071951.24867.jbe@pengutronix.de \
    --to=jbe@pengutronix.de \
    --cc=barebox@lists.infradead.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