OpenWrt – Blame information for rev 2
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl> |
2 | Subject: [PATCH] mtd: redboot: add of_match_table with DT binding |
||
3 | MIME-Version: 1.0 |
||
4 | Content-Type: text/plain; charset=UTF-8 |
||
5 | Content-Transfer-Encoding: 8bit |
||
6 | |||
7 | This allows parsing RedBoot compatible partitions for properly described |
||
8 | flash device in DT. |
||
9 | |||
10 | Signed-off-by: Rafał Miłecki <rafal@milecki.pl> |
||
11 | --- |
||
12 | |||
13 | --- a/drivers/mtd/redboot.c |
||
14 | +++ b/drivers/mtd/redboot.c |
||
15 | @@ -29,6 +29,7 @@ |
||
16 | #include <linux/mtd/mtd.h> |
||
17 | #include <linux/mtd/partitions.h> |
||
18 | #include <linux/module.h> |
||
19 | +#include <linux/mod_devicetable.h> |
||
20 | |||
21 | struct fis_image_desc { |
||
22 | unsigned char name[16]; // Null terminated name |
||
23 | @@ -289,9 +290,16 @@ static int parse_redboot_partitions(stru |
||
24 | return ret; |
||
25 | } |
||
26 | |||
27 | +static const struct of_device_id redboot_parser_of_match_table[] = { |
||
28 | + { .compatible = "ecoscentric,redboot-fis-partitions" }, |
||
29 | + {}, |
||
30 | +}; |
||
31 | +MODULE_DEVICE_TABLE(of, redboot_parser_of_match_table); |
||
32 | + |
||
33 | static struct mtd_part_parser redboot_parser = { |
||
34 | .parse_fn = parse_redboot_partitions, |
||
35 | .name = "RedBoot", |
||
36 | + .of_match_table = redboot_parser_of_match_table, |
||
37 | }; |
||
38 | module_mtd_part_parser(redboot_parser); |
||
39 |