OpenWrt – Diff between revs 2 and 3

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 2 Rev 3
Line 9... Line 9...
9 include/linux/mtd/partitions.h | 2 ++ 9 include/linux/mtd/partitions.h | 2 ++
10 3 files changed, 49 insertions(+) 10 3 files changed, 49 insertions(+)
Line 11... Line 11...
11   11  
12 --- a/drivers/mtd/mtdpart.c 12 --- a/drivers/mtd/mtdpart.c
-   13 +++ b/drivers/mtd/mtdpart.c
-   14 @@ -771,6 +771,17 @@ run_parsers_by_type(struct mtd_part *sla
-   15 return nr_parts;
-   16 }
-   17
-   18 +static inline unsigned long
-   19 +mtd_pad_erasesize(struct mtd_info *mtd, int offset, int len)
-   20 +{
-   21 + unsigned long mask = mtd->erasesize - 1;
-   22 +
-   23 + len += offset & mask;
-   24 + len = (len + mask) & ~mask;
-   25 + len -= offset & mask;
-   26 + return len;
-   27 +}
-   28 +
-   29 #ifdef CONFIG_MTD_SPLIT_FIRMWARE_NAME
-   30 #define SPLIT_FIRMWARE_NAME CONFIG_MTD_SPLIT_FIRMWARE_NAME
13 +++ b/drivers/mtd/mtdpart.c 31 #else
14 @@ -1235,6 +1235,24 @@ int mtd_is_partition(const struct mtd_in 32 @@ -1223,6 +1234,24 @@ int mtd_is_partition(const struct mtd_in
15 } 33 }
Line 16... Line 34...
16 EXPORT_SYMBOL_GPL(mtd_is_partition); 34 EXPORT_SYMBOL_GPL(mtd_is_partition);
17 35
Line 36... Line 54...
36 /* Returns the size of the entire flash chip */ 54 /* Returns the size of the entire flash chip */
37 uint64_t mtd_get_device_size(const struct mtd_info *mtd) 55 uint64_t mtd_get_device_size(const struct mtd_info *mtd)
38 { 56 {
39 --- a/include/linux/mtd/mtd.h 57 --- a/include/linux/mtd/mtd.h
40 +++ b/include/linux/mtd/mtd.h 58 +++ b/include/linux/mtd/mtd.h
41 @@ -494,6 +494,24 @@ static inline uint32_t mtd_mod_by_eb(uin 59 @@ -493,6 +493,24 @@ static inline uint32_t mtd_mod_by_eb(uin
42 return do_div(sz, mtd->erasesize); 60 return do_div(sz, mtd->erasesize);
43 } 61 }
Line 44... Line 62...
44 62
45 +static inline uint64_t mtd_roundup_to_eb(uint64_t sz, struct mtd_info *mtd) 63 +static inline uint64_t mtd_roundup_to_eb(uint64_t sz, struct mtd_info *mtd)
Line 63... Line 81...
63 static inline uint32_t mtd_div_by_ws(uint64_t sz, struct mtd_info *mtd) 81 static inline uint32_t mtd_div_by_ws(uint64_t sz, struct mtd_info *mtd)
64 { 82 {
65 if (mtd->writesize_shift) 83 if (mtd->writesize_shift)
66 --- a/include/linux/mtd/partitions.h 84 --- a/include/linux/mtd/partitions.h
67 +++ b/include/linux/mtd/partitions.h 85 +++ b/include/linux/mtd/partitions.h
68 @@ -116,6 +116,8 @@ int mtd_is_partition(const struct mtd_in 86 @@ -115,6 +115,8 @@ int mtd_is_partition(const struct mtd_in
69 int mtd_add_partition(struct mtd_info *master, const char *name, 87 int mtd_add_partition(struct mtd_info *master, const char *name,
70 long long offset, long long length); 88 long long offset, long long length);
71 int mtd_del_partition(struct mtd_info *master, int partno); 89 int mtd_del_partition(struct mtd_info *master, int partno);
72 +struct mtd_info *mtdpart_get_master(const struct mtd_info *mtd); 90 +struct mtd_info *mtdpart_get_master(const struct mtd_info *mtd);
73 +uint64_t mtdpart_get_offset(const struct mtd_info *mtd); 91 +uint64_t mtdpart_get_offset(const struct mtd_info *mtd);
74 uint64_t mtd_get_device_size(const struct mtd_info *mtd); 92 uint64_t mtd_get_device_size(const struct mtd_info *mtd);
75 -  
-   93 extern void __weak arch_split_mtd_part(struct mtd_info *master,
76 #endif 94 const char *name, int offset, int size);