1 --- a/drivers/mtd/ar7part.c
2 +++ b/drivers/mtd/ar7part.c
4 #include <linux/magic.h>
5 #include <linux/module.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 @@ -45,6 +48,10 @@ struct ar7_bin_rec {
22 +int create_titan_partitions(struct mtd_info *master,
23 + struct mtd_partition **pparts,
24 + struct mtd_part_parser_data *data);
26 static int create_mtd_partitions(struct mtd_info *master,
27 struct mtd_partition **pparts,
28 struct mtd_part_parser_data *data)
29 @@ -58,6 +65,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, data);
43 ar7_parts = kzalloc(sizeof(*ar7_parts) * AR7_PARTS, GFP_KERNEL);
46 --- a/drivers/mtd/titanpart.c
47 +++ b/drivers/mtd/titanpart.c
48 @@ -149,7 +149,7 @@ static void titan_add_partition(char * e
50 int create_titan_partitions(struct mtd_info *master,
51 struct mtd_partition **pparts,
52 - unsigned long origin)
53 + struct mtd_part_parser_data *data)
55 struct nsp_img_hdr_head hdr;
56 struct nsp_img_hdr_section_info sect_info;