From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Wed, 22 May 2019 07:21:28 -0600 Subject: [U-Boot] [PATCH v2 1/1] common: fdt_support: Check mtdparts cell size In-Reply-To: References: <20190424053156.20673-1-stefan@olimex.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, 24 Apr 2019 at 09:18, Simon Glass wrote: > > On Tue, 23 Apr 2019 at 23:32, Stefan Mavrodiev wrote: > > > > When using fdt_fixup_mtdparts() offset and length cell sizes > > are limited to 4 bytes (1 cell). However if the mtd device is > > bigger then 4GiB, then #address-cells and #size-cells are > > 8 bytes (2 cells) [1]. > > > > This patch read #size-cells and uses either fdt32_t or > > fdt64_t cell size. The default is fdt32_t. > > > > [1] Documentation/devicetree/bindings/mtd/partition.txt > > > > Signed-off-by: Stefan Mavrodiev > > --- > > Changes for v2: > > - Use fdt_setprop_u64() and ..._u32() instead of fdt_setprop() > > - Add size value using fdt_appendprop_u64() and ..._u32() > > > > common/fdt_support.c | 31 ++++++++++++++++++++++--------- > > 1 file changed, 22 insertions(+), 9 deletions(-) > > > > Reviewed-by: Simon Glass Applied to u-boot-dm, thanks!