aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/hack-5.10/421-drivers-mtd-parsers-add-nvmem-support-to-cmdlinepart.patch
Commit message (Collapse)AuthorAgeFilesLines
* kernel: split out mtd hack for CONFIG_FIT_PARTITION + rootfsRafał Miłecki2022-11-081-120/+0
| | | | | | | | This is some hack on top of our old hack. Use separated patch for it so it's easier to understand and actually possible to describe. We should ideally get rid of this (and we actually did with kernels 5.15+). Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* kernel: mtd: parsers: add nvmem support to cmdlinepartAnsuel Smith2021-12-271-0/+120
Assuming cmdlinepart is only one level deep partition scheme and that static partition are also defined in DTS, we can assign an of_node for partition declared from bootargs. The cmdlinepart parser is the first parser checked and if it does find some partition declared in the bootargs, every other parser is ignored. This means that the fixed-partition parser is ignored and an of_node for the mtd is never assigned. Fix this by searching a defined of_node using a similar fixed_partition parsing logig, check if a partition is present with the same label, check that it has the same offset and size and finally assign an of_node to the mtd. The NVMEM can now find the of_node for the mtd and correctly works. Fixes: abc17bf306ac ("ath79: convert mtd-mac-address to nvmem implementation") Tested-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>