1 --- a/drivers/mtd/ar7part.c
2 +++ b/drivers/mtd/ar7part.c
4 #include <linux/mtd/partitions.h>
5 #include <linux/bootmem.h>
6 #include <linux/magic.h>
7 +#include <asm/mach-ar7/prom.h>
10 #define ROOT_OFFSET 0xe0000
12 #define LOADER_MAGIC1 le32_to_cpu(0xfeedfa42)
13 #define LOADER_MAGIC2 le32_to_cpu(0xfeed1281)
14 +#define LOADER_MAGIC3 le32_to_cpu(0x434d4d4c)
16 #ifndef SQUASHFS_MAGIC
17 #define SQUASHFS_MAGIC 0x73717368
18 @@ -44,6 +46,10 @@ struct ar7_bin_rec {
22 +int create_titan_partitions(struct mtd_info *master,
23 + struct mtd_partition **pparts,
24 + unsigned long origin);
26 static int create_mtd_partitions(struct mtd_info *master,
27 struct mtd_partition **pparts,
29 @@ -57,6 +63,16 @@ static int create_mtd_partitions(struct
31 struct mtd_partition *ar7_parts;
33 + const char *prod_id ;
34 + prod_id = prom_getenv("ProductID");
36 + (strcmp(prod_id, "CYWL")==0 ||
37 + strcmp(prod_id, "CYWM")==0 ||
38 + strcmp(prod_id, "CYLM")==0 ||
39 + strcmp(prod_id, "CYLL")==0)){
40 + return create_titan_partitions(master, pparts, origin);
43 ar7_parts = kzalloc(sizeof(*ar7_parts) * AR7_PARTS, GFP_KERNEL);
46 --- a/drivers/mtd/Makefile
47 +++ b/drivers/mtd/Makefile
48 @@ -12,6 +12,7 @@ obj-$(CONFIG_MTD_REDBOOT_PARTS) += redbo
49 obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o
50 obj-$(CONFIG_MTD_AFS_PARTS) += afs.o
51 obj-$(CONFIG_MTD_AR7_PARTS) += ar7part.o
52 +obj-$(CONFIG_MTD_AR7_PARTS) += titanpart.o
53 obj-$(CONFIG_MTD_OF_PARTS) += ofpart.o
54 obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o