[U-Boot] [RFC PATCH 2/2] mmc: add support for block device cache

Eric Nelson
2016-04-10T14:31:47Z

Hi Simon,

On 04/09/2016 10:55 AM, Simon Glass wrote:
> On 20 March 2016 at 16:54, Eric Nelson <eric@nelint.com> wrote:
>> On 03/20/2016 03:13 PM, Tom Rini wrote:
>>> On Sun, Mar 20, 2016 at 12:35:53PM -0700, Eric Nelson wrote:
>>>> On 03/17/2016 02:23 PM, Stephen Warren wrote:
>>>>> On 03/16/2016 03:40 PM, Eric Nelson wrote:
>>>>>> Signed-off-by: Eric Nelson <eric@nelint.com>
>>>>>
>>>>> Patch description.
>>>>>
>>>>>> ---
>>>>>> drivers/mmc/mmc.c | 10 +++++++++-
>>>>>> drivers/mmc/mmc_write.c | 7 +++++++
>>>>>
>>>>> Presumably it makes sense for the cache to work for IDE, SATA, USB,
>>>>> SCSI, ... too. I wonder if it's possible to put this code somewhere more
>>>>> central than mmc*.c so it automatically applies to
>>>>> dev_desc->block_read() (see include/part.h). Perhaps not since each
>>>>> implementation supplies its own block_read function directly, so the
>>>>> cache calls do need to be duplicated everywhere.
>>>>>
>>>>
>>>> Yeah. I haven't found a spot that would allow interception of
>>>> the various block_read/write functions.
>>>
>>> Shouldn't DM also help here?
>>
>> I haven't yet looked, but this may be true.
>>
>> I'm seeing some build breakage on master surrounding the use
>> of DM though.
>>
>> If I select DM and BLK on top of nitrogen6q_defconfig, I get
>> lots of build errors.
>>
>> I want to get a V2 RFC patch out before digging through the
>> details of that.
>
> I'm about to send out a series that rationalises the block devices a
> bit. In the meantime, see u-boot-dm/blkb-working for some MMC ideas.
>

I figured things out and sent V2 and V3 versions of these patches.

Tom applied V3 to master, though I do still have three patches to
address Stephen's review pending:

http://lists.denx.de/pipermail/u-boot/2016-April/thread.html#250331

https://patchwork.ozlabs.org/patch/605421/
https://patchwork.ozlabs.org/patch/605420/
https://patchwork.ozlabs.org/patch/605422/

Regards,

Eric