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

Bin Meng
2015-10-11T09:10:00Z

Hi Thomas,

On Sun, Oct 11, 2015 at 4:54 PM, Thomas Chou <thomas@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