get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1965611,
    "url": "http://patchwork.ozlabs.org/api/patches/1965611/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20240727071742.1735703-6-patrick.rudolph@9elements.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": "<20240727071742.1735703-6-patrick.rudolph@9elements.com>",
    "list_archive_url": null,
    "date": "2024-07-27T07:17:06",
    "name": "[05/17] serial: serial_pl01x: Implement .getinfo() for PL01",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "9347d2e65d1705bfebf0408ba399777718d538c3",
    "submitter": {
        "id": 83069,
        "url": "http://patchwork.ozlabs.org/api/people/83069/?format=api",
        "name": "Patrick Rudolph",
        "email": "patrick.rudolph@9elements.com"
    },
    "delegate": {
        "id": 3184,
        "url": "http://patchwork.ozlabs.org/api/users/3184/?format=api",
        "username": "sjg",
        "first_name": "Simon",
        "last_name": "Glass",
        "email": "sjg@chromium.org"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20240727071742.1735703-6-patrick.rudolph@9elements.com/mbox/",
    "series": [
        {
            "id": 416851,
            "url": "http://patchwork.ozlabs.org/api/series/416851/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=416851",
            "date": "2024-07-27T07:17:01",
            "name": "Implement ACPI on aarch64",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/416851/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1965611/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1965611/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<u-boot-bounces@lists.denx.de>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=9elements.com header.i=@9elements.com header.a=rsa-sha256\n header.s=google header.b=YD5aN2qv;\n\tdkim-atps=neutral",
            "legolas.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=patchwork.ozlabs.org)",
            "phobos.denx.de;\n dmarc=pass (p=quarantine dis=none) header.from=9elements.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n secure) header.d=9elements.com header.i=@9elements.com header.b=\"YD5aN2qv\";\n\tdkim-atps=neutral",
            "phobos.denx.de; dmarc=pass (p=quarantine dis=none)\n header.from=9elements.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=patrick.rudolph@9elements.com"
        ],
        "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 ECDSA (secp384r1))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4WWGJ44jfLz1yY3\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 27 Jul 2024 17:21:08 +1000 (AEST)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id DB403886AF;\n\tSat, 27 Jul 2024 09:20:17 +0200 (CEST)",
            "by phobos.denx.de (Postfix, from userid 109)\n id 290C088646; Sat, 27 Jul 2024 09:20:16 +0200 (CEST)",
            "from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com\n [IPv6:2a00:1450:4864:20::62a])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 28A64884DB\n for <u-boot@lists.denx.de>; Sat, 27 Jul 2024 09:20:14 +0200 (CEST)",
            "by mail-ej1-x62a.google.com with SMTP id\n a640c23a62f3a-a7a9a369055so256460766b.3\n for <u-boot@lists.denx.de>; Sat, 27 Jul 2024 00:20:14 -0700 (PDT)",
            "from fedora.sec.9e.network\n (ip-037-049-067-221.um09.pools.vodafone-ip.de. [37.49.67.221])\n by smtp.gmail.com with ESMTPSA id\n a640c23a62f3a-a7acab231f2sm253102866b.7.2024.07.27.00.20.12\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sat, 27 Jul 2024 00:20:13 -0700 (PDT)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS\n autolearn=ham autolearn_force=no version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=9elements.com; s=google; t=1722064813; x=1722669613; darn=lists.denx.de;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=8NJTOyzjSlfNeZ5isli+1YIundr9ep5kny/FT3tTejQ=;\n b=YD5aN2qvvk8/vNWwc/ow3JA41965Iym8usXct5ZQuhIC1emLj/OolgLjHPtGXLnwy8\n su+VGxfDtCVBwmsAPUABhm5EBmfVKaMJLHqnoruyUhOIDMpmQTEk3rGW7uLH0+RR/Al7\n 4ZquzQjFaXZl+cFOYMEZo/uNFtDfIKKiIGny9FAyXH/eNC/kPIJdn2ueRHJyuJnYqu86\n UpeCg9+fKvTTD15zZxjywqODK3WaI6oTPgHlZ4eUuTmVLWW9wYRCW54P1w6OnoOLIB63\n tY0eKDA0d5YxHPCClf0wSZnTjGIMxye2mevb/H1XUwsHkWHitY7ObP8+Z3ygEdavYHWs\n xj1g==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1722064813; x=1722669613;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=8NJTOyzjSlfNeZ5isli+1YIundr9ep5kny/FT3tTejQ=;\n b=WrBxkTgcg3u5d2Ox90PhBwaxIvlGNHwbB7VtPGa/Ws0xyJzCcVoTcR6MVGjip+9BYK\n MefJQRQpBL8RW9EtxNjJFwWB0PtsGXKCJuP2GLmVwdGOzFZScXcMxq7+G4mR5WFX+9L5\n nWMOvQGLxs8Z6f57V/FC/BP5smeUgCGCNZxwj3wnuERtiXhyXiMYnZ41IOiDPY83CAL4\n zp/cB60pjub6ScSJ9auOhFzEXrx93tFFsiSIX+exNWYsEFxobCD2J6e2Rx0nUzftdTO9\n 8CQVYGIpF2F+GDTdXkbMIYKF1kaBrbAaDVEQLyl9W+4NobmV5uMXiFoo30bIoD1hseOG\n we8w==",
        "X-Gm-Message-State": "AOJu0Ywxc8YiXOqIozeu40MpJ6vmGLnGuUPE05GJzSADMofa7dqiKZcv\n 5AwbWPNSXLsZLY6D6Q6Gf5lz7nxdDM2+U8Us7oj4ND1iS5UW/CBjaqs5AdQsj+bANwK3FFosXcR\n wxLs=",
        "X-Google-Smtp-Source": "\n AGHT+IE6SbEATNpX5LxglxsDuM5m4Onl54gMsQt/JKeERSyQbuYOG08+W96hSCAjpIXq0wjkbK44Vw==",
        "X-Received": "by 2002:a17:907:c70a:b0:a77:cd51:3b32 with SMTP id\n a640c23a62f3a-a7d4014c651mr89823066b.62.1722064813657;\n Sat, 27 Jul 2024 00:20:13 -0700 (PDT)",
        "From": "Patrick Rudolph <patrick.rudolph@9elements.com>",
        "To": "u-boot@lists.denx.de,\n\tSimon Glass <sjg@chromium.org>",
        "Cc": "mbrugger@suse.com, pbrobinson@gmail.com, trini@konsulko.com,\n bmeng.cn@gmail.com, Maximilian Brune <maximilian.brune@9elements.com>",
        "Subject": "[PATCH 05/17] serial: serial_pl01x: Implement .getinfo() for PL01",
        "Date": "Sat, 27 Jul 2024 09:17:06 +0200",
        "Message-ID": "<20240727071742.1735703-6-patrick.rudolph@9elements.com>",
        "X-Mailer": "git-send-email 2.45.2",
        "In-Reply-To": "<20240727071742.1735703-1-patrick.rudolph@9elements.com>",
        "References": "<20240727071742.1735703-1-patrick.rudolph@9elements.com>",
        "MIME-Version": "1.0",
        "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.8 at phobos.denx.de",
        "X-Virus-Status": "Clean"
    },
    "content": "From: Maximilian Brune <maximilian.brune@9elements.com>\n\nWhen ACPI is enabled on arm it will use the getinfo function to fill\nthe SPCR ACPI table.\n\nSigned-off-by: Maximilian Brune <maximilian.brune@9elements.com>\nCc: Simon Glass <sjg@chromium.org>\nCc: Tom Rini <trini@konsulko.com>\n---\n boot/bootflow.c               |  8 ++++++--\n drivers/serial/serial_pl01x.c | 24 ++++++++++++++++++++++++\n include/serial.h              |  1 +\n 3 files changed, 31 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/boot/bootflow.c b/boot/bootflow.c\nindex 59d77d2385..d8807eb109 100644\n--- a/boot/bootflow.c\n+++ b/boot/bootflow.c\n@@ -936,11 +936,15 @@ int bootflow_cmdline_auto(struct bootflow *bflow, const char *arg)\n \t\treturn ret;\n \n \t*buf = '\\0';\n-\tif (!strcmp(\"earlycon\", arg)) {\n+\tif (!strcmp(\"earlycon\", arg) && info.type == SERIAL_CHIP_16550_COMPATIBLE) {\n \t\tsnprintf(buf, sizeof(buf),\n \t\t\t \"uart8250,mmio32,%#lx,%dn8\", info.addr,\n \t\t\t info.baudrate);\n-\t} else if (!strcmp(\"console\", arg)) {\n+\t} else if (!strcmp(\"earlycon\", arg) && info.type == SERIAL_CHIP_PL01X) {\n+\t\tsnprintf(buf, sizeof(buf),\n+\t\t\t \"pl011,mmio32,%#lx,%dn8\", info.addr,\n+\t\t\t info.baudrate);\n+\t} else if (!strcmp(\"console\", arg) && info.type == SERIAL_CHIP_16550_COMPATIBLE) {\n \t\tsnprintf(buf, sizeof(buf),\n \t\t\t \"ttyS0,%dn8\", info.baudrate);\n \t}\ndiff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c\nindex 80c35963b8..ab67922d18 100644\n--- a/drivers/serial/serial_pl01x.c\n+++ b/drivers/serial/serial_pl01x.c\n@@ -19,6 +19,7 @@\n #include <watchdog.h>\n #include <asm/io.h>\n #include <serial.h>\n+#include <spl.h>\n #include <dm/device_compat.h>\n #include <dm/platform_data/serial_pl01x.h>\n #include <linux/compiler.h>\n@@ -272,6 +273,28 @@ __weak struct serial_device *default_serial_console(void)\n \treturn &pl01x_serial_drv;\n }\n #else\n+\n+static int pl01x_serial_getinfo(struct udevice *dev,\n+\t\t\t\tstruct serial_device_info *info)\n+{\n+\tstruct pl01x_serial_plat *plat = dev_get_plat(dev);\n+\n+\t/* save code size */\n+\tif (!spl_in_proper())\n+\t\treturn -ENOSYS;\n+\n+\tinfo->type = SERIAL_CHIP_PL01X;\n+\tinfo->addr_space = SERIAL_ADDRESS_SPACE_MEMORY;\n+\tinfo->addr = plat->base;\n+\tinfo->size = 0x1000;\n+\tinfo->reg_width = 4;\n+\tinfo->reg_shift = 2;\n+\tinfo->reg_offset = 0;\n+\tinfo->clock = plat->clock;\n+\n+\treturn 0;\n+}\n+\n int pl01x_serial_setbrg(struct udevice *dev, int baudrate)\n {\n \tstruct pl01x_serial_plat *plat = dev_get_plat(dev);\n@@ -341,6 +364,7 @@ static const struct dm_serial_ops pl01x_serial_ops = {\n \t.pending = pl01x_serial_pending,\n \t.getc = pl01x_serial_getc,\n \t.setbrg = pl01x_serial_setbrg,\n+\t.getinfo = pl01x_serial_getinfo,\n };\n \n #if CONFIG_IS_ENABLED(OF_REAL)\ndiff --git a/include/serial.h b/include/serial.h\nindex d129dc3253..d7a9a8cfb8 100644\n--- a/include/serial.h\n+++ b/include/serial.h\n@@ -124,6 +124,7 @@ enum serial_stop {\n enum serial_chip_type {\n \tSERIAL_CHIP_UNKNOWN = -1,\n \tSERIAL_CHIP_16550_COMPATIBLE,\n+\tSERIAL_CHIP_PL01X,\n };\n \n enum adr_space_type {\n",
    "prefixes": [
        "05/17"
    ]
}