Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
mtd: core: introduce of support for dynamic partitions
We have many parser that register mtd partitions at runtime. One example is the cmdlinepart or the smem partition where the compatible is defined in the dts and the partitions gets detected and registered by the parser. This is problematic for the Nvmem system that requires an of node to detect nvmem cells. To fix this problem, introduce an additional node called "dynamic-partitions" that must be defined at the same level of the "partitions" node that will contain all the required partitions where a nvmem cell has to be declared. When a mtd_get_of_node() is called, the function will first check the default dev_of_node() and then check this alternative partitions node and optionally if a "nvmem-cells" compatible is detected, sets the of node for the mtd. The "dynamic-partitions" requires the label set to the mtd name from the dynamic partition. All the nvmem-cells will be declared in this node and nvmem will use this node to register the nvmem cells. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- Loading branch information