get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 630270,
    "url": "http://patchwork.ozlabs.org/api/patches/630270/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1465067932-24983-2-git-send-email-eddy.petrisor@nxp.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": "<1465067932-24983-2-git-send-email-eddy.petrisor@nxp.com>",
    "list_archive_url": null,
    "date": "2016-06-04T19:18:51",
    "name": "[U-Boot,v5,1/2] serial: Introduce linflex uart support",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "393dee8da71602673bb6f32bbc555c8eeaa7a717",
    "submitter": {
        "id": 68289,
        "url": "http://patchwork.ozlabs.org/api/people/68289/?format=api",
        "name": "Eddy Petrisor",
        "email": "eddy.petrisor@nxp.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/1465067932-24983-2-git-send-email-eddy.petrisor@nxp.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/630270/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/630270/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",
        "Received": [
            "from theia.denx.de (theia.denx.de [85.214.87.163])\n\tby ozlabs.org (Postfix) with ESMTP id 3rMWP35KY7z9t60\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun,  5 Jun 2016 05:34:14 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 935334B94B;\n\tSat,  4 Jun 2016 21:34:10 +0200 (CEST)",
            "from theia.denx.de ([127.0.0.1])\n\tby localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id HP28qFxxOGds; Sat,  4 Jun 2016 21:34:10 +0200 (CEST)",
            "from theia.denx.de (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 031EE4B7FB;\n\tSat,  4 Jun 2016 21:34:10 +0200 (CEST)",
            "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 6FE474B7FB\n\tfor <u-boot@lists.denx.de>; Sat,  4 Jun 2016 21:34:06 +0200 (CEST)",
            "from theia.denx.de ([127.0.0.1])\n\tby localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id N722cEcYSgRI for <u-boot@lists.denx.de>;\n\tSat,  4 Jun 2016 21:34:06 +0200 (CEST)",
            "from na01-by2-obe.outbound.protection.outlook.com\n\t(mail-by2on0068.outbound.protection.outlook.com [207.46.100.68])\n\tby theia.denx.de (Postfix) with ESMTPS id 81B524B77D\n\tfor <u-boot@lists.denx.de>; Sat,  4 Jun 2016 21:34:01 +0200 (CEST)",
            "from BN3PR0301CA0035.namprd03.prod.outlook.com (10.160.180.173) by\n\tBY2PR0301MB1589.namprd03.prod.outlook.com (10.163.28.19) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id\n\t15.1.511.6; Sat, 4 Jun 2016 19:19:18 +0000",
            "from BL2FFO11FD046.protection.gbl (2a01:111:f400:7c09::189) by\n\tBN3PR0301CA0035.outlook.office365.com (2a01:111:e400:4000::45) with\n\tMicrosoft SMTP Server (TLS) id 15.1.497.12 via Frontend Transport;\n\tSat, 4 Jun 2016 19:19:18 +0000",
            "from tx30smr01.am.freescale.net (192.88.168.50) by\n\tBL2FFO11FD046.mail.protection.outlook.com (10.173.161.208) with\n\tMicrosoft SMTP Server (TLS) id 15.1.497.8 via Frontend Transport;\n\tSat, 4 Jun 2016 19:19:18 +0000",
            "from fsr-ub1264-014.ea.freescale.net\n\t(fsr-ub1264-014.ea.freescale.net [10.171.81.44])\n\tby tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id\n\tu54JJ7xG004423; Sat, 4 Jun 2016 12:19:16 -0700"
        ],
        "X-Greylist": "delayed 888 seconds by postgrey-1.34 at theia;\n\tSat, 04 Jun 2016 21:34:01 CEST",
        "X-policyd-weight": "NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5\n\tNOT_IN_BL_NJABL=-1.5 (only DNSBL check requested)",
        "Authentication-Results": "spf=fail (sender IP is 192.88.168.50)\n\tsmtp.mailfrom=nxp.com; gmail.com; dkim=none (message not signed)\n\theader.d=none; gmail.com; dmarc=none action=none header.from=nxp.com; ",
        "Received-SPF": "Fail (protection.outlook.com: domain of nxp.com does not\n\tdesignate 192.88.168.50 as permitted sender)\n\treceiver=protection.outlook.com; \n\tclient-ip=192.88.168.50; helo=tx30smr01.am.freescale.net;",
        "From": "=?UTF-8?q?Eddy=20Petri=C8=99or?= <eddy.petrisor@nxp.com>",
        "To": "U-Boot Mailing List <u-boot@lists.denx.de>",
        "Date": "Sat, 4 Jun 2016 22:18:51 +0300",
        "Message-ID": "<1465067932-24983-2-git-send-email-eddy.petrisor@nxp.com>",
        "X-Mailer": "git-send-email 1.9.2.459.g68773ac",
        "In-Reply-To": "<1465067932-24983-1-git-send-email-eddy.petrisor@nxp.com>",
        "MIME-Version": "1.0",
        "References": "<1459642206-20101-1-git-send-email-eddy.petrisor@gmail.com>\n\t<1459642206-20101-1-git-send-email-eddy.petrisor@gmail.com>\n\t<1461794874-6105-2-git-send-email-eddy.petrisor@nxp.com>\n\t<1464429375-6191-2-git-send-email-eddy.petrisor@gmail.com>\n\t<1464432715-10996-2-git-send-email-eddy.petrisor@gmail.com>",
        "X-EOPAttributedMessage": "0",
        "X-Matching-Connectors": "131095415584609464;\n\t(91ab9b29-cfa4-454e-5278-08d120cd25b8); ()",
        "X-Forefront-Antispam-Report": "CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI;\n\tSFV:NSPM;\n\tSFS:(10009020)(6009001)(2980300002)(1109001)(1110001)(339900001)(57704003)(199003)(189002)(9170700003)(104016004)(19580395003)(11100500001)(50226002)(19580405001)(6806005)(76176999)(5008740100001)(23676002)(87936001)(86362001)(5820100001)(189998001)(50466002)(8936002)(81166006)(8676002)(85426001)(93886004)(50986999)(92566002)(110136002)(2906002)(586003)(36756003)(229853001)(105606002)(106466001)(2950100001)(33646002)(2870700001)(77096005)(47776003)(4326007)(21314002);\n\tDIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0301MB1589;\n\tH:tx30smr01.am.freescale.net; \n\tFPR:; SPF:Fail; MLV:sfv; A:1; MX:1; LANG:en; ",
        "X-Microsoft-Exchange-Diagnostics": [
            "1; BL2FFO11FD046;\n\t1:e8mlpILi9V+HdR029UlWD+ieW9YgKcTmUIh1RVE32TPxqTDXYAEJFAuWyOGMsDxGNVeH99sOXjNu9A4jojCTN0xeIvsqi9XeA5WdKbve0D35hosEmypUHCegYpyz1pQ82tVN97LTqyRtE6kn1IbALgYHjFIAG2KHIWo0ZWDNd/3YCa4pB7wkhlh+U0F75HB6/n7YeNNouBKdOTqIrjgHNCwNsJNwM9IS7btBdWeTZMPsPmLvraTIY2QtOQ7FoFmJ+Kktn03VZkLurP6gc7yQoolsxAoQPnug0njr/h6nFxXf+36V/s/WUEDsxk3UXOKffxp9HTZfcxqNQN3a01GV3M5swbcc1KnuK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PV+/8ZI5ICoAMlWXypqu/h8f7E9lVF+A=="
        ],
        "X-MS-Office365-Filtering-Correlation-Id": "a658bb74-6fa5-46fa-54b8-08d38cad2011",
        "X-Microsoft-Antispam": "UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0301MB1589;",
        "X-Microsoft-Antispam-PRVS": "<BY2PR0301MB1589773FF519CE97D5E04BC7F55A0@BY2PR0301MB1589.namprd03.prod.outlook.com>",
        "X-Exchange-Antispam-Report-Test": "UriScan:(101931422205132);",
        "X-Exchange-Antispam-Report-CFA-Test": "BCL:0; PCL:0;\n\tRULEID:(601004)(2401047)(13015025)(5005006)(8121501046)(13024025)(13023025)(13017025)(13018025)(3002001)(10201501046)(6055026);\n\tSRVR:BY2PR0301MB1589; BCL:0; PCL:0; RULEID:(400006);\n\tSRVR:BY2PR0301MB1589; ",
        "X-Forefront-PRVS": "09634B1196",
        "SpamDiagnosticOutput": "1:23",
        "SpamDiagnosticMetadata": "NSPM",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "04 Jun 2016 19:19:18.1957\n\t(UTC)",
        "X-MS-Exchange-CrossTenant-Id": "5afe0b00-7697-4969-b663-5eab37d5f47e",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;\n\tIp=[192.88.168.50]; \n\tHelo=[tx30smr01.am.freescale.net]",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "BY2PR0301MB1589",
        "Cc": "Tom Rini <trini@konsulko.com>,\n\t=?UTF-8?q?Eddy=20Petri=C8=99or?= <eddy.petrisor@gmail.com>,\n\tStoica Cosmin-Stefan <cosminstefan.stoica@freescale.com>,\n\tEddy Petrisor <eddy.petrisor+patches@gmail.com>",
        "Subject": "[U-Boot] [PATCH v5 1/2] serial: Introduce linflex uart support",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<http://lists.denx.de/mailman/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": "<http://lists.denx.de/mailman/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": "From: Stoica Cosmin-Stefan <cosminstefan.stoica@freescale.com>\n\nThe Linflex module is integrated on some NXP automotive SoCs part of the former\nFreescale portfolio, like S32V234, an SoC for Advanced Driver Assistance\nSystems.\n\nOriginal-signed-off-by: Stoica Cosmin-Stefan <cosminstefan.stoica@freescale.com>\nOriginal-signed-off-by: Chircu Bogdan <Bogdan.Chircu@freescale.com>\nOriginal-signed-off-by: Depons Eric <eric.depons@freescale.com>\nOriginal-signed-off-by: Eddy Petrișor <eddy.petrisor@gmail.com>\n\nSigned-off-by: Eddy Petrișor <eddy.petrisor@gmail.com>\n---\n\nNotes:\n    Changes in v2:\n    Added support for device model. Compatibility with non-DM code is kept\n    for easier synchronization with the code on the vendor branch where the\n    conversion to DM is not done for all boards.\n    \n    Changes in v3:\n    Removed non-DM compatibility, as requested.\n    \n    Changes in v4:\n    Corrected typo: s/_debUG_uart_init/_debug_uart_init/\n    \n    Changes in v5:\n    Enable linflex uart as debug console\n\n drivers/serial/Makefile             |   1 +\n drivers/serial/serial_linflexuart.c | 223 ++++++++++++++++++++++++++++++++++++\n 2 files changed, 224 insertions(+)\n create mode 100644 drivers/serial/serial_linflexuart.c",
    "diff": "diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile\nindex e1e28de..92cbea5 100644\n--- a/drivers/serial/Makefile\n+++ b/drivers/serial/Makefile\n@@ -35,6 +35,7 @@ obj-$(CONFIG_SCIF_CONSOLE) += serial_sh.o\n obj-$(CONFIG_ZYNQ_SERIAL) += serial_zynq.o\n obj-$(CONFIG_BFIN_SERIAL) += serial_bfin.o\n obj-$(CONFIG_FSL_LPUART) += serial_lpuart.o\n+obj-$(CONFIG_FSL_LINFLEXUART) += serial_linflexuart.o\n obj-$(CONFIG_ARC_SERIAL) += serial_arc.o\n obj-$(CONFIG_UNIPHIER_SERIAL) += serial_uniphier.o\n obj-$(CONFIG_STM32_SERIAL) += serial_stm32.o\ndiff --git a/drivers/serial/serial_linflexuart.c b/drivers/serial/serial_linflexuart.c\nnew file mode 100644\nindex 0000000..715a8e3\n--- /dev/null\n+++ b/drivers/serial/serial_linflexuart.c\n@@ -0,0 +1,223 @@\n+/*\n+ * (C) Copyright 2013-2016 Freescale Semiconductor, Inc.\n+ *\n+ * SPDX-License-Identifier:     GPL-2.0+\n+ */\n+\n+#include <common.h>\n+#include <dm.h>\n+#include <errno.h>\n+#include <watchdog.h>\n+#include <asm/io.h>\n+#include <serial.h>\n+#include <linux/compiler.h>\n+#include <asm/arch/imx-regs.h>\n+#include <asm/arch/clock.h>\n+\n+#define US1_TDRE            (1 << 7)\n+#define US1_RDRF            (1 << 5)\n+#define UC2_TE              (1 << 3)\n+#define LINCR1_INIT         (1 << 0)\n+#define LINCR1_MME          (1 << 4)\n+#define LINCR1_BF           (1 << 7)\n+#define LINSR_LINS_INITMODE (0x00001000)\n+#define LINSR_LINS_MASK     (0x0000F000)\n+#define UARTCR_UART         (1 << 0)\n+#define UARTCR_WL0          (1 << 1)\n+#define UARTCR_PCE          (1 << 2)\n+#define UARTCR_PC0          (1 << 3)\n+#define UARTCR_TXEN         (1 << 4)\n+#define UARTCR_RXEN         (1 << 5)\n+#define UARTCR_PC1          (1 << 6)\n+#define UARTSR_DTF          (1 << 1)\n+#define UARTSR_DRF          (1 << 2)\n+#define UARTSR_RMB          (1 << 9)\n+\n+DECLARE_GLOBAL_DATA_PTR;\n+\n+#ifndef CONFIG_DM_SERIAL\n+#error \"The linflex serial driver does not have non-DM support.\"\n+#endif\n+\n+static void _linflex_serial_setbrg(struct linflex_fsl *base, int baudrate)\n+{\n+\tu32 clk = mxc_get_clock(MXC_UART_CLK);\n+\tu32 ibr, fbr;\n+\n+\tif (!baudrate)\n+\t\tbaudrate = CONFIG_BAUDRATE;\n+\n+\tibr = (u32) (clk / (16 * gd->baudrate));\n+\tfbr = (u32) (clk % (16 * gd->baudrate)) * 16;\n+\n+\t__raw_writel(ibr, &base->linibrr);\n+\t__raw_writel(fbr, &base->linfbrr);\n+}\n+\n+static int _linflex_serial_getc(struct linflex_fsl *base)\n+{\n+\tchar c;\n+\n+\tif (!(__raw_readb(&base->uartsr) & UARTSR_DRF))\n+\t\treturn -EAGAIN;\n+\n+\tif (!(__raw_readl(&base->uartsr) & UARTSR_RMB))\n+\t\treturn -EAGAIN;\n+\n+\tc = __raw_readl(&base->bdrm);\n+\t__raw_writeb((__raw_readb(&base->uartsr) | (UARTSR_DRF | UARTSR_RMB)),\n+\t\t     &base->uartsr);\n+\treturn c;\n+}\n+\n+static int _linflex_serial_putc(struct linflex_fsl *base, const char c)\n+{\n+\t__raw_writeb(c, &base->bdrl);\n+\n+\n+\tif (!(__raw_readb(&base->uartsr) & UARTSR_DTF))\n+\t\treturn -EAGAIN;\n+\n+\t__raw_writeb((__raw_readb(&base->uartsr) | UARTSR_DTF), &base->uartsr);\n+\n+\treturn 0;\n+}\n+\n+/*\n+ * Initialise the serial port with the given baudrate. The settings\n+ * are always 8 data bits, no parity, 1 stop bit, no start bits.\n+ */\n+static int _linflex_serial_init(struct linflex_fsl *base)\n+{\n+\tvolatile u32 ctrl;\n+\n+\t/* set the Linflex in master mode amd activate by-pass filter */\n+\tctrl = LINCR1_BF | LINCR1_MME;\n+\t__raw_writel(ctrl, &base->lincr1);\n+\n+\t/* init mode */\n+\tctrl |= LINCR1_INIT;\n+\t__raw_writel(ctrl, &base->lincr1);\n+\n+\t/* waiting for init mode entry - TODO: add a timeout */\n+\twhile ((__raw_readl(&base->linsr) & LINSR_LINS_MASK) !=\n+\t       LINSR_LINS_INITMODE);\n+\n+\t/* set UART bit to allow writing other bits */\n+\t__raw_writel(UARTCR_UART, &base->uartcr);\n+\n+\t/* provide data bits, parity, stop bit, etc */\n+\tserial_setbrg();\n+\n+\t/* 8 bit data, no parity, Tx and Rx enabled, UART mode */\n+\t__raw_writel(UARTCR_PC1 | UARTCR_RXEN | UARTCR_TXEN | UARTCR_PC0\n+\t\t     | UARTCR_WL0 | UARTCR_UART, &base->uartcr);\n+\n+\tctrl = __raw_readl(&base->lincr1);\n+\tctrl &= ~LINCR1_INIT;\n+\t__raw_writel(ctrl, &base->lincr1);\t/* end init mode */\n+\n+\treturn 0;\n+}\n+\n+struct linflex_serial_platdata {\n+\tstruct linflex_fsl *base_addr;\n+\tu8 port_id; /* do we need this? */\n+};\n+\n+struct linflex_serial_priv {\n+\tstruct linflex_fsl *lfuart;\n+};\n+\n+int linflex_serial_setbrg(struct udevice *dev, int baudrate)\n+{\n+\tstruct linflex_serial_priv *priv = dev_get_priv(dev);\n+\n+\t_linflex_serial_setbrg(priv->lfuart, baudrate);\n+\n+\treturn 0;\n+}\n+\n+static int linflex_serial_getc(struct udevice *dev)\n+{\n+\tstruct linflex_serial_priv *priv = dev_get_priv(dev);\n+\n+\treturn _linflex_serial_getc(priv->lfuart);\n+}\n+\n+static int linflex_serial_putc(struct udevice *dev, const char ch)\n+{\n+\n+\tstruct linflex_serial_priv *priv = dev_get_priv(dev);\n+\n+\treturn _linflex_serial_putc(priv->lfuart, ch);\n+}\n+\n+static int linflex_serial_pending(struct udevice *dev, bool input)\n+{\n+\tstruct linflex_serial_priv *priv = dev_get_priv(dev);\n+\tuint32_t uartsr = __raw_readl(&priv->lfuart->uartsr);\n+\n+\tif (input)\n+\t\treturn ((uartsr & UARTSR_DRF) && (uartsr & UARTSR_RMB)) ? 1 : 0;\n+\telse\n+\t\treturn uartsr & UARTSR_DTF ? 0 : 1;\n+}\n+\n+static void linflex_serial_init_internal(struct linflex_fsl *lfuart)\n+{\n+\t_linflex_serial_init(lfuart);\n+\t_linflex_serial_setbrg(lfuart, CONFIG_BAUDRATE);\n+\treturn;\n+}\n+\n+static int linflex_serial_probe(struct udevice *dev)\n+{\n+\tstruct linflex_serial_platdata *plat = dev->platdata;\n+\tstruct linflex_serial_priv *priv = dev_get_priv(dev);\n+\n+\tpriv->lfuart = (struct linflex_fsl *)plat->base_addr;\n+\tlinflex_serial_init_internal(priv->lfuart);\n+\n+\treturn 0;\n+}\n+\n+static const struct dm_serial_ops linflex_serial_ops = {\n+\t.putc = linflex_serial_putc,\n+\t.pending = linflex_serial_pending,\n+\t.getc = linflex_serial_getc,\n+\t.setbrg = linflex_serial_setbrg,\n+};\n+\n+U_BOOT_DRIVER(serial_linflex) = {\n+\t.name\t= \"serial_linflex\",\n+\t.id\t= UCLASS_SERIAL,\n+\t.probe = linflex_serial_probe,\n+\t.ops\t= &linflex_serial_ops,\n+\t.flags = DM_FLAG_PRE_RELOC,\n+\t.priv_auto_alloc_size\t= sizeof(struct linflex_serial_priv),\n+};\n+\n+#ifdef CONFIG_DEBUG_UART_LINFLEXUART\n+\n+#include <debug_uart.h>\n+\n+\n+static inline void _debUG_uart_init(void)\n+{\n+\tstruct linflex_fsl *base = (struct linflex_fsl *)CONFIG_DEBUG_UART_BASE;\n+\n+\tlinflex_serial_init_internal(base);\n+}\n+\n+static inline void _debug_uart_putc(int ch)\n+{\n+\tstruct linflex_fsl *base = (struct linflex_fsl *)CONFIG_DEBUG_UART_BASE;\n+\n+\t/* XXX: Is this OK? Should this use the non-DM version? */\n+\t_linflex_serial_putc(base, ch);\n+}\n+\n+DEBUG_UART_FUNCS\n+\n+#endif /* CONFIG_DEBUG_UART_LINFLEXUART */\n",
    "prefixes": [
        "U-Boot",
        "v5",
        "1/2"
    ]
}