[U-Boot] [PATCH 1/2] mtd: nand: tegra: convert to driver model and live tree

Masahiro Yamada yamada.masahiro at socionext.com
Fri Feb 23 16:59:41 UTC 2018


2018-02-24 1:40 GMT+09:00 Stefan Agner <stefan at agner.ch>:
> On 21.02.2018 16:16, Marcel Ziswiler wrote:
>> From: Marcel Ziswiler <marcel.ziswiler at toradex.com>
>>
>> The Tegra NAND driver recently got broken by ongoing driver model resp.
>> live tree migration work:
>>
>> NAND:  Could not decode nand-flash in device tree
>> Tegra NAND init failed
>> 0 MiB
>>
>> A patch for NAND uclass support was proposed about a year ago:
>> https://patchwork.ozlabs.org/patch/722282/
>>
>> It was not merged and I do not see on-going work for this.
>>
>> This commit just provides a driver model probe hook to retrieve further
>> configuration from the live device tree. As there is no NAND ulass as of
>> yet (ab)using UCLASS_MISC. Once UCLASS_NAND is supported, it would be
>> possible to migrate to it.
>>
>> Signed-off-by: Marcel Ziswiler <marcel.ziswiler at toradex.com>
>>
>> ---



>>
>> +U_BOOT_DRIVER(tegra_nand) = {
>> +     .name = "tegra-nand",
>> +     .id = UCLASS_MISC,
>
> There is also UCLASS_MTD, which I was going to use in a upcoming
> patchset for mxs_nand.c.
>
> I see that drivers/mtd/nand/denali_dt.c is currently using UCLASS_MISC,
> Masahiro, any reason for that?


I do not remember why.
Maybe, I just missed UCLASS_MTD.

The denali_dt only uses .probe(), so any uclass would be fine.
I guess I chose something that sounded generic, so "MISC".




> Commit d85879938d ("dm: implement a MTD uclass") seems to suggest that
> it should be fine for NAND flash drivers too...
>
> --
> Stefan
>



-- 
Best Regards
Masahiro Yamada


More information about the U-Boot mailing list