get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2175707,
    "url": "http://patchwork.ozlabs.org/api/1.0/patches/2175707/?format=api",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/1.0/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
    },
    "msgid": "<20251218185252.957388-2-visitorckw@gmail.com>",
    "date": "2025-12-18T18:52:50",
    "name": "[1/3] serial: Add Goldfish TTY driver",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "be19a7735a50deb0243f0bcabeef15d3650400c2",
    "submitter": {
        "id": 87364,
        "url": "http://patchwork.ozlabs.org/api/1.0/people/87364/?format=api",
        "name": "Kuan-Wei Chiu",
        "email": "visitorckw@gmail.com"
    },
    "delegate": {
        "id": 3651,
        "url": "http://patchwork.ozlabs.org/api/1.0/users/3651/?format=api",
        "username": "trini",
        "first_name": "Tom",
        "last_name": "Rini",
        "email": "trini@ti.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20251218185252.957388-2-visitorckw@gmail.com/mbox/",
    "series": [
        {
            "id": 485900,
            "url": "http://patchwork.ozlabs.org/api/1.0/series/485900/?format=api",
            "date": "2025-12-18T18:52:49",
            "name": "m68k: Add support for QEMU virt machine",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/485900/mbox/"
        }
    ],
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2175707/checks/",
    "tags": {},
    "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 unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=NV08HrWt;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=gmail.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 unprotected) header.d=gmail.com header.i=@gmail.com header.b=\"NV08HrWt\";\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=gmail.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=visitorckw@gmail.com"
        ],
        "Received": [
            "from phobos.denx.de (phobos.denx.de [85.214.62.61])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4dXKrZ4Cfwz1xty\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 19 Dec 2025 06:06:06 +1100 (AEDT)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 56ABB835FD;\n\tThu, 18 Dec 2025 20:05:52 +0100 (CET)",
            "by phobos.denx.de (Postfix, from userid 109)\n id 344038003E; Thu, 18 Dec 2025 19:53:24 +0100 (CET)",
            "from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com\n [IPv6:2607:f8b0:4864:20::1036])\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 BB586800AB\n for <u-boot@lists.denx.de>; Thu, 18 Dec 2025 19:53:21 +0100 (CET)",
            "by mail-pj1-x1036.google.com with SMTP id\n 98e67ed59e1d1-34ab8e0df53so925615a91.3\n for <u-boot@lists.denx.de>; Thu, 18 Dec 2025 10:53:21 -0800 (PST)",
            "from visitorckw-work01.c.googlers.com.com\n (25.118.81.34.bc.googleusercontent.com. [34.81.118.25])\n by smtp.gmail.com with ESMTPSA id\n 98e67ed59e1d1-34e70d65653sm3136275a91.5.2025.12.18.10.53.13\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 18 Dec 2025 10:53:14 -0800 (PST)"
        ],
        "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,FREEMAIL_FROM,\n RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20230601; t=1766083995; x=1766688795; 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=6dUzH1TUdd1NyIwfreeKloVBUgv8T7MWItnK5pehBTY=;\n b=NV08HrWtg/a92ja6KYnYxPbsg9hyGtQxnwNodtKCgyQ96iM628xhJpbxFJC/EHNiQT\n 6jg6UF0Vw9hDbvo2teY3ZGJ2WBEicdoUZHdL5pKr32Ek41g88vtpPKXH42kCmkaBP4y+\n 73CbILVXhga3SwgLhp12X3Ccs9yPZ/6e5W0L635MluLBPqkUcps0VRGHBy651PW34Oy2\n BLxHkyVYCXAXKp/YvgOow9/2Y6Sq1zHyRkE2hmi5dtt2nvniRjOHSujvBjhz482HQ13G\n ZZ8Sv8gUsIWrC4Ri/P65RTt/8I+0y8zhEk40D7OBOsdjeohjRhGn+hd7RNh0R9A7hAoG\n aoDg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1766083995; x=1766688795;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=6dUzH1TUdd1NyIwfreeKloVBUgv8T7MWItnK5pehBTY=;\n b=V/WdZ7IhdBNS2OG5VXsN7DBDn3mXFDox1MsNI5VaG8upJIRMg6j+T9+FKGVSXtPKCG\n nPh3YCIwyenkBe1GceusDVBiR89XDMjdwqBtfY1apz8EbV6YN75/77ELAZRbZjgL0EYW\n UbL/X1yr2I/52pyDLOp+v3ma2Va/TXg1DXc7y8vdtUtKC/9Gpy6qDPahy+c7oRgOSvfI\n qlj37NmJfTk9wpn6WE7fQMNLBZucNJq72dNUWQUHOa/zobOAwJlEG35+JB6g7d71yY0e\n e+hi/5F5WWwsXtCq0DI15DzcpilvEnm4A4Iv0GJ6zwdVCM3G63u7m7mRZNFa6zuY9e68\n inrg==",
        "X-Forwarded-Encrypted": "i=1;\n AJvYcCWgtt1IDwpmrX8dUVt70gxQTD0XqoA62hUeU/dcWx5rAOgPyNdGIm2XdEKiNoyZMbYGEZpqvxE=@lists.denx.de",
        "X-Gm-Message-State": "AOJu0YyDg6GN/odLlNiXzkl8Lm9MVb3qApVIwKQa1nUUJh65X6gP9jl5\n JhYdv7MV/bge5HdFCc9utCCV0e+ciQcS5/sfl/6L6If+VfjgF2ON6nug",
        "X-Gm-Gg": "AY/fxX64pJn2UWKcNdIERHp+MLPl+g9C2s/5H2NrQOPM+fnHZkTQC1oYRiwf0b9DiU/\n 8/QURyTiZ4zyu2uRI/WmOuTT8L62kPec+DG2KEfLA6SweU+z0RLdF70piq/QYkB4HKsvq4rM8GL\n QEvGa2XW2kxYn5gzvMZOWCKopytr814taSwrYdVHQFJXx77VX1LriBYV+D+sNyBBUxNkytmS3XV\n 5zXlqVpy8P8M8DyfTt0byQD2RtAtAgOCwtj40hCapC0FCnrwRc6uvycAze6t37UaT3AdLNc7uXi\n 3HaQUebBBV90QCHW2VlWrRgKTg7A5spN6XJbLwP0p/qq6QQbJEyWu2i/air1ahWiBHjqr5Vggdo\n Nx6Qe9GC+413ZEonKh/5I4clQfRzRHwvvM2yZNXWULmWAErSsrOSD1ZIZmxQW7zVAxZoXNQH26n\n lCgMuW3AjhvqpI3RbYELSvlpP82xC2+iGI5bJg9H4BP0YMqDBDmk/u/+FQiQcd9fAbj9KT9jV9d\n HPjFp5opJDtwQp2BNFyaRjCxQWuArGa",
        "X-Google-Smtp-Source": "\n AGHT+IFb7Vs7cw+ellO097L2UGjJ8HZfdc6fNBMpDwHyYY99FXf3r8u4sD0ZrKAuiIyl+zlIgu7EhA==",
        "X-Received": "by 2002:a17:90b:53c7:b0:34a:adf1:6781 with SMTP id\n 98e67ed59e1d1-34e92143b39mr264895a91.9.1766083995187;\n Thu, 18 Dec 2025 10:53:15 -0800 (PST)",
        "From": "Kuan-Wei Chiu <visitorckw@gmail.com>",
        "To": "alison.wang@nxp.com,\n\tangelo@kernel-space.org",
        "Cc": "trini@konsulko.com, jserv@ccns.ncku.edu.tw, eleanor15x@gmail.com,\n u-boot@lists.denx.de, Kuan-Wei Chiu <visitorckw@gmail.com>",
        "Subject": "[PATCH 1/3] serial: Add Goldfish TTY driver",
        "Date": "Thu, 18 Dec 2025 18:52:50 +0000",
        "Message-ID": "<20251218185252.957388-2-visitorckw@gmail.com>",
        "X-Mailer": "git-send-email 2.52.0.322.g1dd061c0dc-goog",
        "In-Reply-To": "<20251218185252.957388-1-visitorckw@gmail.com>",
        "References": "<20251218185252.957388-1-visitorckw@gmail.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Mailman-Approved-At": "Thu, 18 Dec 2025 20:05:51 +0100",
        "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": "Add support for the Google Goldfish TTY serial device. This virtual\ndevice is commonly used in QEMU virtual machines (such as the m68k\nvirt machine) and Android emulators.\n\nThe driver implements basic console output and input polling using the\nGoldfish MMIO interface.\n\nSigned-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>\n---\n MAINTAINERS                      |   6 ++\n drivers/serial/Kconfig           |   8 +++\n drivers/serial/Makefile          |   1 +\n drivers/serial/serial_goldfish.c | 112 +++++++++++++++++++++++++++++++\n include/goldfish_tty.h           |  18 +++++\n 5 files changed, 145 insertions(+)\n create mode 100644 drivers/serial/serial_goldfish.c\n create mode 100644 include/goldfish_tty.h",
    "diff": "diff --git a/MAINTAINERS b/MAINTAINERS\nindex 6ce0bbce13d..da4a6e4d518 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -1259,6 +1259,12 @@ S:\tMaintained\n F:\tdrivers/misc/gsc.c\n F:\tinclude/gsc.h\n \n+GOLDFISH SERIAL DRIVER\n+M:\tKuan-Wei Chiu <visitorckw@gmail.com>\n+S:\tMaintained\n+F:\tdrivers/serial/serial_goldfish.c\n+F:\tinclude/goldfish_tty.h\n+\n I2C\n M:\tHeiko Schocher <hs@nabladev.com>\n S:\tMaintained\ndiff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig\nindex 371d7aa5bba..b84cb9ec781 100644\n--- a/drivers/serial/Kconfig\n+++ b/drivers/serial/Kconfig\n@@ -1193,4 +1193,12 @@ config SYS_SDMR\n \tdepends on MPC8XX_CONS\n \tdefault 0x0\n \n+config SERIAL_GOLDFISH\n+\tbool \"Goldfish TTY support\"\n+\tdepends on DM_SERIAL\n+\thelp\n+\t  Select this to enable support for the Goldfish TTY serial port.\n+\t  This virtual device is commonly used by QEMU virtual machines\n+\t  (e.g. m68k virt) for console output.\n+\n endif\ndiff --git a/drivers/serial/Makefile b/drivers/serial/Makefile\nindex 8eaae62b0fc..fe8d23be512 100644\n--- a/drivers/serial/Makefile\n+++ b/drivers/serial/Makefile\n@@ -63,3 +63,4 @@ obj-$(CONFIG_XTENSA_SEMIHOSTING_SERIAL) += serial_xtensa_semihosting.o\n obj-$(CONFIG_S5P4418_PL011_SERIAL) += serial_s5p4418_pl011.o\n \n obj-$(CONFIG_UART4_SERIAL) += serial_adi_uart4.o\n+obj-$(CONFIG_SERIAL_GOLDFISH) += serial_goldfish.o\ndiff --git a/drivers/serial/serial_goldfish.c b/drivers/serial/serial_goldfish.c\nnew file mode 100644\nindex 00000000000..85d2a93b6ff\n--- /dev/null\n+++ b/drivers/serial/serial_goldfish.c\n@@ -0,0 +1,112 @@\n+// SPDX-License-Identifier: GPL-2.0+\n+/*\n+ * Copyright (C) 2025, Kuan-Wei Chiu <visitorckw@gmail.com>\n+ * Goldfish TTY driver for U-Boot\n+ */\n+\n+#include <dm.h>\n+#include <serial.h>\n+#include <goldfish_tty.h>\n+#include <asm/io.h>\n+#include <linux/types.h>\n+\n+/* Goldfish TTY Register Offsets */\n+#define GOLDFISH_TTY_PUT_CHAR       0x00\n+#define GOLDFISH_TTY_BYTES_READY    0x04\n+#define GOLDFISH_TTY_CMD            0x08\n+#define GOLDFISH_TTY_DATA_PTR       0x10\n+#define GOLDFISH_TTY_DATA_LEN       0x14\n+#define GOLDFISH_TTY_DATA_PTR_HIGH  0x18\n+#define GOLDFISH_TTY_VERSION        0x20\n+\n+/* Commands */\n+#define CMD_WRITE_BUFFER   2\n+#define CMD_READ_BUFFER    3\n+\n+struct goldfish_tty_priv {\n+\tvoid __iomem *base;\n+};\n+\n+static int goldfish_serial_getc(struct udevice *dev)\n+{\n+\tstatic u8 rx_buf[4];\n+\tstruct goldfish_tty_priv *priv = dev_get_priv(dev);\n+\tunsigned long base = (unsigned long)priv->base;\n+\tunsigned long paddr;\n+\tu32 count;\n+\n+\tcount = __raw_readl((void *)(base + GOLDFISH_TTY_BYTES_READY));\n+\tif (count == 0)\n+\t\treturn -EAGAIN;\n+\n+\tif (count > sizeof(rx_buf))\n+\t\tcount = sizeof(rx_buf);\n+\n+\tpaddr = virt_to_phys((void *)rx_buf);\n+\n+\trx_buf[0] = 0xAA;\n+\n+\t__raw_writel(0, (void *)(base + GOLDFISH_TTY_DATA_PTR_HIGH));\n+\t__raw_writel(paddr, (void *)(base + GOLDFISH_TTY_DATA_PTR));\n+\t__raw_writel(count, (void *)(base + GOLDFISH_TTY_DATA_LEN));\n+\n+\t__raw_writel(CMD_READ_BUFFER, (void *)(base + GOLDFISH_TTY_CMD));\n+\n+\tif (rx_buf[0] == 0xAA)\n+\t\treturn -EAGAIN;\n+\n+\treturn rx_buf[0];\n+}\n+\n+static int goldfish_serial_putc(struct udevice *dev, const char ch)\n+{\n+\tstruct goldfish_tty_priv *priv = dev_get_priv(dev);\n+\n+\t__raw_writel(ch, priv->base + GOLDFISH_TTY_PUT_CHAR);\n+\n+\treturn 0;\n+}\n+\n+static int goldfish_serial_pending(struct udevice *dev, bool input)\n+{\n+\tstruct goldfish_tty_priv *priv = dev_get_priv(dev);\n+\n+\tif (input)\n+\t\treturn __raw_readl(priv->base + GOLDFISH_TTY_BYTES_READY);\n+\n+\treturn 0;\n+}\n+\n+static int goldfish_serial_probe(struct udevice *dev)\n+{\n+\tstruct goldfish_tty_priv *priv = dev_get_priv(dev);\n+\tstruct goldfish_tty_plat *plat = dev_get_plat(dev);\n+\n+\tif (!plat)\n+\t\treturn -EINVAL;\n+\n+\tpriv->base = plat->base;\n+\n+\treturn 0;\n+}\n+\n+static const struct dm_serial_ops goldfish_serial_ops = {\n+\t.putc = goldfish_serial_putc,\n+\t.pending = goldfish_serial_pending,\n+\t.getc = goldfish_serial_getc,\n+};\n+\n+static const struct udevice_id goldfish_serial_ids[] = {\n+\t{ .compatible = \"google,goldfish-tty\" },\n+\t{ }\n+};\n+\n+U_BOOT_DRIVER(serial_goldfish) = {\n+\t.name\t= \"serial_goldfish\",\n+\t.id\t= UCLASS_SERIAL,\n+\t.of_match = goldfish_serial_ids,\n+\t.probe\t= goldfish_serial_probe,\n+\t.ops\t= &goldfish_serial_ops,\n+\t.priv_auto = sizeof(struct goldfish_tty_priv),\n+\t.flags\t= DM_FLAG_PRE_RELOC,\n+};\ndiff --git a/include/goldfish_tty.h b/include/goldfish_tty.h\nnew file mode 100644\nindex 00000000000..5a74bdcd87d\n--- /dev/null\n+++ b/include/goldfish_tty.h\n@@ -0,0 +1,18 @@\n+/* SPDX-License-Identifier: GPL-2.0+ */\n+/*\n+ * Copyright (C) 2025, Kuan-Wei Chiu <visitorckw@gmail.com>\n+ */\n+\n+#ifndef _GOLDFISH_TTY_H_\n+#define _GOLDFISH_TTY_H_\n+\n+#include <linux/types.h>\n+\n+/* Platform data for the Goldfish TTY driver\n+ * Used to pass hardware base address from Board to Driver\n+ */\n+struct goldfish_tty_plat {\n+\tvoid __iomem *base;\n+};\n+\n+#endif /* _GOLDFISH_TTY_H_ */\n",
    "prefixes": [
        "1/3"
    ]
}