[U-Boot] [PATCH] mmc: add wrappers for MMC block_{read, write, erase}

Pantelis Antoniou panto at antoniou-consulting.com
Mon Jun 2 08:42:12 CEST 2014


Hi Steve,

I wanted the discussion to settle a bit before I reply to this series.
On May 29, 2014, at 1:15 AM, Steve Rae wrote:

> Each wrapper function:
> - switches to the specified physical partition, then
> - performs the original function, and then
> - switches back to the original physical partition
> where the physical partition (aka HW partition) is
>  0=User, 1=Boot1, 2=Boot2, etc.
> 
> Signed-off-by: Steve Rae <srae at broadcom.com>
> ---

[snip]

> /**
>  * Start device initialization and return immediately; it does not block on
>  * polling OCR (operation condition register) status.  Then you should call
> -- 
> 1.8.5
> 

The thing IMO should be modeled in the same way that block devices work in
Linux.

TBH I'm not very fond of the way block devices/partitions and the block_ops
are intermixed in block_dev_t. This part of code could use some refactoring
to make it operate more like a regular linux block device (with each partition
being it's own block device), but I don't know if we have enough votes to change
it ATM.

I'm willing to pick up any MMC related patches to get something workable (Stephen's
approach is fine), but I also want to ask if there's any interest in fixing up the 
block dev mess.

Regards

-- Pantelis
  


More information about the U-Boot mailing list