aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2015-03-11 15:56:15 +0000
committerJohn Crispin <john@openwrt.org>2015-03-11 15:56:15 +0000
commite5373f2761544b3a0bef395b7239dfb281bc8211 (patch)
treea6231c628ac3d1f7f0758dc7d08b917ef2f72a52
parent9f16b370a0506f01aa5ec40190e995f371d9027a (diff)
downloadupstream-e5373f2761544b3a0bef395b7239dfb281bc8211.tar.gz
upstream-e5373f2761544b3a0bef395b7239dfb281bc8211.tar.bz2
upstream-e5373f2761544b3a0bef395b7239dfb281bc8211.zip
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@googlemail.com> SVN-Revision: 44663
-rw-r--r--target/linux/ar71xx/config-3.142
-rw-r--r--target/linux/ar71xx/config-3.182
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-wrt160nl.c2
-rw-r--r--target/linux/ar71xx/files/drivers/mtd/cybertan_part.c (renamed from target/linux/ar71xx/files/drivers/mtd/wrt160nl_part.c)36
-rw-r--r--target/linux/ar71xx/patches-3.14/404-mtd-cybertan-trx-parser.patch (renamed from target/linux/ar71xx/patches-3.14/404-mtd-wrt160nl-trx-parser.patch)10
-rw-r--r--target/linux/ar71xx/patches-3.14/405-mtd-tp-link-partition-parser.patch2
-rw-r--r--target/linux/ar71xx/patches-3.18/404-mtd-cybertan-trx-parser.patch (renamed from target/linux/ar71xx/patches-3.18/404-mtd-wrt160nl-trx-parser.patch)10
-rw-r--r--target/linux/ar71xx/patches-3.18/405-mtd-tp-link-partition-parser.patch2
8 files changed, 33 insertions, 33 deletions
diff --git a/target/linux/ar71xx/config-3.14 b/target/linux/ar71xx/config-3.14
index ec98767472..e4e598f8c7 100644
--- a/target/linux/ar71xx/config-3.14
+++ b/target/linux/ar71xx/config-3.14
@@ -254,7 +254,7 @@ CONFIG_MTD_SPLIT_LZMA_FW=y
CONFIG_MTD_SPLIT_SEAMA_FW=y
CONFIG_MTD_SPLIT_UIMAGE_FW=y
CONFIG_MTD_TPLINK_PARTS=y
-CONFIG_MTD_WRT160NL_PARTS=y
+CONFIG_MTD_CYBERTAN_PARTS=y
CONFIG_MYLOADER=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_PER_CPU_KM=y
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index f881a292f0..5c25f32f28 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -257,7 +257,7 @@ CONFIG_MTD_SPLIT_LZMA_FW=y
CONFIG_MTD_SPLIT_SEAMA_FW=y
CONFIG_MTD_SPLIT_UIMAGE_FW=y
CONFIG_MTD_TPLINK_PARTS=y
-CONFIG_MTD_WRT160NL_PARTS=y
+CONFIG_MTD_CYBERTAN_PARTS=y
CONFIG_MYLOADER=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_PER_CPU_KM=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wrt160nl.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wrt160nl.c
index 21aefe00a0..ede3c214c2 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wrt160nl.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wrt160nl.c
@@ -34,7 +34,7 @@
#define WRT160NL_NVRAM_SIZE 0x10000
static const char *wrt160nl_part_probes[] = {
- "wrt160nl",
+ "cybertan",
NULL,
};
diff --git a/target/linux/ar71xx/files/drivers/mtd/wrt160nl_part.c b/target/linux/ar71xx/files/drivers/mtd/cybertan_part.c
index 698bba87ea..e03967a98b 100644
--- a/target/linux/ar71xx/files/drivers/mtd/wrt160nl_part.c
+++ b/target/linux/ar71xx/files/drivers/mtd/cybertan_part.c
@@ -61,7 +61,7 @@ struct uimage_header {
uint32_t ih_hcrc; /* Image Header CRC Checksum */
uint32_t ih_time; /* Image Creation Timestamp */
uint32_t ih_size; /* Image Data Size */
- uint32_t ih_load; /* Data» Load Address */
+ uint32_t ih_load; /* Data» Load Address */
uint32_t ih_ep; /* Entry Point Address */
uint32_t ih_dcrc; /* Image Data CRC Checksum */
uint8_t ih_os; /* Operating System */
@@ -71,21 +71,21 @@ struct uimage_header {
uint8_t ih_name[IH_NMLEN]; /* Image Name */
};
-struct wrt160nl_header {
+struct firmware_header {
struct cybertan_header cybertan;
struct trx_header trx;
struct uimage_header uimage;
-} __attribute__ ((packed));
+} __packed;
-#define WRT160NL_UBOOT_LEN 0x40000
-#define WRT160NL_ART_LEN 0x10000
-#define WRT160NL_NVRAM_LEN 0x10000
+#define UBOOT_LEN 0x40000
+#define ART_LEN 0x10000
+#define NVRAM_LEN 0x10000
-static int wrt160nl_parse_partitions(struct mtd_info *master,
+static int cybertan_parse_partitions(struct mtd_info *master,
struct mtd_partition **pparts,
struct mtd_part_parser_data *data)
{
- struct wrt160nl_header *header;
+ struct firmware_header *header;
struct trx_header *theader;
struct uimage_header *uheader;
struct mtd_partition *trx_parts;
@@ -96,9 +96,9 @@ static int wrt160nl_parse_partitions(struct mtd_info *master,
unsigned int art_len;
int ret;
- uboot_len = max_t(unsigned int, master->erasesize, WRT160NL_UBOOT_LEN);
- nvram_len = max_t(unsigned int, master->erasesize, WRT160NL_NVRAM_LEN);
- art_len = max_t(unsigned int, master->erasesize, WRT160NL_ART_LEN);
+ uboot_len = max_t(unsigned int, master->erasesize, UBOOT_LEN);
+ nvram_len = max_t(unsigned int, master->erasesize, NVRAM_LEN);
+ art_len = max_t(unsigned int, master->erasesize, ART_LEN);
trx_parts = kzalloc(TRX_PARTS * sizeof(struct mtd_partition),
GFP_KERNEL);
@@ -125,7 +125,7 @@ static int wrt160nl_parse_partitions(struct mtd_info *master,
if (strncmp(header->cybertan.magic, "NL16", 4) != 0) {
printk(KERN_NOTICE "%s: no WRT160NL signature found\n",
- master->name);
+ master->name);
goto free_hdr;
}
@@ -188,20 +188,20 @@ out:
return ret;
}
-static struct mtd_part_parser wrt160nl_parser = {
+static struct mtd_part_parser cybertan_parser = {
.owner = THIS_MODULE,
- .parse_fn = wrt160nl_parse_partitions,
- .name = "wrt160nl",
+ .parse_fn = cybertan_parse_partitions,
+ .name = "cybertan",
};
-static int __init wrt160nl_parser_init(void)
+static int __init cybertan_parser_init(void)
{
- register_mtd_parser(&wrt160nl_parser);
+ register_mtd_parser(&cybertan_parser);
return 0;
}
-module_init(wrt160nl_parser_init);
+module_init(cybertan_parser_init);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Christian Daniel <cd@maintech.de>");
diff --git a/target/linux/ar71xx/patches-3.14/404-mtd-wrt160nl-trx-parser.patch b/target/linux/ar71xx/patches-3.14/404-mtd-cybertan-trx-parser.patch
index b5f4b529af..7995abbb45 100644
--- a/target/linux/ar71xx/patches-3.14/404-mtd-wrt160nl-trx-parser.patch
+++ b/target/linux/ar71xx/patches-3.14/404-mtd-cybertan-trx-parser.patch
@@ -4,11 +4,11 @@
This provides partitions parser for devices based on BCM47xx
boards.
-+config MTD_WRT160NL_PARTS
-+ tristate "Linksys WRT160NL partitioning support"
-+ depends on ATH79_MACH_WRT160NL
++config MTD_CYBERTAN_PARTS
++ tristate "Cybertan partitioning support"
++ depends on ATH79
+ ---help---
-+ Linksys WRT160NL partitioning support
++ Cybertan partitioning support
+
config MTD_MYLOADER_PARTS
tristate "MyLoader partition parsing"
@@ -19,7 +19,7 @@
obj-$(CONFIG_MTD_BCM63XX_PARTS) += bcm63xxpart.o
obj-$(CONFIG_MTD_BCM47XX_PARTS) += bcm47xxpart.o
obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o
-+obj-$(CONFIG_MTD_WRT160NL_PARTS) += wrt160nl_part.o
++obj-$(CONFIG_MTD_CYBERTAN_PARTS) += cybertan_part.o
# 'Users' - code which presents functionality to userspace.
obj-$(CONFIG_MTD_BLKDEVS) += mtd_blkdevs.o
diff --git a/target/linux/ar71xx/patches-3.14/405-mtd-tp-link-partition-parser.patch b/target/linux/ar71xx/patches-3.14/405-mtd-tp-link-partition-parser.patch
index 74e79ea770..c43c5055d9 100644
--- a/target/linux/ar71xx/patches-3.14/405-mtd-tp-link-partition-parser.patch
+++ b/target/linux/ar71xx/patches-3.14/405-mtd-tp-link-partition-parser.patch
@@ -20,6 +20,6 @@
obj-$(CONFIG_MTD_BCM47XX_PARTS) += bcm47xxpart.o
obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o
+obj-$(CONFIG_MTD_TPLINK_PARTS) += tplinkpart.o
- obj-$(CONFIG_MTD_WRT160NL_PARTS) += wrt160nl_part.o
+ obj-$(CONFIG_MTD_WRT160NL_PARTS) += cybertan_part.o
# 'Users' - code which presents functionality to userspace.
diff --git a/target/linux/ar71xx/patches-3.18/404-mtd-wrt160nl-trx-parser.patch b/target/linux/ar71xx/patches-3.18/404-mtd-cybertan-trx-parser.patch
index b5f4b529af..7995abbb45 100644
--- a/target/linux/ar71xx/patches-3.18/404-mtd-wrt160nl-trx-parser.patch
+++ b/target/linux/ar71xx/patches-3.18/404-mtd-cybertan-trx-parser.patch
@@ -4,11 +4,11 @@
This provides partitions parser for devices based on BCM47xx
boards.
-+config MTD_WRT160NL_PARTS
-+ tristate "Linksys WRT160NL partitioning support"
-+ depends on ATH79_MACH_WRT160NL
++config MTD_CYBERTAN_PARTS
++ tristate "Cybertan partitioning support"
++ depends on ATH79
+ ---help---
-+ Linksys WRT160NL partitioning support
++ Cybertan partitioning support
+
config MTD_MYLOADER_PARTS
tristate "MyLoader partition parsing"
@@ -19,7 +19,7 @@
obj-$(CONFIG_MTD_BCM63XX_PARTS) += bcm63xxpart.o
obj-$(CONFIG_MTD_BCM47XX_PARTS) += bcm47xxpart.o
obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o
-+obj-$(CONFIG_MTD_WRT160NL_PARTS) += wrt160nl_part.o
++obj-$(CONFIG_MTD_CYBERTAN_PARTS) += cybertan_part.o
# 'Users' - code which presents functionality to userspace.
obj-$(CONFIG_MTD_BLKDEVS) += mtd_blkdevs.o
diff --git a/target/linux/ar71xx/patches-3.18/405-mtd-tp-link-partition-parser.patch b/target/linux/ar71xx/patches-3.18/405-mtd-tp-link-partition-parser.patch
index 74e79ea770..11a9beb19e 100644
--- a/target/linux/ar71xx/patches-3.18/405-mtd-tp-link-partition-parser.patch
+++ b/target/linux/ar71xx/patches-3.18/405-mtd-tp-link-partition-parser.patch
@@ -20,6 +20,6 @@
obj-$(CONFIG_MTD_BCM47XX_PARTS) += bcm47xxpart.o
obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o
+obj-$(CONFIG_MTD_TPLINK_PARTS) += tplinkpart.o
- obj-$(CONFIG_MTD_WRT160NL_PARTS) += wrt160nl_part.o
+ obj-$(CONFIG_MTD_CYBERTAN_PARTS) += cybertan_part.o
# 'Users' - code which presents functionality to userspace.