aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/hack-5.10/421-drivers-mtd-parsers-add-nvmem-support-to-cmdlinepart.patch
Commit message (Collapse)AuthorAgeFilesLines
* 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>