get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1624886,
    "url": "http://patchwork.ozlabs.org/api/patches/1624886/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20220501122314.32626-2-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": "<20220501122314.32626-2-pali@kernel.org>",
    "list_archive_url": null,
    "date": "2022-05-01T12:23:13",
    "name": "[2/3] board: freescale: p1_p2_rdb_pc: Add workaround for non-working watchdog",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "e152f59b8ca43632e8c06d6448bc3fc0642a7293",
    "submitter": {
        "id": 78810,
        "url": "http://patchwork.ozlabs.org/api/people/78810/?format=api",
        "name": "Pali Rohár",
        "email": "pali@kernel.org"
    },
    "delegate": {
        "id": 55230,
        "url": "http://patchwork.ozlabs.org/api/users/55230/?format=api",
        "username": "freenix",
        "first_name": "Peng",
        "last_name": "Fan",
        "email": "van.freenix@gmail.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20220501122314.32626-2-pali@kernel.org/mbox/",
    "series": [
        {
            "id": 297857,
            "url": "http://patchwork.ozlabs.org/api/series/297857/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=297857",
            "date": "2022-05-01T12:23:13",
            "name": "[1/3] board: freescale: p1_p2_rdb_pc: Add workaround for board reset reboot loop",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/297857/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1624886/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1624886/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=DtaMWVVI;\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=\"DtaMWVVI\";\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 4KrlmF198Tz9s5V\n\tfor <incoming@patchwork.ozlabs.org>; Sun,  1 May 2022 22:25:01 +1000 (AEST)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id D63D383C8C;\n\tSun,  1 May 2022 14:24:55 +0200 (CEST)",
            "by phobos.denx.de (Postfix, from userid 109)\n id AF2D783F0E; Sun,  1 May 2022 14:24:53 +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 DF8EC83BBF\n for <u-boot@lists.denx.de>; Sun,  1 May 2022 14:24:50 +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 906DA60DDC;\n Sun,  1 May 2022 12:24:49 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id D510FC385A9;\n Sun,  1 May 2022 12:24:48 +0000 (UTC)",
            "by pali.im (Postfix)\n id 4B78896D; Sun,  1 May 2022 14:24:46 +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=1651407889;\n bh=2gddnlZft3Y66yjXTmSv0kz/K0R7arTtQ7OVcRAWuqk=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=DtaMWVVIOLlbkqXnk1XUpkQgjXXCeLgXdaOf01DglSjPCS3ug7ZRxkTZ/6jQDEc7s\n +gXEPuA4nBNB7n2Jkjk0H79fjjtAAcIRSfQ5n5pftUf4PwjQkGSNWPKd2pt1F0HFtX\n Dm+4i78dWB3JfA48nb0f5xoCqwGanbwEuuVV9Rh25bvzT/vlmmYJkwcSsrEV6vL2ZO\n tjiqaqVnF44LkC0+n/tBkfkY2159iYUdRzmK8ec/sgi0IYpcb6Z7G0WMTaW1iY6VB8\n oWVRoQmDZBEm7lDtuaYrWTxTa9BD58I16mLm8e/BQQvfY/Dsfl/GJzfBk3pVfISuIs\n 8+nFZPTiHazxg==",
        "From": "=?utf-8?q?Pali_Roh=C3=A1r?= <pali@kernel.org>",
        "To": "Priyanka Jain <priyanka.jain@nxp.com>,\n\tSinan Akman <sinan@writeme.com>",
        "Cc": "u-boot@lists.denx.de",
        "Subject": "[PATCH 2/3] board: freescale: p1_p2_rdb_pc: Add workaround for\n non-working watchdog",
        "Date": "Sun,  1 May 2022 14:23:13 +0200",
        "Message-Id": "<20220501122314.32626-2-pali@kernel.org>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20220501122314.32626-1-pali@kernel.org>",
        "References": "<20220501122314.32626-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.5 at phobos.denx.de",
        "X-Virus-Status": "Clean"
    },
    "content": "If watchdog timer was already set to non-disabled value then it means that\nwatchdog timer was already activated, has already expired and caused CPU\nreset. If this happened then due to CPLD firmware bug, writing to wd_cfg\nregister has no effect and therefore it is not possible to reactivate\nwatchdog timer again. Also if CPU was reset via watchdog then some\nperipherals like i2c do not work. Watchdog and i2c start working again\nafter CPU reset via non-watchdog method.\n\nImplement this workaround (reset CPU when it was reset by watchdog) to make\nwatchdog usable again. Watchdog timer logic on these P1/P2 RDB boards is\nconnected to CPLD, not to SoC itself.\n\nSigned-off-by: Pali Rohár <pali@kernel.org>\n---\n board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c | 18 ++++++++++++++++++\n 1 file changed, 18 insertions(+)",
    "diff": "diff --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 26ea8a525228..24b5ec435e4e 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@@ -86,6 +86,7 @@ struct cpld_data {\n void board_cpld_init(void)\n {\n \tstruct cpld_data *cpld_data = (void *)(CONFIG_SYS_CPLD_BASE);\n+\tu8 prev_wd_cfg = in_8(&cpld_data->wd_cfg);\n \n \tout_8(&cpld_data->wd_cfg, CPLD_WD_CFG);\n \tout_8(&cpld_data->status_led, CPLD_STATUS_LED);\n@@ -102,6 +103,23 @@ void board_cpld_init(void)\n \t * is to try to clear CPLD's system reset register as early as possible.\n \t */\n \tout_8(&cpld_data->system_rst, CPLD_SYS_RST);\n+\n+\t/*\n+\t * If watchdog timer was already set to non-disabled value then it means\n+\t * that watchdog timer was already activated, has already expired and\n+\t * caused CPU reset. If this happened then due to CPLD firmware bug,\n+\t * writing to wd_cfg register has no effect and therefore it is not\n+\t * possible to reactivate watchdog timer again. Also if CPU was reset\n+\t * via watchdog then some peripherals like i2c do not work. Watchdog and\n+\t * i2c start working again after CPU reset via non-watchdog method.\n+\t *\n+\t * So in case watchdog timer register in CPLD was already enabled then\n+\t * disable it in CPLD and reset CPU which cause new boot. Watchdog timer\n+\t * is disabled few lines above, after reading CPLD previous value.\n+\t * This logic (disabling timer before reset) prevents reboot loop.\n+\t */\n+\tif (prev_wd_cfg != CPLD_WD_CFG)\n+\t\tdo_reset(NULL, 0, 0, NULL);\n }\n \n void board_gpio_init(void)\n",
    "prefixes": [
        "2/3"
    ]
}