get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1662595,
    "url": "http://patchwork.ozlabs.org/api/patches/1662595/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20220801133146.11481-4-pali@kernel.org/",
    "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": "<20220801133146.11481-4-pali@kernel.org>",
    "list_archive_url": null,
    "date": "2022-08-01T13:31:46",
    "name": "[v2,4/4] board: freescale: p1_p2_rdb_pc: Turn off watchdog before reset",
    "commit_ref": "44366be10a9386a8887124a77a7d06169c3aa1f3",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "42ff2331bc20d94b2da257b803a637e7a741915b",
    "submitter": {
        "id": 78810,
        "url": "http://patchwork.ozlabs.org/api/people/78810/?format=api",
        "name": "Pali Rohár",
        "email": "pali@kernel.org"
    },
    "delegate": {
        "id": 111897,
        "url": "http://patchwork.ozlabs.org/api/users/111897/?format=api",
        "username": "kabel",
        "first_name": "Marek",
        "last_name": "Behun",
        "email": "marek.behun@nic.cz"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20220801133146.11481-4-pali@kernel.org/mbox/",
    "series": [
        {
            "id": 312107,
            "url": "http://patchwork.ozlabs.org/api/series/312107/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=312107",
            "date": "2022-08-01T13:31:44",
            "name": "[v2,1/4] board: freescale: p1_p2_rdb_pc: Add workaround for board reset reboot loop",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/312107/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1662595/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1662595/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": [
            "bilbo.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=c0zd3q+C;\n\tdkim-atps=neutral",
            "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>)",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=kernel.org",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.b=\"c0zd3q+C\";\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=kernel.org",
            "phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org"
        ],
        "Received": [
            "from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (2048 bits))\n\t(No client certificate requested)\n\tby bilbo.ozlabs.org (Postfix) with ESMTPS id 4LxJvW1xLNz9sCD\n\tfor <incoming@patchwork.ozlabs.org>; Mon,  1 Aug 2022 23:32:23 +1000 (AEST)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 541BE844B6;\n\tMon,  1 Aug 2022 15:32:09 +0200 (CEST)",
            "by phobos.denx.de (Postfix, from userid 109)\n id 5B39E83E4C; Mon,  1 Aug 2022 15:32:07 +0200 (CEST)",
            "from dfw.source.kernel.org (dfw.source.kernel.org\n [IPv6:2604:1380:4641:c500::1])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 2ACD78415B\n for <u-boot@lists.denx.de>; Mon,  1 Aug 2022 15:32:05 +0200 (CEST)",
            "from smtp.kernel.org (relay.kernel.org [52.25.139.140])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n (No client certificate requested)\n by dfw.source.kernel.org (Postfix) with ESMTPS id C10BE612DA;\n Mon,  1 Aug 2022 13:32:03 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id 0B491C4347C;\n Mon,  1 Aug 2022 13:32:03 +0000 (UTC)",
            "by pali.im (Postfix)\n id A5250E5D; Mon,  1 Aug 2022 15:32:00 +0200 (CEST)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,\n DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,\n SPF_PASS autolearn=ham autolearn_force=no version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n s=k20201202; t=1659360723;\n bh=P+v4OgWs7lkpRr+fJFQ7ThQ46OqA6/ZlDIiZigq7QTw=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=c0zd3q+Ce3n+Ea7y2tiboT1cG2FM3gvlrPafvjE5C4Pcz+u8tIDBoMG7v6kS2Nd0o\n ecH2h1a/0H91kIqYrG3TkG1pkr9jZbdUUFI3u2UVt0JK3gBheA2kswa6jspc2ngRFZ\n 8LJBcDYelC0V0OjQWFyBKWjDIH+OR/E71PdLgrt63qprOrYhYheYRm2RjNhCXYEu8K\n 9juaUES82Dmko2jbIjLsVIUcEUDwOL8TTHVWiMgZg0ARKQB1xV7vB796IThddA5WyL\n h5P9i27NysiaKnDt0AQuoG6XzWTznyzXL3u4FL/plOwBjD3g1JACjC5fEqBabFuhMU\n LlYOK5xHxEq7Q==",
        "From": "=?utf-8?q?Pali_Roh=C3=A1r?= <pali@kernel.org>",
        "To": "\"Peng Fan (OSS)\" <peng.fan@oss.nxp.com>",
        "Cc": "Tom Rini <trini@konsulko.com>,\n\tu-boot@lists.denx.de",
        "Subject": "[PATCH v2 4/4] board: freescale: p1_p2_rdb_pc: Turn off watchdog\n before reset",
        "Date": "Mon,  1 Aug 2022 15:31:46 +0200",
        "Message-Id": "<20220801133146.11481-4-pali@kernel.org>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20220801133146.11481-1-pali@kernel.org>",
        "References": "<20220501122314.32626-1-pali@kernel.org>\n <20220801133146.11481-1-pali@kernel.org>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.39",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>",
        "List-Archive": "<https://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 <mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>",
        "X-Virus-Scanned": "clamav-milter 0.103.6 at phobos.denx.de",
        "X-Virus-Status": "Clean"
    },
    "content": "P1/P2 RDB boards have external max6370 watchdog connected to CPLD and this\nwatchdog is not deactivated on board reset. So if it is active during board\nreset, it can trigger another reset when CPU is booting U-Boot. To prevent\npossible infinite reset loop caused by external watchdog, turn it off\nbefore reset.\n\nDo it via a new board_reset_prepare() callback which is called from\ndo_reset() function before any reset sequence.\n\nSigned-off-by: Pali Rohár <pali@kernel.org>\n---\n arch/powerpc/cpu/mpc85xx/cpu.c              |  4 ++++\n board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c | 12 ++++++++++++\n 2 files changed, 16 insertions(+)",
    "diff": "diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c\nindex c63c17286811..015bd3661c59 100644\n--- a/arch/powerpc/cpu/mpc85xx/cpu.c\n+++ b/arch/powerpc/cpu/mpc85xx/cpu.c\n@@ -43,6 +43,7 @@ __board_reset(void)\n {\n \t/* Do nothing */\n }\n+void board_reset_prepare(void) __attribute__((weak, alias(\"__board_reset\")));\n void board_reset(void) __attribute__((weak, alias(\"__board_reset\")));\n void board_reset_last(void) __attribute__((weak, alias(\"__board_reset\")));\n \n@@ -323,6 +324,9 @@ int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])\n #else\n \tvolatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);\n \n+\t/* Call board-specific preparation for reset */\n+\tboard_reset_prepare();\n+\n \t/* Attempt board-specific reset */\n \tboard_reset();\n \ndiff --git a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c\nindex 4bcb05bed9b8..42409a864854 100644\n--- a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c\n+++ b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c\n@@ -83,6 +83,18 @@ struct cpld_data {\n #define CPLD_FXS_LED\t0x0F\n #define CPLD_SYS_RST\t0x00\n \n+void board_reset_prepare(void)\n+{\n+\t/*\n+\t * During reset preparation, turn off external watchdog.\n+\t * This ensures that external watchdog does not trigger\n+\t * another reset or possible infinite reset loop.\n+\t */\n+\tstruct cpld_data *cpld_data = (void *)(CONFIG_SYS_CPLD_BASE);\n+\tout_8(&cpld_data->wd_cfg, CPLD_WD_CFG);\n+\tin_8(&cpld_data->wd_cfg); /* Read back to sync write */\n+}\n+\n void board_reset_last(void)\n {\n \tstruct cpld_data *cpld_data = (void *)(CONFIG_SYS_CPLD_BASE);\n",
    "prefixes": [
        "v2",
        "4/4"
    ]
}