Add support for Sercomm partitions
v6 cover Add support for Sercomm partitions
This patch add support for Sercomm mtd partition table parser. It's used in some Beeline, Netgear and Sercomm routers. The Sercomm partition map table contains real partition offsets, which may differ from device to device depending on the number and location of bad blocks on NAND. All necessary dt bindings has already been added previously.
Changes since:
v5:
- Fix undefined "__udivdi3" on 32-bit platforms (Reported-by: kernel test robot <[email protected]>): limit patch scope to RALINK platform only
- Sort variables
v4:
- Add Acked-by to the first patch
v3:
- Fix commit message of the first patch
- Add Reviewed-by to the second patch
v2:
- Fix mistakes in dt-binding
- Add patch for new vendor prefix
- Add vendor prefix to scpart-id property
v1:
- Add dt-binding in a separate patch
- Remove redundant braces and logical NOT operator
- Define pr_fmt
- Replace kcalloc by kzalloc
- Use of_get_child_count() and alloc big enough array before the for_each_child_of_node()
Mikhail Zhilkin (1):
mtd: parsers: add support for Sercomm partitions
drivers/mtd/parsers/Kconfig | 9 ++ drivers/mtd/parsers/Makefile | 1 + drivers/mtd/parsers/scpart.c | 248 +++++++++++++++++++++++++++++++++++ 3 files changed, 258 insertions(+) create mode 100644 drivers/mtd/parsers/scpart.c
Signature · 1 line
2.25.1
PATCH v6 1/1 mtd: parsers: add support for Sercomm partitions
This adds an MTD partition parser for the Sercomm partition table that is used in some Beeline, Netgear and Sercomm routers.
The Sercomm partition map table contains real partition offsets, which may differ from device to device depending on the number and location of bad blocks on NAND.
Original patch (proposed by NOGUCHI Hiroshi):
--- drivers/mtd/parsers/Kconfig | 9 ++ drivers/mtd/parsers/Makefile | 1 + drivers/mtd/parsers/scpart.c | 248 +++++++++++++++++++++++++++++++++++ 3 files changed, 258 insertions(+) create mode 100644 drivers/mtd/parsers/scpart.c
drivers/mtd/parsers/Kconfig +9 -0
@@ -186,3 +186,12 @@ config MTD_QCOMSMEM_PARTS help This provides support for parsing partitions from Shared Memory (SMEM) for NAND and SPI flash on Qualcomm platforms. + +config MTD_SERCOMM_PARTS + tristate "Sercomm partition table parser" + depends on MTD && RALINK + help + This provides partitions table parser for devices with Sercomm + partition map. This partition table contains real partition + offsets, which may differ from device to device depending on the + number and location of bad blocks on NAND.
drivers/mtd/parsers/Makefile +1 -0
@@ -10,6 +10,7 @@ ofpart-$(CONFIG_MTD_OF_PARTS_LINKSYS_NS)+= ofpart_linksys_ns.o obj-$(CONFIG_MTD_PARSER_IMAGETAG) += parser_imagetag.o obj-$(CONFIG_MTD_AFS_PARTS) += afs.o obj-$(CONFIG_MTD_PARSER_TRX) += parser_trx.o +obj-$(CONFIG_MTD_SERCOMM_PARTS) += scpart.o obj-$(CONFIG_MTD_SHARPSL_PARTS) += sharpslpart.o obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o obj-$(CONFIG_MTD_QCOMSMEM_PARTS) += qcomsmempart.o
drivers/mtd/parsers/scpart.c new file +248 -0
248 lines not on this page · raw message
Signature · 1 line
2.25.1
Re: [PATCH v6] mtd: parsers: add support for Sercomm partitions
Quoted 7 lines · Mikhail Zhilkin
This adds an MTD partition parser for the Sercomm partition table that is used in some Beeline, Netgear and Sercomm routers.
The Sercomm partition map table contains real partition offsets, which may differ from device to device depending on the number and location of bad blocks on NAND.
Quoted 5 lines
Original patch (proposed by NOGUCHI Hiroshi):
Signed-off-by NOGUCHI Hiroshi <[email protected]>Signed-off-by Mikhail Zhilkin <[email protected]>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel