[U-Boot] [PATCH] mmc: new legacy MMC/SPI driver

Mike Frysinger vapier at gentoo.org
Fri Apr 23 16:55:52 CEST 2010


On Friday 23 April 2010 04:20:34 Wolfgang Wegner wrote:
> On Thu, Apr 22, 2010 at 11:28:27PM -0400, Mike Frysinger wrote:
> > +static short mmc_spi_init_card(struct mmc_spi_dev *pdev)
> > +{
> > +	unsigned short cntr = 0;
> > +
> > +	/* for making init process beeing silent */
> > +	init_mode = 1;
> > +	/* save length of log for external usage */
> > +	pdev->log_len = LOG_LEN;
> > +
> > +	/* 10 bytes(80 cycles) with CS de-asserted */
> > +	mmc_spi_dummy_clocks(pdev, 10);
> > +	pdev->doassert();
> > +	if (send_cmd_and_wait(pdev, GO_IDLE_STATE, 0, R1_IDLE_STATE,
> > MMC_INIT_TIMEOUT)) +		return 1;
> > +	pdev->deassert();
> > +	/* Send One Byte Delay */
> > +	if (pdev->write(Null_Word, 1, pdev->priv_data) < 0)
> > +		return 1;
> > +	pdev->doassert();
> 
> [...]
> 
> Is there any reason to use doassert() and deassert() except to generate
> the "dummy" cycles needed to initialize the card? Which driver does
> _need_ an explicit cs_activate() and cs_deactivate() outside the
> write() and read() functions?

i have no idea.  i didnt write the driver.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100423/117039a5/attachment.pgp 


More information about the U-Boot mailing list