--- zzzz-none-000/linux-4.1.38/drivers/mtd/mtdpart.c 2017-01-18 18:48:06.000000000 +0000 +++ bcm63-7582-715/linux-4.1.38/drivers/mtd/mtdpart.c 2020-11-25 10:06:48.000000000 +0000 @@ -34,6 +34,8 @@ #include "mtdcore.h" +#include + /* Our partition linked list */ static LIST_HEAD(mtd_partitions); static DEFINE_MUTEX(mtd_partitions_mutex); @@ -46,6 +48,9 @@ struct list_head list; }; +/* URLADER MTD */ +struct mtd_info *urlader_mtd; + /* * Given a pointer to the MTD object in the mtd_part structure, we can retrieve * the pointer to that structure with this macro. @@ -674,6 +679,22 @@ add_mtd_device(&slave->mtd); mtd_add_partition_attrs(slave); + // save AVM-Config partition + if(!strcmp(slave->mtd.name, "nvram")) { + if(slave->mtd.size > 0) { + urlader_mtd = &slave->mtd; + printk(KERN_NOTICE "[%s] MTD erster Flash_Block %s\n", __func__, slave->mtd.name); + } + } + + // TFFS3 registration + if(!strcmp(slave->mtd.name, "tffs")) { + if(slave->mtd.size > 0) { + TFFS3_Register_NAND(&slave->mtd); + printk(KERN_NOTICE "[%s] tffs3 on MTD %s\n", __func__, slave->mtd.name); + } + } + cur_offset = slave->offset + slave->mtd.size; } @@ -723,6 +744,7 @@ * are changing this array! */ static const char * const default_mtd_part_types[] = { + "avmpart", "cmdlinepart", "ofpart", NULL