[PATCH] mtd: nand: raw: convert nand_dt_init() to ofnode_xx() interface

Heiko Schocher hs at denx.de
Tue Sep 28 08:30:11 CEST 2021


Hello Patrice,

On 13.09.21 16:25, Patrice Chotard wrote:
> nand_dt_init() is still using fdtdec_xx() interface.
> If OF_LIVE flag is enabled, dt property can't be get anymore.
> Updating all fdtdec_xx() interface to ofnode_xx() to solve this issue.
> 
> For doing this, node parameter type must be ofnode.
> 
> First idea was to convert "node" parameter to ofnode type inside
> nand_dt_init() using offset_to_ofnode(node). But offset_to_ofnode()
> is not bijective, in case OF_LIVE flag is enabled, it performs an assert().
> 
> So, this leads to update nand_chip struct flash_node field from int to
> ofnode and to update all nand_dt_init() callers.
> 
> Signed-off-by: Patrice Chotard <patrice.chotard at foss.st.com>
> ---
> 
>  drivers/mtd/nand/raw/denali.c          |  2 +-
>  drivers/mtd/nand/raw/mxs_nand.c        |  2 +-
>  drivers/mtd/nand/raw/nand_base.c       | 27 +++++++++++---------------
>  drivers/mtd/nand/raw/stm32_fmc2_nand.c |  2 +-
>  drivers/mtd/nand/raw/sunxi_nand.c      |  2 +-
>  include/linux/mtd/rawnand.h            |  6 +++---
>  6 files changed, 18 insertions(+), 23 deletions(-)

Applied to u-boot-i2c next

Thanks!

bye,
Heiko


-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de


More information about the U-Boot mailing list