Changeset 44663


Ignore:
Timestamp:
2015-03-11T16:56:15+01:00 (3 years ago)
Author:
blogic
Message:

ar71xx: rename wrt160nl's trx partition parser

This patch renames the partition parser from
wrt160nl to more generic cybertan.

Signed-off-by: Christian Lamparter <chunkeey@…>

Location:
trunk/target/linux/ar71xx
Files:
5 edited
3 moved

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/config-3.14

    r44611 r44663  
    255255CONFIG_MTD_SPLIT_UIMAGE_FW=y 
    256256CONFIG_MTD_TPLINK_PARTS=y 
    257 CONFIG_MTD_WRT160NL_PARTS=y 
     257CONFIG_MTD_CYBERTAN_PARTS=y 
    258258CONFIG_MYLOADER=y 
    259259CONFIG_NEED_DMA_MAP_STATE=y 
  • trunk/target/linux/ar71xx/config-3.18

    r44620 r44663  
    258258CONFIG_MTD_SPLIT_UIMAGE_FW=y 
    259259CONFIG_MTD_TPLINK_PARTS=y 
    260 CONFIG_MTD_WRT160NL_PARTS=y 
     260CONFIG_MTD_CYBERTAN_PARTS=y 
    261261CONFIG_MYLOADER=y 
    262262CONFIG_NEED_DMA_MAP_STATE=y 
  • trunk/target/linux/ar71xx/files/arch/mips/ath79/mach-wrt160nl.c

    r30405 r44663  
    3535 
    3636static const char *wrt160nl_part_probes[] = { 
    37         "wrt160nl", 
     37        "cybertan", 
    3838        NULL, 
    3939}; 
  • trunk/target/linux/ar71xx/files/drivers/mtd/cybertan_part.c

    r44662 r44663  
    6262        uint32_t        ih_time;        /* Image Creation Timestamp */ 
    6363        uint32_t        ih_size;        /* Image Data Size */ 
    64         uint32_t        ih_load;        /* Data» Load  Address */ 
     64        uint32_t        ih_load;        /* Data» Load  Address */ 
    6565        uint32_t        ih_ep;          /* Entry Point Address */ 
    6666        uint32_t        ih_dcrc;        /* Image Data CRC Checksum */ 
     
    7272}; 
    7373 
    74 struct wrt160nl_header { 
     74struct firmware_header { 
    7575        struct cybertan_header  cybertan; 
    7676        struct trx_header       trx; 
    7777        struct uimage_header    uimage; 
    78 } __attribute__ ((packed)); 
    79  
    80 #define WRT160NL_UBOOT_LEN      0x40000 
    81 #define WRT160NL_ART_LEN        0x10000 
    82 #define WRT160NL_NVRAM_LEN      0x10000 
    83  
    84 static int wrt160nl_parse_partitions(struct mtd_info *master, 
     78} __packed; 
     79 
     80#define UBOOT_LEN       0x40000 
     81#define ART_LEN         0x10000 
     82#define NVRAM_LEN       0x10000 
     83 
     84static int cybertan_parse_partitions(struct mtd_info *master, 
    8585                                     struct mtd_partition **pparts, 
    8686                                     struct mtd_part_parser_data *data) 
    8787{ 
    88         struct wrt160nl_header *header; 
     88        struct firmware_header *header; 
    8989        struct trx_header *theader; 
    9090        struct uimage_header *uheader; 
     
    9797        int ret; 
    9898 
    99         uboot_len = max_t(unsigned int, master->erasesize, WRT160NL_UBOOT_LEN); 
    100         nvram_len = max_t(unsigned int, master->erasesize, WRT160NL_NVRAM_LEN); 
    101         art_len = max_t(unsigned int, master->erasesize, WRT160NL_ART_LEN); 
     99        uboot_len = max_t(unsigned int, master->erasesize, UBOOT_LEN); 
     100        nvram_len = max_t(unsigned int, master->erasesize, NVRAM_LEN); 
     101        art_len = max_t(unsigned int, master->erasesize, ART_LEN); 
    102102 
    103103        trx_parts = kzalloc(TRX_PARTS * sizeof(struct mtd_partition), 
     
    126126        if (strncmp(header->cybertan.magic, "NL16", 4) != 0) { 
    127127                printk(KERN_NOTICE "%s: no WRT160NL signature found\n", 
    128                         master->name); 
     128                       master->name); 
    129129                goto free_hdr; 
    130130        } 
     
    189189} 
    190190 
    191 static struct mtd_part_parser wrt160nl_parser = { 
     191static struct mtd_part_parser cybertan_parser = { 
    192192        .owner          = THIS_MODULE, 
    193         .parse_fn       = wrt160nl_parse_partitions, 
    194         .name           = "wrt160nl", 
    195 }; 
    196  
    197 static int __init wrt160nl_parser_init(void) 
     193        .parse_fn       = cybertan_parse_partitions, 
     194        .name           = "cybertan", 
     195}; 
     196 
     197static int __init cybertan_parser_init(void) 
    198198{ 
    199         register_mtd_parser(&wrt160nl_parser); 
     199        register_mtd_parser(&cybertan_parser); 
    200200 
    201201        return 0; 
    202202} 
    203203 
    204 module_init(wrt160nl_parser_init); 
     204module_init(cybertan_parser_init); 
    205205 
    206206MODULE_LICENSE("GPL"); 
  • trunk/target/linux/ar71xx/patches-3.14/404-mtd-cybertan-trx-parser.patch

    r44662 r44663  
    55          boards. 
    66  
    7 +config MTD_WRT160NL_PARTS 
    8 +       tristate "Linksys WRT160NL partitioning support" 
    9 +       depends on ATH79_MACH_WRT160NL 
     7+config MTD_CYBERTAN_PARTS 
     8+       tristate "Cybertan partitioning support" 
     9+       depends on ATH79 
    1010+       ---help--- 
    11 +          Linksys WRT160NL partitioning support 
     11+          Cybertan partitioning support 
    1212+ 
    1313 config MTD_MYLOADER_PARTS 
     
    2020 obj-$(CONFIG_MTD_BCM47XX_PARTS)        += bcm47xxpart.o 
    2121 obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o 
    22 +obj-$(CONFIG_MTD_WRT160NL_PARTS) += wrt160nl_part.o 
     22+obj-$(CONFIG_MTD_CYBERTAN_PARTS) += cybertan_part.o 
    2323  
    2424 # 'Users' - code which presents functionality to userspace. 
  • trunk/target/linux/ar71xx/patches-3.14/405-mtd-tp-link-partition-parser.patch

    r44662 r44663  
    2121 obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o 
    2222+obj-$(CONFIG_MTD_TPLINK_PARTS) += tplinkpart.o 
    23  obj-$(CONFIG_MTD_WRT160NL_PARTS) += wrt160nl_part.o 
     23 obj-$(CONFIG_MTD_WRT160NL_PARTS) += cybertan_part.o 
    2424  
    2525 # 'Users' - code which presents functionality to userspace. 
  • trunk/target/linux/ar71xx/patches-3.18/404-mtd-cybertan-trx-parser.patch

    r44662 r44663  
    55          boards. 
    66  
    7 +config MTD_WRT160NL_PARTS 
    8 +       tristate "Linksys WRT160NL partitioning support" 
    9 +       depends on ATH79_MACH_WRT160NL 
     7+config MTD_CYBERTAN_PARTS 
     8+       tristate "Cybertan partitioning support" 
     9+       depends on ATH79 
    1010+       ---help--- 
    11 +          Linksys WRT160NL partitioning support 
     11+          Cybertan partitioning support 
    1212+ 
    1313 config MTD_MYLOADER_PARTS 
     
    2020 obj-$(CONFIG_MTD_BCM47XX_PARTS)        += bcm47xxpart.o 
    2121 obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o 
    22 +obj-$(CONFIG_MTD_WRT160NL_PARTS) += wrt160nl_part.o 
     22+obj-$(CONFIG_MTD_CYBERTAN_PARTS) += cybertan_part.o 
    2323  
    2424 # 'Users' - code which presents functionality to userspace. 
  • trunk/target/linux/ar71xx/patches-3.18/405-mtd-tp-link-partition-parser.patch

    r44662 r44663  
    2121 obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o 
    2222+obj-$(CONFIG_MTD_TPLINK_PARTS) += tplinkpart.o 
    23  obj-$(CONFIG_MTD_WRT160NL_PARTS) += wrt160nl_part.o 
     23 obj-$(CONFIG_MTD_CYBERTAN_PARTS) += cybertan_part.o 
    2424  
    2525 # 'Users' - code which presents functionality to userspace. 
Note: See TracChangeset for help on using the changeset viewer.