mtd: nand: sunxi: Convert from fdtdec to ofnode
authorSamuel Holland <samuel@sholland.org>
Sun, 22 Jan 2023 22:06:34 +0000 (16:06 -0600)
committerAndre Przywara <andre.przywara@arm.com>
Fri, 28 Apr 2023 00:06:57 +0000 (01:06 +0100)
commit1eb09081f61fd69aec92b971f115cd8cc98789c3
tree18a3777d936643e37c68aee55e3295683e54e550
parentb05bf9415705faffc2a45c2a5f5385f119f9a8b1
mtd: nand: sunxi: Convert from fdtdec to ofnode

As a first step toward converting this driver to the driver model, use
the ofnode abstraction to replace direct references to the FDT blob.

Using ofnode_read_u32_index removes an extra pair of loops and makes the
allwinner,rb property optional, matching the devicetree binding.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Acked-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
drivers/mtd/nand/raw/sunxi_nand.c
include/fdtdec.h
lib/fdtdec.c