Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/556242/?format=api
{ "id": 556242, "url": "http://patchwork.ozlabs.org/api/patches/556242/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/patch/566DF563.7020602@simon.arlott.org.uk/", "project": { "id": 3, "url": "http://patchwork.ozlabs.org/api/projects/3/?format=api", "name": "Linux MTD development", "link_name": "linux-mtd", "list_id": "linux-mtd.lists.infradead.org", "list_email": "linux-mtd@lists.infradead.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<566DF563.7020602@simon.arlott.org.uk>", "list_archive_url": null, "date": "2015-12-13T22:46:59", "name": "[linux-next,v4,03/11] MIPS: bcm963xx: Move Broadcom BCM963xx image tag data structure", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": false, "hash": "c6e60dbc27dc25e347928119910c18c20843dea7", "submitter": { "id": 1123, "url": "http://patchwork.ozlabs.org/api/people/1123/?format=api", "name": "Simon Arlott", "email": "simon@fire.lp0.eu" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-mtd/patch/566DF563.7020602@simon.arlott.org.uk/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/556242/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/556242/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Received": [ "from bombadil.infradead.org (bombadil.infradead.org\n\t[IPv6:2001:1868:205::9])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3E26F1402B4\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 14 Dec 2015 09:48:51 +1100 (AEDT)", "from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux))\n\tid 1a8FQM-0005rw-A3; Sun, 13 Dec 2015 22:47:26 +0000", "from proxima.lp0.eu ([2001:8b0:ffea:0:205:b4ff:fe12:530])\n\tby bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux))\n\tid 1a8FQJ-0005mQ-8L\n\tfor linux-mtd@lists.infradead.org; Sun, 13 Dec 2015 22:47:24 +0000", "from redrum.lp0.eu ([2001:8b0:ffea:0:2e0:81ff:fe4d:2bec]:44495\n\tident=simon)\n\tby proxima.lp0.eu ([2001:8b0:ffea:0:205:b4ff:fe12:530]:465)\n\twith esmtpsav (UNKNOWN:DHE-RSA-AES256-SHA:256/CN=Simon Arlott)\n\tid 1a8FPw-0003rF-Mp (Exim); Sun, 13 Dec 2015 22:47:01 +0000" ], "Authentication-Results": "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tsecure) header.d=fire.lp0.eu header.i=@fire.lp0.eu header.b=j0S4+wu+;\n\tdkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=fire.lp0.eu; s=exim; \n\th=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To:Subject;\n\tbh=T3RSHsqt/enmcRkn9bpTNuBnqFvHluM6WVE3LN50xLc=; \n\tb=j0S4+wu+fMFNNskM0KDtiHJAI/aY3T6Q08iKpXAftnuKTZ+7w+QfkTPqs97pA9snzoxxkUWzxHlArGIjq7SfZpJxBFSLM/vG0sI1HsmpDyMT8Xt3REky39YxaAcP1dZAL8mXmWkvE+BD52BZ3xr1o5lr9Rov6M68PqAqZpAYFiwNrpltKu5W8zOg0arjTdFtQ+6O/z6Co0QG3El51Jevne+UoIovn7ycGvCBpamNJzTfvplCtjlC4wko6NQiYG/bEXxTLTUNNyZdWSr4CWNrpfvn+m6zY/XwVbNdjWfQY6ekKWNd5vjanuA6PPmFCAKyHKkQakUMjFGrwW8DXWeDiA==;", "Subject": "[PATCH linux-next v4 03/11] MIPS: bcm963xx: Move Broadcom BCM963xx\n\timage tag data structure", "To": "Ralf Baechle <ralf@linux-mips.org>, David Woodhouse\n\t<dwmw2@infradead.org>, Brian Norris <computersforpeace@gmail.com>,\n\tKevin Cernekee <cernekee@gmail.com>, Florian Fainelli\n\t<f.fainelli@gmail.com>, Jonas Gorski <jogo@openwrt.org>", "References": "<566DF43B.5010400@simon.arlott.org.uk>", "From": "Simon Arlott <simon@fire.lp0.eu>", "Message-ID": "<566DF563.7020602@simon.arlott.org.uk>", "Date": "Sun, 13 Dec 2015 22:46:59 +0000", "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101\n\tThunderbird/38.4.0", "MIME-Version": "1.0", "In-Reply-To": "<566DF43B.5010400@simon.arlott.org.uk>", "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ", "X-CRM114-CacheID": "sfid-20151213_144723_523706_9D2A019C ", "X-CRM114-Status": "GOOD ( 20.14 )", "X-Spam-Score": "-4.3 (----)", "X-Spam-Report": "SpamAssassin version 3.4.0 on bombadil.infradead.org summary:\n\tContent analysis details: (-4.3 points)\n\tpts rule name description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\n\tmedium trust [2001:8b0:ffea:0:205:b4ff:fe12:530 listed in]\n\t[list.dnswl.org]\n\t-0.0 SPF_HELO_PASS SPF: HELO matches SPF record\n\t-0.0 SPF_PASS SPF: sender matches SPF record\n\t-0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t0.1 DKIM_SIGNED Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature", "X-BeenThere": "linux-mtd@lists.infradead.org", "X-Mailman-Version": "2.1.20", "Precedence": "list", "List-Id": "Linux MTD discussion mailing list <linux-mtd.lists.infradead.org>", "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe>", "List-Archive": "<http://lists.infradead.org/pipermail/linux-mtd/>", "List-Post": "<mailto:linux-mtd@lists.infradead.org>", "List-Help": "<mailto:linux-mtd-request@lists.infradead.org?subject=help>", "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=subscribe>", "Cc": "MIPS Mailing List <linux-mips@linux-mips.org>,\n\tMTD Maling List <linux-mtd@lists.infradead.org>,\n\tLinux Kernel Mailing List <linux-kernel@vger.kernel.org>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Sender": "\"linux-mtd\" <linux-mtd-bounces@lists.infradead.org>", "Errors-To": "linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org" }, "content": "Move Broadcom BCM963xx image tag data structure to include/linux/\nso that drivers outside of mach-bcm63xx can use it.\n\nSigned-off-by: Simon Arlott <simon@fire.lp0.eu>\n---\nv4: New patch.\n\n MAINTAINERS | 1 +\n arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h | 96 ----------------------\n drivers/mtd/bcm63xxpart.c | 2 +-\n include/linux/bcm963xx_tag.h | 98 +++++++++++++++++++++++\n 4 files changed, 100 insertions(+), 97 deletions(-)\n delete mode 100644 arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h\n create mode 100644 include/linux/bcm963xx_tag.h", "diff": "diff --git a/MAINTAINERS b/MAINTAINERS\nindex ac7de1a..b2ef403 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -2392,6 +2392,7 @@ F:\tarch/mips/boot/dts/brcm/bcm*.dts*\n F:\tdrivers/irqchip/irq-bcm7*\n F:\tdrivers/irqchip/irq-brcmstb*\n F:\tinclude/linux/bcm963xx_nvram.h\n+F:\tinclude/linux/bcm963xx_tag.h\n \n BROADCOM TG3 GIGABIT ETHERNET DRIVER\n M:\tPrashant Sreedharan <prashant@broadcom.com>\ndiff --git a/arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h b/arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h\ndeleted file mode 100644\nindex 1e6b587..0000000\n--- a/arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h\n+++ /dev/null\n@@ -1,96 +0,0 @@\n-#ifndef __BCM963XX_TAG_H\n-#define __BCM963XX_TAG_H\n-\n-#define TAGVER_LEN\t\t4\t/* Length of Tag Version */\n-#define TAGLAYOUT_LEN\t\t4\t/* Length of FlashLayoutVer */\n-#define SIG1_LEN\t\t20\t/* Company Signature 1 Length */\n-#define SIG2_LEN\t\t14\t/* Company Signature 2 Length */\n-#define BOARDID_LEN\t\t16\t/* Length of BoardId */\n-#define ENDIANFLAG_LEN\t\t2\t/* Endian Flag Length */\n-#define CHIPID_LEN\t\t6\t/* Chip Id Length */\n-#define IMAGE_LEN\t\t10\t/* Length of Length Field */\n-#define ADDRESS_LEN\t\t12\t/* Length of Address field */\n-#define DUALFLAG_LEN\t\t2\t/* Dual Image flag Length */\n-#define INACTIVEFLAG_LEN\t2\t/* Inactie Flag Length */\n-#define RSASIG_LEN\t\t20\t/* Length of RSA Signature in tag */\n-#define TAGINFO1_LEN\t\t30\t/* Length of vendor information field1 in tag */\n-#define FLASHLAYOUTVER_LEN\t4\t/* Length of Flash Layout Version String tag */\n-#define TAGINFO2_LEN\t\t16\t/* Length of vendor information field2 in tag */\n-#define ALTTAGINFO_LEN\t\t54\t/* Alternate length for vendor information; Pirelli */\n-\n-#define NUM_PIRELLI\t\t2\n-#define IMAGETAG_CRC_START\t0xFFFFFFFF\n-\n-#define PIRELLI_BOARDS { \\\n-\t\"AGPF-S0\", \\\n-\t\"DWV-S0\", \\\n-}\n-\n-/*\n- * The broadcom firmware assumes the rootfs starts the image,\n- * therefore uses the rootfs start (flash_image_address)\n- * to determine where to flash the image. Since we have the kernel first\n- * we have to give it the kernel address, but the crc uses the length\n- * associated with this address (root_length), which is added to the kernel\n- * length (kernel_length) to determine the length of image to flash and thus\n- * needs to be rootfs + deadcode (jffs2 EOF marker)\n-*/\n-\n-struct bcm_tag {\n-\t/* 0-3: Version of the image tag */\n-\tchar tag_version[TAGVER_LEN];\n-\t/* 4-23: Company Line 1 */\n-\tchar sig_1[SIG1_LEN];\n-\t/* 24-37: Company Line 2 */\n-\tchar sig_2[SIG2_LEN];\n-\t/* 38-43: Chip this image is for */\n-\tchar chip_id[CHIPID_LEN];\n-\t/* 44-59: Board name */\n-\tchar board_id[BOARDID_LEN];\n-\t/* 60-61: Map endianness -- 1 BE 0 LE */\n-\tchar big_endian[ENDIANFLAG_LEN];\n-\t/* 62-71: Total length of image */\n-\tchar total_length[IMAGE_LEN];\n-\t/* 72-83: Address in memory of CFE */\n-\tchar cfe__address[ADDRESS_LEN];\n-\t/* 84-93: Size of CFE */\n-\tchar cfe_length[IMAGE_LEN];\n-\t/* 94-105: Address in memory of image start\n-\t * (kernel for OpenWRT, rootfs for stock firmware)\n-\t */\n-\tchar flash_image_start[ADDRESS_LEN];\n-\t/* 106-115: Size of rootfs */\n-\tchar root_length[IMAGE_LEN];\n-\t/* 116-127: Address in memory of kernel */\n-\tchar kernel_address[ADDRESS_LEN];\n-\t/* 128-137: Size of kernel */\n-\tchar kernel_length[IMAGE_LEN];\n-\t/* 138-139: Unused at the moment */\n-\tchar dual_image[DUALFLAG_LEN];\n-\t/* 140-141: Unused at the moment */\n-\tchar inactive_flag[INACTIVEFLAG_LEN];\n-\t/* 142-161: RSA Signature (not used; some vendors may use this) */\n-\tchar rsa_signature[RSASIG_LEN];\n-\t/* 162-191: Compilation and related information (not used in OpenWrt) */\n-\tchar information1[TAGINFO1_LEN];\n-\t/* 192-195: Version flash layout */\n-\tchar flash_layout_ver[FLASHLAYOUTVER_LEN];\n-\t/* 196-199: kernel+rootfs CRC32 */\n-\t__u32 fskernel_crc;\n-\t/* 200-215: Unused except on Alice Gate where is is information */\n-\tchar information2[TAGINFO2_LEN];\n-\t/* 216-219: CRC32 of image less imagetag (kernel for Alice Gate) */\n-\t__u32 image_crc;\n-\t/* 220-223: CRC32 of rootfs partition */\n-\t__u32 rootfs_crc;\n-\t/* 224-227: CRC32 of kernel partition */\n-\t__u32 kernel_crc;\n-\t/* 228-235: Unused at present */\n-\tchar reserved1[8];\n-\t/* 236-239: CRC32 of header excluding last 20 bytes */\n-\t__u32 header_crc;\n-\t/* 240-255: Unused at present */\n-\tchar reserved2[16];\n-};\n-\n-#endif /* __BCM63XX_TAG_H */\ndiff --git a/drivers/mtd/bcm63xxpart.c b/drivers/mtd/bcm63xxpart.c\nindex 4409369..b5bad1f 100644\n--- a/drivers/mtd/bcm63xxpart.c\n+++ b/drivers/mtd/bcm63xxpart.c\n@@ -24,6 +24,7 @@\n \n #define pr_fmt(fmt) KBUILD_MODNAME \": \" fmt\n \n+#include <linux/bcm963xx_tag.h>\n #include <linux/crc32.h>\n #include <linux/module.h>\n #include <linux/kernel.h>\n@@ -34,7 +35,6 @@\n #include <linux/mtd/partitions.h>\n \n #include <asm/mach-bcm63xx/bcm63xx_nvram.h>\n-#include <asm/mach-bcm63xx/bcm963xx_tag.h>\n #include <asm/mach-bcm63xx/board_bcm963xx.h>\n \n #define BCM63XX_EXTENDED_SIZE\t0xBFC00000\t/* Extended flash address */\ndiff --git a/include/linux/bcm963xx_tag.h b/include/linux/bcm963xx_tag.h\nnew file mode 100644\nindex 0000000..f389dac\n--- /dev/null\n+++ b/include/linux/bcm963xx_tag.h\n@@ -0,0 +1,98 @@\n+#ifndef __LINUX_BCM963XX_TAG_H__\n+#define __LINUX_BCM963XX_TAG_H__\n+\n+#include <linux/types.h>\n+\n+#define TAGVER_LEN\t\t4\t/* Length of Tag Version */\n+#define TAGLAYOUT_LEN\t\t4\t/* Length of FlashLayoutVer */\n+#define SIG1_LEN\t\t20\t/* Company Signature 1 Length */\n+#define SIG2_LEN\t\t14\t/* Company Signature 2 Length */\n+#define BOARDID_LEN\t\t16\t/* Length of BoardId */\n+#define ENDIANFLAG_LEN\t\t2\t/* Endian Flag Length */\n+#define CHIPID_LEN\t\t6\t/* Chip Id Length */\n+#define IMAGE_LEN\t\t10\t/* Length of Length Field */\n+#define ADDRESS_LEN\t\t12\t/* Length of Address field */\n+#define DUALFLAG_LEN\t\t2\t/* Dual Image flag Length */\n+#define INACTIVEFLAG_LEN\t2\t/* Inactie Flag Length */\n+#define RSASIG_LEN\t\t20\t/* Length of RSA Signature in tag */\n+#define TAGINFO1_LEN\t\t30\t/* Length of vendor information field1 in tag */\n+#define FLASHLAYOUTVER_LEN\t4\t/* Length of Flash Layout Version String tag */\n+#define TAGINFO2_LEN\t\t16\t/* Length of vendor information field2 in tag */\n+#define ALTTAGINFO_LEN\t\t54\t/* Alternate length for vendor information; Pirelli */\n+\n+#define NUM_PIRELLI\t\t2\n+#define IMAGETAG_CRC_START\t0xFFFFFFFF\n+\n+#define PIRELLI_BOARDS { \\\n+\t\"AGPF-S0\", \\\n+\t\"DWV-S0\", \\\n+}\n+\n+/*\n+ * The broadcom firmware assumes the rootfs starts the image,\n+ * therefore uses the rootfs start (flash_image_address)\n+ * to determine where to flash the image. Since we have the kernel first\n+ * we have to give it the kernel address, but the crc uses the length\n+ * associated with this address (root_length), which is added to the kernel\n+ * length (kernel_length) to determine the length of image to flash and thus\n+ * needs to be rootfs + deadcode (jffs2 EOF marker)\n+*/\n+\n+struct bcm_tag {\n+\t/* 0-3: Version of the image tag */\n+\tchar tag_version[TAGVER_LEN];\n+\t/* 4-23: Company Line 1 */\n+\tchar sig_1[SIG1_LEN];\n+\t/* 24-37: Company Line 2 */\n+\tchar sig_2[SIG2_LEN];\n+\t/* 38-43: Chip this image is for */\n+\tchar chip_id[CHIPID_LEN];\n+\t/* 44-59: Board name */\n+\tchar board_id[BOARDID_LEN];\n+\t/* 60-61: Map endianness -- 1 BE 0 LE */\n+\tchar big_endian[ENDIANFLAG_LEN];\n+\t/* 62-71: Total length of image */\n+\tchar total_length[IMAGE_LEN];\n+\t/* 72-83: Address in memory of CFE */\n+\tchar cfe__address[ADDRESS_LEN];\n+\t/* 84-93: Size of CFE */\n+\tchar cfe_length[IMAGE_LEN];\n+\t/* 94-105: Address in memory of image start\n+\t * (kernel for OpenWRT, rootfs for stock firmware)\n+\t */\n+\tchar flash_image_start[ADDRESS_LEN];\n+\t/* 106-115: Size of rootfs */\n+\tchar root_length[IMAGE_LEN];\n+\t/* 116-127: Address in memory of kernel */\n+\tchar kernel_address[ADDRESS_LEN];\n+\t/* 128-137: Size of kernel */\n+\tchar kernel_length[IMAGE_LEN];\n+\t/* 138-139: Unused at the moment */\n+\tchar dual_image[DUALFLAG_LEN];\n+\t/* 140-141: Unused at the moment */\n+\tchar inactive_flag[INACTIVEFLAG_LEN];\n+\t/* 142-161: RSA Signature (not used; some vendors may use this) */\n+\tchar rsa_signature[RSASIG_LEN];\n+\t/* 162-191: Compilation and related information (not used in OpenWrt) */\n+\tchar information1[TAGINFO1_LEN];\n+\t/* 192-195: Version flash layout */\n+\tchar flash_layout_ver[FLASHLAYOUTVER_LEN];\n+\t/* 196-199: kernel+rootfs CRC32 */\n+\t__u32 fskernel_crc;\n+\t/* 200-215: Unused except on Alice Gate where is is information */\n+\tchar information2[TAGINFO2_LEN];\n+\t/* 216-219: CRC32 of image less imagetag (kernel for Alice Gate) */\n+\t__u32 image_crc;\n+\t/* 220-223: CRC32 of rootfs partition */\n+\t__u32 rootfs_crc;\n+\t/* 224-227: CRC32 of kernel partition */\n+\t__u32 kernel_crc;\n+\t/* 228-235: Unused at present */\n+\tchar reserved1[8];\n+\t/* 236-239: CRC32 of header excluding last 20 bytes */\n+\t__u32 header_crc;\n+\t/* 240-255: Unused at present */\n+\tchar reserved2[16];\n+};\n+\n+#endif /* __LINUX_BCM63XX_TAG_H__ */\n", "prefixes": [ "linux-next", "v4", "03/11" ] }