get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/806767/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 806767,
    "url": "http://patchwork.ozlabs.org/api/patches/806767/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/patch/1503954854-30963-2-git-send-email-mw@semihalf.com/",
    "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": "<1503954854-30963-2-git-send-email-mw@semihalf.com>",
    "list_archive_url": null,
    "date": "2017-08-28T21:14:13",
    "name": "[1/2] mtd: spi-nor: add an option to force 3byte adressing mode",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": false,
    "hash": "4acfa45ba4ef418fb5ccf4f31f89d9af893a4f35",
    "submitter": {
        "id": 66998,
        "url": "http://patchwork.ozlabs.org/api/people/66998/?format=api",
        "name": "Marcin Wojtas",
        "email": "mw@semihalf.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-mtd/patch/1503954854-30963-2-git-send-email-mw@semihalf.com/mbox/",
    "series": [
        {
            "id": 259,
            "url": "http://patchwork.ozlabs.org/api/series/259/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/list/?series=259",
            "date": "2017-08-28T21:14:12",
            "name": "SPI NOR - force 3byte addressing mode",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/259/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/806767/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/806767/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",
        "Authentication-Results": [
            "ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"CFnIivZ3\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=semihalf-com.20150623.gappssmtp.com\n\theader.i=@semihalf-com.20150623.gappssmtp.com\n\theader.b=\"RLD2FL1U\"; dkim-atps=neutral"
        ],
        "Received": [
            "from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xh4GZ60cfz9t9B\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Aug 2017 07:12:14 +1000 (AEST)",
            "from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dmRK1-00068w-LI; Mon, 28 Aug 2017 21:11:49 +0000",
            "from mail-lf0-x22e.google.com ([2a00:1450:4010:c07::22e])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dmRJA-0005Fa-Qd\n\tfor linux-mtd@lists.infradead.org; Mon, 28 Aug 2017 21:10:59 +0000",
            "by mail-lf0-x22e.google.com with SMTP id k186so6611821lfe.2\n\tfor <linux-mtd@lists.infradead.org>;\n\tMon, 28 Aug 2017 14:10:36 -0700 (PDT)",
            "from enkidu.local (31-172-191-173.noc.fibertech.net.pl.\n\t[31.172.191.173]) by smtp.gmail.com with ESMTPSA id\n\tk29sm267032lje.6.2017.08.28.14.10.33\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 28 Aug 2017 14:10:34 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:\n\tList-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:\n\tIn-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:\n\tContent-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n\t:Resent-Message-ID:List-Owner;\n\tbh=gIUmtHhyikVmdLibTPMUiB/b64lpHwujEfMGt5JdhU8=;\n\tb=CFnIivZ3Ki7KdajTysW0fK7fB+\n\tqtoojqwsDGTf+EhyKZ2EhBHbOnKUyRYI0rbZ2ZLEO3k52fFBx8rnqQk3gFa+KnUn2M29olsFnRjHh\n\tGcBq1w1VuY4oOFxddOZaU3YYP2fpXUFR4Fo+8K3JZPStFne/hrDeYOXXTuf1MNh9EaL95HuF38bvk\n\tu/L2GR87Xh3+AY2WnkyOicAzKwwL+dBqoe/Yd22z88plK0uvd/ODWxZ4mKeW9Vz2dGYKEof5ahfdy\n\t6CAGWVnk/mzYaGsGAkIuwwhmPXjiIe6Jb+Bn6mYurDlBrt+0yfzW9ZD00FtnILwNoRrHoDx4RMZ9O\n\tI4hs9Zag==;",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=semihalf-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=zhWS0XdU1zqONUS2YMad+6tNGEUNcUgC1w2uuLqJQSU=;\n\tb=RLD2FL1UG5zrhE7uSv19h4/ciSSp97ItTdbQ+up7oV91PJ2YaSAMhYVH39ioxlkmAQ\n\txjTSr8B6cUVwZFxesGCW+tGT3ZZ2RHKlcnVUFCzx+YDi9jn3gtyk5v18x7ObFYP/VPsl\n\t39sMEcXGiTo7OdtSOMv4SzsIqbo1EqCYJ9RTfTN0OsPdhEAkt7X3nIjtvyHGuOdy9v0v\n\tjRxSqve7DZGoyifUKp1sqSiW3AkfB99I0newDIA76oSOvo5QEuSBa+GtczDC/BDtWdTH\n\toB5zPHtwfnzFuXl2SZLHGVd78xxP4JEkU6BM9r3ms2FFtcMubuJrEhubcmlPhydtOYSE\n\tjpTg=="
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=zhWS0XdU1zqONUS2YMad+6tNGEUNcUgC1w2uuLqJQSU=;\n\tb=W29XxXbg5h8XEiiq822VLhrnjc7d8W2op6pIA9S/sBjpyzHPfTN57HeH3XYKUmkS5s\n\tuNx30ep618CdHkRxvxMTAv+kyoMub8orw6DwfSeYnLhxnor2qMMsRrs+fcCyktUjX+6C\n\tAqlcW9WXHIkgIEVcCWDL1nxNERXg1AtZUL0U+yrb/n6XRBvICUqjKPsru6Cf7h46Yq9I\n\tEhjFgyoj1weEvEY4anjFJbcTDf+BPuLoXNnaWJSJKZ+RdHlipi0PjZfK+n1Fa3OuwNBP\n\tQGbtvA7I6NjJRbGdnww9d68oPliUMyqKOLyxl8ZLQ6k26Me9mfcIjFlSVya0iuf8pr95\n\tYKug==",
        "X-Gm-Message-State": "AHYfb5il3V/xYGKS+UI4x3cBDeR7zPHw0FdrKuOayFtfXWcgvIdmPG4Y\n\tJDOWEZ67VsDNdLH9",
        "X-Received": "by 10.25.178.70 with SMTP id b67mr579733lff.246.1503954634853;\n\tMon, 28 Aug 2017 14:10:34 -0700 (PDT)",
        "From": "Marcin Wojtas <mw@semihalf.com>",
        "To": "linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org,\n\tlinux-mtd@lists.infradead.org, linux-spi@vger.kernel.org",
        "Subject": "[PATCH 1/2] mtd: spi-nor: add an option to force 3byte adressing\n\tmode",
        "Date": "Mon, 28 Aug 2017 23:14:13 +0200",
        "Message-Id": "<1503954854-30963-2-git-send-email-mw@semihalf.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1503954854-30963-1-git-send-email-mw@semihalf.com>",
        "References": "<1503954854-30963-1-git-send-email-mw@semihalf.com>",
        "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ",
        "X-CRM114-CacheID": "sfid-20170828_141057_062536_15EF2D37 ",
        "X-CRM114-Status": "GOOD (  14.91  )",
        "X-Spam-Score": "-2.6 (--)",
        "X-Spam-Report": "SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.6 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2a00:1450:4010:c07:0:0:0:22e listed in] [list.dnswl.org]\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid",
        "X-BeenThere": "linux-mtd@lists.infradead.org",
        "X-Mailman-Version": "2.1.21",
        "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": "mark.rutland@arm.com, thomas.petazzoni@free-electrons.com,\n\tjaz@semihalf.com, \n\thannah@marvell.com, omrii@marvell.com, will.deacon@arm.com,\n\trobh+dt@kernel.org, \n\tnadavh@marvell.com, marek.vasut@gmail.com, broonie@kernel.org,\n\tneta@marvell.com, cyrille.pitchen@wedev4u.fr,\n\tgregory.clement@free-electrons.com, tn@semihalf.com, mw@semihalf.com",
        "MIME-Version": "1.0",
        "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": "Hitherto code set 4B addressing mode for all SPI flashes whose\nsize exceeds 16MB. However, changing the default 3B access\nin some cases may be harmful - it may happen that the Boot ROM\nis not capable of handling non-default state of the SPI NOR\n(e.g. after soft reset). Some flash devices allow to access the\nmemory above 128Mib without changing mode to 4byte thanks\nto special op codes (see SPI_NOR_4B_OPCODES flag). Unfortunately\nfor those which don't support them, the problem persists.\n\nThis patch adds optional property that can be added to the\nSPI flash node and which will force to use 3B addressing mode,\nlimiting the accessible memory size to 16MiB.\nBinding documentation is updated accordingly.\n\nSigned-off-by: Marcin Wojtas <mw@semihalf.com>\n---\n Documentation/devicetree/bindings/spi/spi-bus.txt |  2 ++\n drivers/mtd/spi-nor/spi-nor.c                     | 12 +++++++++++-\n 2 files changed, 13 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/Documentation/devicetree/bindings/spi/spi-bus.txt b/Documentation/devicetree/bindings/spi/spi-bus.txt\nindex 1f6e86f..f13b773 100644\n--- a/Documentation/devicetree/bindings/spi/spi-bus.txt\n+++ b/Documentation/devicetree/bindings/spi/spi-bus.txt\n@@ -77,6 +77,8 @@ All slave nodes can contain the following optional properties:\n \t\t    Defaults to 1 if not present.\n - spi-rx-delay-us - Microsecond delay after a read transfer.\n - spi-tx-delay-us - Microsecond delay after a write transfer.\n+- spi-3byte-addressing - Empty property indicating device access to be done\n+\t\t    only in 3byte addressing mode.\n \n Some SPI controllers and devices support Dual and Quad SPI transfer mode.\n It allows data in the SPI system to be transferred using 2 wires (DUAL) or 4\ndiff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c\nindex 1413828..029c87d 100644\n--- a/drivers/mtd/spi-nor/spi-nor.c\n+++ b/drivers/mtd/spi-nor/spi-nor.c\n@@ -2002,7 +2002,17 @@ int spi_nor_scan(struct spi_nor *nor, const char *name,\n \t\tif (JEDEC_MFR(info) == SNOR_MFR_SPANSION ||\n \t\t    info->flags & SPI_NOR_4B_OPCODES)\n \t\t\tspi_nor_set_4byte_opcodes(nor, info);\n-\t\telse\n+\t\telse if (of_property_read_bool(np, \"spi-3byte-addressing\")) {\n+\t\t\t/*\n+\t\t\t * Do not enter 4byte mode in order to prevent\n+\t\t\t * the early bootloader to come up on non-default\n+\t\t\t * SPI NOR memory during boot. Limit accessible\n+\t\t\t * size to 16MiB.\n+\t\t\t */\n+\t\t\tnor->addr_width = 3;\n+\t\t\tmtd->size = 0x1000000;\n+\t\t\tdev_info(dev, \"Force 3B addressing mode\\n\");\n+\t\t} else\n \t\t\tset_4byte(nor, info, 1);\n \t} else {\n \t\tnor->addr_width = 3;\n",
    "prefixes": [
        "1/2"
    ]
}