Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/902013/?format=api
{ "id": 902013, "url": "http://patchwork.ozlabs.org/api/patches/902013/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20180420155314.8920-6-stefan@agner.ch/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20180420155314.8920-6-stefan@agner.ch>", "list_archive_url": null, "date": "2018-04-20T15:53:10", "name": "[U-Boot,v1,5/9] mtd: nand: mxs_nand: create separate header file", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "200636673336e56d718d93793fdef7a4265a8788", "submitter": { "id": 4137, "url": "http://patchwork.ozlabs.org/api/people/4137/?format=api", "name": "Stefan Agner", "email": "stefan@agner.ch" }, "delegate": { "id": 1693, "url": "http://patchwork.ozlabs.org/api/users/1693/?format=api", "username": "sbabic", "first_name": "Stefano", "last_name": "Babic", "email": "sbabic@denx.de" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20180420155314.8920-6-stefan@agner.ch/mbox/", "series": [ { "id": 40110, "url": "http://patchwork.ozlabs.org/api/series/40110/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=40110", "date": "2018-04-20T15:53:05", "name": "mtd: nand: mxs_nand: add device tree support", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/40110/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/902013/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/902013/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdmarc=none (p=none dis=none) header.from=agner.ch", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tsecure) header.d=agner.ch header.i=@agner.ch header.b=\"HVu6Ueft\";\n\tdkim-atps=neutral" ], "Received": [ "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 40SLC24WyVz9s1p\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 21 Apr 2018 01:59:26 +1000 (AEST)", "by lists.denx.de (Postfix, from userid 105)\n\tid 3F920C21DB5; Fri, 20 Apr 2018 15:56:20 +0000 (UTC)", "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 02EDAC21DE8;\n\tFri, 20 Apr 2018 15:54:40 +0000 (UTC)", "by lists.denx.de (Postfix, from userid 105)\n\tid 3B0DFC21DE8; Fri, 20 Apr 2018 15:54:28 +0000 (UTC)", "from mail.kmu-office.ch (mail.kmu-office.ch [178.209.48.109])\n\tby lists.denx.de (Postfix) with ESMTPS id 4B3C9C21C27\n\tfor <u-boot@lists.denx.de>; Fri, 20 Apr 2018 15:54:25 +0000 (UTC)", "from trochilidae.toradex.int (unknown [IPv6:2001:1620:c6e:10::3])\n\tby mail.kmu-office.ch (Postfix) with ESMTPSA id BC52F5C175C;\n\tFri, 20 Apr 2018 17:54:24 +0200 (CEST)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED,\n\tSPF_HELO_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no\n\tversion=3.4.0", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim;\n\tt=1524239665;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:content-type:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=lbS6LEJGFMvgqvBUUq8jy5WlV9RtReH3xCtRaCuK9GU=;\n\tb=HVu6UeftdrqyYyCOVEPvq/s44F9oKYO2ZuNVN7WrdzH5qbtDhYmMbNlN45XXZGnrt9pfu9\n\t0IdFJWDVtyTGVkgqNMdFpTnkAxChks4qKZATJs4UjXnuFZrjnrtFElUOS10Vh+mwraFhiY\n\tFdkittyDHX/hOiWnrqRjhIXHE999q6E=", "From": "Stefan Agner <stefan@agner.ch>", "To": "u-boot@lists.denx.de, Stefano Babic <sbabic@denx.de>, oss@buserror.net", "Date": "Fri, 20 Apr 2018 17:53:10 +0200", "Message-Id": "<20180420155314.8920-6-stefan@agner.ch>", "X-Mailer": "git-send-email 2.17.0", "In-Reply-To": "<20180420155314.8920-1-stefan@agner.ch>", "References": "<20180420155314.8920-1-stefan@agner.ch>", "X-Spamd-Result": "default: False [-2.10 / 15.00]; RCVD_TLS_ALL(0.00)[];\n\tASN(0.00)[asn:13030, ipnet:2001:1620::/32, country:CH];\n\tRCVD_COUNT_ZERO(0.00)[0]; FROM_HAS_DN(0.00)[];\n\tMID_CONTAINS_FROM(1.00)[]; TO_DN_SOME(0.00)[];\n\tMIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[];\n\tTO_MATCH_ENVRCPT_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%];\n\tARC_NA(0.00)[]; DKIM_SIGNED(0.00)[]; RCPT_COUNT_SEVEN(0.00)[10]", "Cc": "marex@denx.de, Stefan Agner <stefan.agner@toradex.com>,\n\tMarcel Ziswiler <marcel.ziswiler@toradex.com>,\n\tMax Krummenacher <max.krummenacher@toradex.com>, han.xu@nxp.com", "Subject": "[U-Boot] [PATCH v1 5/9] mtd: nand: mxs_nand: create separate header\n\tfile", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.18", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<http://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>" }, "content": "From: Stefan Agner <stefan.agner@toradex.com>\n\nCreate separate header file so we can use a separate compile\nunit for device tree support.\n\nSigned-off-by: Stefan Agner <stefan.agner@toradex.com>\n---\n\n drivers/mtd/nand/mxs_nand.c | 61 ++-----------------------------\n drivers/mtd/nand/mxs_nand.h | 72 +++++++++++++++++++++++++++++++++++++\n 2 files changed, 75 insertions(+), 58 deletions(-)\n create mode 100644 drivers/mtd/nand/mxs_nand.h", "diff": "diff --git a/drivers/mtd/nand/mxs_nand.c b/drivers/mtd/nand/mxs_nand.c\nindex 978f6a6893..5fbbb0a706 100644\n--- a/drivers/mtd/nand/mxs_nand.c\n+++ b/drivers/mtd/nand/mxs_nand.c\n@@ -14,11 +14,10 @@\n */\n \n #include <common.h>\n-#include <linux/mtd/mtd.h>\n+#include <dm.h>\n #include <linux/mtd/rawnand.h>\n #include <linux/types.h>\n #include <malloc.h>\n-#include <nand.h>\n #include <linux/errno.h>\n #include <asm/io.h>\n #include <asm/arch/clock.h>\n@@ -26,7 +25,8 @@\n #include <asm/mach-imx/regs-bch.h>\n #include <asm/mach-imx/regs-gpmi.h>\n #include <asm/arch/sys_proto.h>\n-#include <asm/mach-imx/dma.h>\n+\n+#include \"mxs_nand.h\"\n \n #define\tMXS_NAND_DMA_DESCRIPTOR_COUNT\t\t4\n \n@@ -46,61 +46,6 @@\n \n #define\tMXS_NAND_BCH_TIMEOUT\t\t\t10000\n \n-/**\n- * @gf_len: The length of Galois Field. (e.g., 13 or 14)\n- * @ecc_strength: A number that describes the strength of the ECC\n- * algorithm.\n- * @ecc_chunk_size: The size, in bytes, of a single ECC chunk. Note\n- * the first chunk in the page includes both data and\n- * metadata, so it's a bit larger than this value.\n- * @ecc_chunk_count: The number of ECC chunks in the page,\n- * @block_mark_byte_offset: The byte offset in the ECC-based page view at\n- * which the underlying physical block mark appears.\n- * @block_mark_bit_offset: The bit offset into the ECC-based page view at\n- * which the underlying physical block mark appears.\n- */\n-struct bch_geometry {\n-\tunsigned int gf_len;\n-\tunsigned int ecc_strength;\n-\tunsigned int ecc_chunk_size;\n-\tunsigned int ecc_chunk_count;\n-\tunsigned int block_mark_byte_offset;\n-\tunsigned int block_mark_bit_offset;\n-};\n-\n-struct mxs_nand_info {\n-\tstruct nand_chip chip;\n-\tunsigned int\tmax_ecc_strength_supported;\n-\tbool\t\tuse_minimum_ecc;\n-\tint\t\tcur_chip;\n-\n-\tuint32_t\tcmd_queue_len;\n-\tuint32_t\tdata_buf_size;\n-\tstruct bch_geometry bch_geometry;\n-\n-\tuint8_t\t\t*cmd_buf;\n-\tuint8_t\t\t*data_buf;\n-\tuint8_t\t\t*oob_buf;\n-\n-\tuint8_t\t\tmarking_block_bad;\n-\tuint8_t\t\traw_oob_mode;\n-\n-\tstruct mxs_gpmi_regs *gpmi_regs;\n-\tstruct mxs_bch_regs *bch_regs;\n-\n-\t/* Functions with altered behaviour */\n-\tint\t\t(*hooked_read_oob)(struct mtd_info *mtd,\n-\t\t\t\tloff_t from, struct mtd_oob_ops *ops);\n-\tint\t\t(*hooked_write_oob)(struct mtd_info *mtd,\n-\t\t\t\tloff_t to, struct mtd_oob_ops *ops);\n-\tint\t\t(*hooked_block_markbad)(struct mtd_info *mtd,\n-\t\t\t\tloff_t ofs);\n-\n-\t/* DMA descriptors */\n-\tstruct mxs_dma_desc\t**desc;\n-\tuint32_t\t\tdesc_index;\n-};\n-\n struct nand_ecclayout fake_ecc_layout;\n \n /*\ndiff --git a/drivers/mtd/nand/mxs_nand.h b/drivers/mtd/nand/mxs_nand.h\nnew file mode 100644\nindex 0000000000..ae3432357e\n--- /dev/null\n+++ b/drivers/mtd/nand/mxs_nand.h\n@@ -0,0 +1,72 @@\n+/*\n+ * NXP GPMI NAND flash driver\n+ *\n+ * Copyright (C) 2018 Toradex\n+ * Authors:\n+ * Stefan Agner <stefan.agner@toradex.com>\n+ *\n+ * SPDX-License-Identifier:\tGPL-2.0+\n+ */\n+\n+#include <linux/mtd/mtd.h>\n+#include <asm/cache.h>\n+#include <nand.h>\n+#include <asm/mach-imx/dma.h>\n+\n+/**\n+ * @gf_len: The length of Galois Field. (e.g., 13 or 14)\n+ * @ecc_strength: A number that describes the strength of the ECC\n+ * algorithm.\n+ * @ecc_chunk_size: The size, in bytes, of a single ECC chunk. Note\n+ * the first chunk in the page includes both data and\n+ * metadata, so it's a bit larger than this value.\n+ * @ecc_chunk_count: The number of ECC chunks in the page,\n+ * @block_mark_byte_offset: The byte offset in the ECC-based page view at\n+ * which the underlying physical block mark appears.\n+ * @block_mark_bit_offset: The bit offset into the ECC-based page view at\n+ * which the underlying physical block mark appears.\n+ */\n+struct bch_geometry {\n+\tunsigned int gf_len;\n+\tunsigned int ecc_strength;\n+\tunsigned int ecc_chunk_size;\n+\tunsigned int ecc_chunk_count;\n+\tunsigned int block_mark_byte_offset;\n+\tunsigned int block_mark_bit_offset;\n+};\n+\n+struct mxs_nand_info {\n+\tstruct nand_chip chip;\n+\tstruct udevice *dev;\n+\tunsigned int\tmax_ecc_strength_supported;\n+\tbool\t\tuse_minimum_ecc;\n+\tint\t\tcur_chip;\n+\n+\tuint32_t\tcmd_queue_len;\n+\tuint32_t\tdata_buf_size;\n+\tstruct bch_geometry bch_geometry;\n+\n+\tuint8_t\t\t*cmd_buf;\n+\tuint8_t\t\t*data_buf;\n+\tuint8_t\t\t*oob_buf;\n+\n+\tuint8_t\t\tmarking_block_bad;\n+\tuint8_t\t\traw_oob_mode;\n+\n+\tstruct mxs_gpmi_regs *gpmi_regs;\n+\tstruct mxs_bch_regs *bch_regs;\n+\n+\t/* Functions with altered behaviour */\n+\tint\t\t(*hooked_read_oob)(struct mtd_info *mtd,\n+\t\t\t\tloff_t from, struct mtd_oob_ops *ops);\n+\tint\t\t(*hooked_write_oob)(struct mtd_info *mtd,\n+\t\t\t\tloff_t to, struct mtd_oob_ops *ops);\n+\tint\t\t(*hooked_block_markbad)(struct mtd_info *mtd,\n+\t\t\t\tloff_t ofs);\n+\n+\t/* DMA descriptors */\n+\tstruct mxs_dma_desc\t**desc;\n+\tuint32_t\t\tdesc_index;\n+};\n+\n+int mxs_nand_init(struct mxs_nand_info *nand_info);\n", "prefixes": [ "U-Boot", "v1", "5/9" ] }