[PATCH 7/7] Add S3C2440 MCI card support

Juergen Beisert jbe at pengutronix.de
Thu Oct 7 13:51:24 EDT 2010


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/  |



More information about the barebox mailing list