get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 810395,
    "url": "http://patchwork.ozlabs.org/api/patches/810395/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20170906052343.17989-6-wenyou.yang@microchip.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": "<20170906052343.17989-6-wenyou.yang@microchip.com>",
    "list_archive_url": null,
    "date": "2017-09-06T05:23:36",
    "name": "[U-Boot,v4,05/12] atmel: common: Add function to display via DM_VIDEO's API",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "d9c16fc9c15d08fd83a37275923c09e9825da75e",
    "submitter": {
        "id": 69532,
        "url": "http://patchwork.ozlabs.org/api/people/69532/?format=api",
        "name": "Wenyou Yang",
        "email": "Wenyou.Yang@microchip.com"
    },
    "delegate": {
        "id": 3651,
        "url": "http://patchwork.ozlabs.org/api/users/3651/?format=api",
        "username": "trini",
        "first_name": "Tom",
        "last_name": "Rini",
        "email": "trini@ti.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20170906052343.17989-6-wenyou.yang@microchip.com/mbox/",
    "series": [
        {
            "id": 1695,
            "url": "http://patchwork.ozlabs.org/api/series/1695/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=1695",
            "date": "2017-09-06T05:23:31",
            "name": "board: atmel: Add new board SAMA5D27-SOM1-EK board.",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/1695/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/810395/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/810395/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>)",
        "Received": [
            "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xnBvq32Bvz9s7C\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed,  6 Sep 2017 15:28:55 +1000 (AEST)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid 368ADC21F29; Wed,  6 Sep 2017 05:25:56 +0000 (UTC)",
            "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id ABDD6C21E64;\n\tWed,  6 Sep 2017 05:25:53 +0000 (UTC)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid 9152BC21DAE; Wed,  6 Sep 2017 05:25:27 +0000 (UTC)",
            "from DVREDG01.corp.atmel.com (nasmtp01.atmel.com [192.199.1.245])\n\tby lists.denx.de (Postfix) with ESMTPS id 7FDD2C21E01\n\tfor <u-boot@lists.denx.de>; Wed,  6 Sep 2017 05:25:23 +0000 (UTC)",
            "from apsmtp01.atmel.com (10.168.254.31) by DVREDG01.corp.atmel.com\n\t(10.42.103.30) with Microsoft SMTP Server (TLS) id 14.3.235.1;\n\tTue, 5 Sep 2017 23:24:40 -0600",
            "from shaarm01.corp.atmel.com (10.168.254.13) by apsmtp01.atmel.com\n\t(10.168.254.31) with Microsoft SMTP Server id 14.3.235.1;\n\tWed, 6 Sep 2017 13:28:58 +0800"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED\n\tautolearn=unavailable autolearn_force=no version=3.4.0",
        "From": "Wenyou Yang <wenyou.yang@microchip.com>",
        "To": "U-Boot Mailing List <u-boot@lists.denx.de>",
        "Date": "Wed, 6 Sep 2017 13:23:36 +0800",
        "Message-ID": "<20170906052343.17989-6-wenyou.yang@microchip.com>",
        "X-Mailer": "git-send-email 2.13.0",
        "In-Reply-To": "<20170906052343.17989-1-wenyou.yang@microchip.com>",
        "References": "<20170906052343.17989-1-wenyou.yang@microchip.com>",
        "MIME-Version": "1.0",
        "Cc": "Marek Vasut <marex@denx.de>, Tom Rini <trini@konsulko.com>",
        "Subject": "[U-Boot] [PATCH v4 05/12] atmel: common: Add function to display\n\tvia DM_VIDEO's API",
        "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>",
        "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": "Add a function to display the company's logo and board information\nvia the API from DM_VIDEO. This function can be shared by other\natmel boards, so locate it in board/atmel/common folder.\n\nSigned-off-by: Wenyou Yang <wenyou.yang@microchip.com>\n---\n\nChanges in v4: None\nChanges in v3: None\nChanges in v2: None\n\n arch/arm/mach-at91/include/mach/at91_common.h |  1 +\n board/atmel/common/Makefile                   |  1 +\n board/atmel/common/video_display.c            | 72 +++++++++++++++++++++++++++\n 3 files changed, 74 insertions(+)\n create mode 100644 board/atmel/common/video_display.c",
    "diff": "diff --git a/arch/arm/mach-at91/include/mach/at91_common.h b/arch/arm/mach-at91/include/mach/at91_common.h\nindex a95fe41610..5416eb455d 100644\n--- a/arch/arm/mach-at91/include/mach/at91_common.h\n+++ b/arch/arm/mach-at91/include/mach/at91_common.h\n@@ -37,5 +37,6 @@ void redirect_int_from_saic_to_aic(void);\n void configure_2nd_sram_as_l2_cache(void);\n \n int at91_set_ethaddr(int offset);\n+int at91_video_show_board_info(void);\n \n #endif /* AT91_COMMON_H */\ndiff --git a/board/atmel/common/Makefile b/board/atmel/common/Makefile\nindex 5a228bece8..f68dd74953 100644\n--- a/board/atmel/common/Makefile\n+++ b/board/atmel/common/Makefile\n@@ -7,3 +7,4 @@\n \n obj-y += board.o\n obj-$(CONFIG_I2C_EEPROM) += mac_eeprom.o\n+obj-$(CONFIG_DM_VIDEO) += video_display.o\ndiff --git a/board/atmel/common/video_display.c b/board/atmel/common/video_display.c\nnew file mode 100644\nindex 0000000000..39ad619819\n--- /dev/null\n+++ b/board/atmel/common/video_display.c\n@@ -0,0 +1,72 @@\n+/*\n+ * Copyright (C) 2017 Microchip\n+ *\t\t      Wenyou Yang <wenyou.yang@microchip.com>\n+ *\n+ * SPDX-License-Identifier:\tGPL-2.0+\n+ */\n+\n+#include <common.h>\n+#include <atmel_lcd.h>\n+#include <dm.h>\n+#include <nand.h>\n+#include <version.h>\n+#include <video.h>\n+#include <video_console.h>\n+#include <asm/io.h>\n+#include <asm/arch/clk.h>\n+\n+DECLARE_GLOBAL_DATA_PTR;\n+\n+int at91_video_show_board_info(void)\n+{\n+\tulong dram_size, nand_size;\n+\tint i;\n+\tu32 len = 0;\n+\tchar buf[255];\n+\tchar *corp = \"2017 Microchip Technology Inc.\\n\";\n+\tchar temp[32];\n+\tstruct udevice *dev, *con;\n+\tconst char *s;\n+\tvidinfo_t logo_info;\n+\tint ret;\n+\n+\tlen += sprintf(&buf[len], \"%s\\n\", U_BOOT_VERSION);\n+\tmemcpy(&buf[len], corp, strlen(corp));\n+\tlen += strlen(corp);\n+\tlen += sprintf(&buf[len], \"%s CPU at %s MHz\\n\", get_cpu_name(),\n+\t\t\tstrmhz(temp, get_cpu_clk_rate()));\n+\n+\tdram_size = 0;\n+\tfor (i = 0; i < CONFIG_NR_DRAM_BANKS; i++)\n+\t\tdram_size += gd->bd->bi_dram[i].size;\n+\n+\tnand_size = 0;\n+#ifdef CONFIG_NAND_ATMEL\n+\tfor (i = 0; i < CONFIG_SYS_MAX_NAND_DEVICE; i++)\n+\t\tnand_size += nand_info[i]->size;\n+#endif\n+\n+\tlen += sprintf(&buf[len], \"%ld MB SDRAM, %ld MB NAND\\n\",\n+\t\t       dram_size >> 20, nand_size >> 20);\n+\n+\tret = uclass_get_device(UCLASS_VIDEO, 0, &dev);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tmicrochip_logo_info(&logo_info);\n+\tret = video_bmp_display(dev, logo_info.logo_addr,\n+\t\t\t\tlogo_info.logo_x_offset,\n+\t\t\t\tlogo_info.logo_y_offset, false);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tret = uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tvidconsole_position_cursor(con, 0, logo_info.logo_height);\n+\tfor (s = buf, i = 0; i < len; s++, i++)\n+\t\tvidconsole_put_char(con, *s);\n+\n+\treturn 0;\n+}\n",
    "prefixes": [
        "U-Boot",
        "v4",
        "05/12"
    ]
}