[U-Boot] [PATCH v2] dm: implement a cfi flash uclass

Bin Meng bmeng.cn at gmail.com
Sun Oct 11 11:10:00 CEST 2015


Hi Thomas,

On Sun, Oct 11, 2015 at 4:54 PM, Thomas Chou <thomas at wytron.com.tw> wrote:
> Hi Bin,
>
> On 10/11/2015 03:54 PM, Bin Meng wrote:
>>
>> By looking at the implementation, is it really necessary to add a new
>> uclass for cfi-flash, given we only need get the flash base address?
>> There are no cfi-flash specific ops defined.
>> Why not just read its base address from device tree?
>
>
> Yes, there is not flash ops involved at the moment.
>
> I have tried to minimize the change to existing cfi_flash driver, and got it
> just works when I am converting all nios2 related devices to driver model
> and device tree control.
>
> Yet it is just the beginning to convert cfi flash to driver model. It will
> include per device flash_info and flash related operations in the full
> extent.
>

It's unlikely we are going to create another instance of cfi-flash
driver, isn't it? Then it's just a single driver which does not make
cfi-flash a "class". We can just update the cfi-flash driver to read
its flash base address directly from device tree, without the need to
go through driver model.

Regards,
Bin


More information about the U-Boot mailing list