[PATCH v2 0/3] fdt: Fix mtparts fixup

Francesco Dolcini francesco at dolcini.it
Mon Feb 6 23:48:35 CET 2023


From: Francesco Dolcini <francesco.dolcini at toradex.com>

Recently we had a boot regression on colibri-imx7 because of a cleanup change
on Linux imx7.dtsi setting nand controller node #size-cells from 1 to 0.

Because of that Linux partition parser was no longer able to properly
parse the OF partitions leading to a boot failure, the above change was
reverted in the meantime as an immediate workaround, but some improvement
is required on both Linux and U-Boot.

This change improve the U-Boot part of it, #size-cell is set to 1 when
it has an invalid value. This has the limitation to work only with devices
smaller than 4GiB. In general the suggestion from the Linux MTD maintainer would
be to not edit the DT partitions from U-Boot unless some dynamic tweaking is
required.

This series therefore convert colibri-imx6ull and colibri-imx7 to pass the
partition list from the command line instead of fixing up the DT.

Link: https://lore.kernel.org/all/20221202071900.1143950-1-francesco@dolcini.it/
Link: https://lore.kernel.org/all/Y4dgBTGNWpM6SQXI@francesco-nb.int.toradex.com/

v2:
 - removed dead code from colibri imx7/imx6ull
 - rewrote and clarify commit messages

Francesco Dolcini (3):
  fdt: validate/fix cells count on mtdpart fixup
  colibri-imx7: specify MTD partitions on command line
  colibri-imx6ull: specify MTD partitions on command line

 .../toradex/colibri-imx6ull/colibri-imx6ull.c | 11 -----
 board/toradex/colibri_imx7/colibri_imx7.c     | 10 -----
 common/fdt_support.c                          | 45 ++++++++++++++-----
 configs/colibri-imx6ull_defconfig             |  1 -
 configs/colibri_imx7_defconfig                |  1 -
 include/configs/colibri-imx6ull.h             |  2 +-
 include/configs/colibri_imx7.h                |  2 +-
 7 files changed, 37 insertions(+), 35 deletions(-)

-- 
2.25.1



More information about the U-Boot mailing list