get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 208832,
    "url": "http://patchwork.ozlabs.org/api/patches/208832/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1356952428-19824-3-git-send-email-jagannadh.teki@gmail.com/",
    "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": "<1356952428-19824-3-git-send-email-jagannadh.teki@gmail.com>",
    "list_archive_url": null,
    "date": "2012-12-31T11:13:41",
    "name": "[U-Boot,02/12] cmd_sf: Add rd_inst argument to 'sf read' command",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "85235eb99d0529a726f29a750b79c376c30cdf37",
    "submitter": {
        "id": 20045,
        "url": "http://patchwork.ozlabs.org/api/people/20045/?format=api",
        "name": "Jagan Teki",
        "email": "jagannadh.teki@gmail.com"
    },
    "delegate": {
        "id": 17739,
        "url": "http://patchwork.ozlabs.org/api/users/17739/?format=api",
        "username": "jagan",
        "first_name": "Jagannadha Sutradharudu",
        "last_name": "Teki",
        "email": "jagannadh.teki@gmail.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/1356952428-19824-3-git-send-email-jagannadh.teki@gmail.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/208832/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/208832/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",
        "Received": [
            "from theia.denx.de (theia.denx.de [85.214.87.163])\n\tby ozlabs.org (Postfix) with ESMTP id 533B32C009A\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 31 Dec 2012 22:16:17 +1100 (EST)",
            "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id A13DC4A14C;\n\tMon, 31 Dec 2012 12:16:12 +0100 (CET)",
            "from theia.denx.de ([127.0.0.1])\n\tby localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id kn-RtToMq-HV; Mon, 31 Dec 2012 12:16:12 +0100 (CET)",
            "from theia.denx.de (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 67A194A14D;\n\tMon, 31 Dec 2012 12:15:35 +0100 (CET)",
            "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 365174A11F\n\tfor <u-boot@lists.denx.de>; Mon, 31 Dec 2012 12:14:56 +0100 (CET)",
            "from theia.denx.de ([127.0.0.1])\n\tby localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id VZfAaOywHiw0 for <u-boot@lists.denx.de>;\n\tMon, 31 Dec 2012 12:14:53 +0100 (CET)",
            "from mail-da0-f41.google.com (mail-da0-f41.google.com\n\t[209.85.210.41]) by theia.denx.de (Postfix) with ESMTPS id C8D6E4A126\n\tfor <u-boot@lists.denx.de>; Mon, 31 Dec 2012 12:14:15 +0100 (CET)",
            "by mail-da0-f41.google.com with SMTP id e20so5699805dak.14\n\tfor <u-boot@lists.denx.de>; Mon, 31 Dec 2012 03:14:14 -0800 (PST)",
            "from localhost.localdomain ([49.204.11.250])\n\tby mx.google.com with ESMTPS id\n\tnw9sm24715215pbb.42.2012.12.31.03.14.12\n\t(version=TLSv1/SSLv3 cipher=OTHER);\n\tMon, 31 Dec 2012 03:14:13 -0800 (PST)"
        ],
        "X-Virus-Scanned": [
            "Debian amavisd-new at theia.denx.de",
            "Debian amavisd-new at theia.denx.de"
        ],
        "X-policyd-weight": "NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5\n\tNOT_IN_BL_NJABL=-1.5 (only DNSBL check requested)",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\n\th=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to\n\t:references; bh=JhQBlFDA/1vnaFJ6kG/VcvwPkqDv8EUIE0JJWixJO9U=;\n\tb=gbMUoLFCvHhlvBgZ7y07PE1hhRxBKe52aW0ky1vhvHizVpGPYNnv7bgPpdFDfVuA3H\n\t+QZrJI/NzZhcY0mXnc87jrbas1Ma45cjPF0yM4dvk5v8sUX2QaERsVI7wsBG5mYUYDYd\n\trO5CadxzbUqV0E3FOktfzj5vcg0ju01nKBItnCxg90bkSlr/uGl5rwgrT7LPyoIncPNP\n\tSHbfJs1+vNQ9jKh2UzO3XzJlC2vHXehHLqe/lngWi1b23yPBNNG2afB8dEGMAh2jlszG\n\tcUEzjShEzbJeNjrampF/M9VSD4oH7UM7inow7UgC1MVjHbp1RDrf/LL7XhYTdbVPyaGj\n\trs8g==",
        "X-Received": "by 10.68.233.201 with SMTP id ty9mr128545841pbc.14.1356952453972;\n\tMon, 31 Dec 2012 03:14:13 -0800 (PST)",
        "From": "Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>",
        "To": "u-boot@lists.denx.de",
        "Date": "Mon, 31 Dec 2012 16:43:41 +0530",
        "Message-Id": "<1356952428-19824-3-git-send-email-jagannadh.teki@gmail.com>",
        "X-Mailer": "git-send-email 1.7.0.4",
        "In-Reply-To": "<1356952428-19824-1-git-send-email-jagannadh.teki@gmail.com>",
        "References": "<1356952428-19824-1-git-send-email-jagannadh.teki@gmail.com>",
        "Subject": "[U-Boot] [PATCH 02/12] cmd_sf: Add rd_inst argument to 'sf read'\n\tcommand",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.11",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<http://lists.denx.de/mailman/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": "<http://lists.denx.de/mailman/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "u-boot-bounces@lists.denx.de",
        "Errors-To": "u-boot-bounces@lists.denx.de"
    },
    "content": "This patch provides a support to add a read instruction(rd_inst)\nargument to 'sf read' command.\n\nUser will dynamically use the specific read instruction while\nreading the flash using 'sf read' command.\nCurrently added an existing read instruction called afr(Array Fast Read).\n\nExample:\nread 0x2000 length bytes starting at offset 0x0 to memory at 0x10000\nusing afr read instruction.\nu-boot> sf read afr 0x10000 0x0 0x2000\n\nSigned-off-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>\n---\n common/cmd_sf.c                      |   23 +++++++++++++++++------\n drivers/mtd/spi/spi_flash.c          |    4 ++--\n drivers/mtd/spi/spi_flash_internal.h |    2 +-\n include/spi_flash.h                  |   10 +++++-----\n include/spi_flash_inst.h             |    3 +++\n 5 files changed, 28 insertions(+), 14 deletions(-)",
    "diff": "diff --git a/common/cmd_sf.c b/common/cmd_sf.c\nindex e7843f3..88b18f8 100644\n--- a/common/cmd_sf.c\n+++ b/common/cmd_sf.c\n@@ -235,7 +235,7 @@ static int do_spi_flash_read_write(int argc, char * const argv[])\n \tunsigned long len;\n \tvoid *buf;\n \tchar *endp;\n-\tu8 wr_inst;\n+\tu8 wr_inst, rd_inst;\n \tint ret;\n \n \tif (argc < 5)\n@@ -266,9 +266,17 @@ static int do_spi_flash_read_write(int argc, char * const argv[])\n \n \tif (strcmp(argv[0], \"update\") == 0)\n \t\tret = spi_flash_update(flash, offset, len, buf);\n-\telse if (strcmp(argv[0], \"read\") == 0)\n-\t\tret = spi_flash_read(flash, offset, len, buf);\n-\telse {\n+\telse if (strcmp(argv[0], \"read\") == 0) {\n+\t\tif (strcmp(argv[1], \"afr\") == 0)\n+\t\t\trd_inst = CMD_READ_ARRAY_FAST;\n+\t\telse {\n+\t\t\tprintf(\"SF: Unknown %s rd_inst on 'sf read'\\n\",\n+\t\t\t\t\targv[1]);\n+\t\t\treturn 1;\n+\t\t}\n+\n+\t\tret = spi_flash_read(flash, rd_inst, offset, len, buf);\n+\t} else {\n \t\tif (strcmp(argv[1], \"pp\") == 0)\n \t\t\twr_inst = CMD_PAGE_PROGRAM;\n \t\telse {\n@@ -535,8 +543,11 @@ U_BOOT_CMD(\n \t\"SPI flash sub-system\",\n \t\"probe [[bus:]cs] [hz] [mode]\t- init flash device on given SPI bus\\n\"\n \t\"\t\t\t\t  and chip select\\n\"\n-\t\"sf read addr offset len \t- read `len' bytes starting at\\n\"\n-\t\"\t\t\t\t  `offset' to memory at `addr'\\n\"\n+\t\"sf read rd_inst addr offset len\\n\"\n+\t\"\t\t\t\t- read `len' bytes starting at\\n\"\n+\t\"\t\t\t\t  `offset' to memory at `addr' using\\n\"\n+\t\"\t\t\t\t  afr `rd_inst' read instruction\\n\"\n+\t\"\t\t\t\t  afr (Array Fast Read, 0bh)\\n\"\n \t\"sf write wr_inst addr offset len\\n\"\n \t\"\t\t\t\t- write `len' bytes from memory\\n\"\n \t\"\t\t\t\t  at `addr' to flash at `offset' using\\n\"\ndiff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c\nindex 8ba2c65..0c64ac2 100644\n--- a/drivers/mtd/spi/spi_flash.c\n+++ b/drivers/mtd/spi/spi_flash.c\n@@ -135,12 +135,12 @@ int spi_flash_read_common(struct spi_flash *flash, const u8 *cmd,\n \treturn ret;\n }\n \n-int spi_flash_cmd_read_fast(struct spi_flash *flash, u32 offset,\n+int spi_flash_cmd_read_fast(struct spi_flash *flash, u8 rd_inst, u32 offset,\n \t\tsize_t len, void *data)\n {\n \tu8 cmd[5];\n \n-\tcmd[0] = CMD_READ_ARRAY_FAST;\n+\tcmd[0] = rd_inst;\n \tspi_flash_addr(offset, cmd);\n \tcmd[4] = 0x00;\n \ndiff --git a/drivers/mtd/spi/spi_flash_internal.h b/drivers/mtd/spi/spi_flash_internal.h\nindex 0d416b3..dcf8813 100644\n--- a/drivers/mtd/spi/spi_flash_internal.h\n+++ b/drivers/mtd/spi/spi_flash_internal.h\n@@ -43,7 +43,7 @@ int spi_flash_cmd(struct spi_slave *spi, u8 cmd, void *response, size_t len);\n int spi_flash_cmd_read(struct spi_slave *spi, const u8 *cmd,\n \t\tsize_t cmd_len, void *data, size_t data_len);\n \n-int spi_flash_cmd_read_fast(struct spi_flash *flash, u32 offset,\n+int spi_flash_cmd_read_fast(struct spi_flash *flash, u8 rd_inst, u32 offset,\n \t\tsize_t len, void *data);\n \n /*\ndiff --git a/include/spi_flash.h b/include/spi_flash.h\nindex 9b3a6a1..6728796 100644\n--- a/include/spi_flash.h\n+++ b/include/spi_flash.h\n@@ -39,8 +39,8 @@ struct spi_flash {\n \t/* Erase (sector) size */\n \tu32\t\tsector_size;\n \n-\tint\t\t(*read)(struct spi_flash *flash, u32 offset,\n-\t\t\t\tsize_t len, void *buf);\n+\tint\t\t(*read)(struct spi_flash *flash, u8 rd_inst,\n+\t\t\t\tu32 offset, size_t len, void *buf);\n \tint\t\t(*write)(struct spi_flash *flash, u8 wr_inst,\n \t\t\t\tu32 offset, size_t len, const void *buf);\n \tint\t\t(*erase)(struct spi_flash *flash, u32 offset,\n@@ -51,10 +51,10 @@ struct spi_flash *spi_flash_probe(unsigned int bus, unsigned int cs,\n \t\tunsigned int max_hz, unsigned int spi_mode);\n void spi_flash_free(struct spi_flash *flash);\n \n-static inline int spi_flash_read(struct spi_flash *flash, u32 offset,\n-\t\tsize_t len, void *buf)\n+static inline int spi_flash_read(struct spi_flash *flash, u8 rd_inst,\n+\t\tu32 offset, size_t len, void *buf)\n {\n-\treturn flash->read(flash, offset, len, buf);\n+\treturn flash->read(flash, rd_inst, offset, len, buf);\n }\n \n static inline int spi_flash_write(struct spi_flash *flash, u8 wr_inst,\ndiff --git a/include/spi_flash_inst.h b/include/spi_flash_inst.h\nindex 139f45b..7c1b910 100644\n--- a/include/spi_flash_inst.h\n+++ b/include/spi_flash_inst.h\n@@ -27,4 +27,7 @@\n /* Write commands */\n #define CMD_PAGE_PROGRAM\t\t0x02\n \n+/* Read commands */\n+#define CMD_READ_ARRAY_FAST\t\t0x0b\n+\n #endif /* _SPI_FLASH_INST_H_ */\n",
    "prefixes": [
        "U-Boot",
        "02/12"
    ]
}