]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: parsers: ofpart: support BCM4908 fixed partitions
authorRafał Miłecki <rafal@milecki.pl>
Mon, 1 Mar 2021 10:58:23 +0000 (11:58 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 11 Mar 2021 08:37:49 +0000 (09:37 +0100)
commit9a52137944369487aed72f4ffc3a357204105803
treeaf733f0e7d8191970aa843567622d3489241bc30
parent77dde862396abf1ef3738aad39ee99436aa9b780
mtd: parsers: ofpart: support BCM4908 fixed partitions

Some devices use fixed partitioning with some partitions requiring some
extra logic. E.g. BCM4908 may have multiple firmware partitions but
detecting currently used one requires checking bootloader parameters.

To support such cases without duplicating a lot of code (without copying
most of the ofpart.c code) support for post-parsing callback was added.

BCM4908 support in ofpart can be enabled using config option and results
in compiling & executing a specific callback. It simply reads offset of
currently used firmware partition from the DT. Bootloader specifies it
using the "brcm_blparms" property.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210301105823.31032-1-zajec5@gmail.com
drivers/mtd/parsers/Kconfig
drivers/mtd/parsers/Makefile
drivers/mtd/parsers/ofpart.c [deleted file]
drivers/mtd/parsers/ofpart_bcm4908.c [new file with mode: 0644]
drivers/mtd/parsers/ofpart_bcm4908.h [new file with mode: 0644]
drivers/mtd/parsers/ofpart_core.c [new file with mode: 0644]