get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 811903,
    "url": "http://patchwork.ozlabs.org/api/patches/811903/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/openbmc/patch/20170909015308.30001-2-brendanhiggins@google.com/",
    "project": {
        "id": 56,
        "url": "http://patchwork.ozlabs.org/api/projects/56/?format=api",
        "name": "OpenBMC development",
        "link_name": "openbmc",
        "list_id": "openbmc.lists.ozlabs.org",
        "list_email": "openbmc@lists.ozlabs.org",
        "web_url": "http://github.com/openbmc/",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170909015308.30001-2-brendanhiggins@google.com>",
    "list_archive_url": null,
    "date": "2017-09-09T01:53:06",
    "name": "[v5,1/3] arm: npcm: add basic support for Nuvoton BMCs",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": true,
    "hash": "f9f62403ca0f9ec406fb47d384baa1685b76feea",
    "submitter": {
        "id": 69647,
        "url": "http://patchwork.ozlabs.org/api/people/69647/?format=api",
        "name": "Brendan Higgins",
        "email": "brendanhiggins@google.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/openbmc/patch/20170909015308.30001-2-brendanhiggins@google.com/mbox/",
    "series": [
        {
            "id": 2319,
            "url": "http://patchwork.ozlabs.org/api/series/2319/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/openbmc/list/?series=2319",
            "date": "2017-09-09T01:53:05",
            "name": "arm: npcm: add basic support for Nuvoton BMCs",
            "version": 5,
            "mbox": "http://patchwork.ozlabs.org/series/2319/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/811903/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/811903/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "openbmc@lists.ozlabs.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "openbmc@lists.ozlabs.org"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xpy0P6BZNz9sRY\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  9 Sep 2017 11:53:57 +1000 (AEST)",
            "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xpy0P4vSXzDrp4\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  9 Sep 2017 11:53:57 +1000 (AEST)",
            "from mail-pg0-x232.google.com (mail-pg0-x232.google.com\n\t[IPv6:2607:f8b0:400e:c05::232])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xpxzg21LhzDrnT\n\tfor <openbmc@lists.ozlabs.org>; Sat,  9 Sep 2017 11:53:19 +1000 (AEST)",
            "by mail-pg0-x232.google.com with SMTP id q68so7407218pgq.1\n\tfor <openbmc@lists.ozlabs.org>; Fri, 08 Sep 2017 18:53:19 -0700 (PDT)",
            "from mactruck.svl.corp.google.com ([100.123.242.94])\n\tby smtp.gmail.com with ESMTPSA id\n\tz15sm5090132pgs.41.2017.09.08.18.53.15\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tFri, 08 Sep 2017 18:53:16 -0700 (PDT)"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=google.com header.i=@google.com\n\theader.b=\"QMJjt+a9\"; dkim-atps=neutral",
            "lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=google.com header.i=@google.com\n\theader.b=\"QMJjt+a9\"; dkim-atps=neutral",
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=google.com\n\t(client-ip=2607:f8b0:400e:c05::232; helo=mail-pg0-x232.google.com;\n\tenvelope-from=brendanhiggins@google.com; receiver=<UNKNOWN>)",
            "lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=google.com header.i=@google.com\n\theader.b=\"QMJjt+a9\"; dkim-atps=neutral"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=20161025; \n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=VRQPbMjATDW218Qr5JK6p58aXllbg4RzqQpxf7AK7+s=;\n\tb=QMJjt+a9hJghcmit7OmV3FG3HqNGCinVclscx/a7omimOrathBt/1YGcCdwA4OFkBl\n\tuKq5z/iiIgZJF2RqJUVIro5t27Dm0j1ZW1B6YxmpQIe2Vjvu0IeCAF+zx7gcii2c4Pqu\n\tXzRKI7OJYgVwvUx7U2icnBXr2Co16jOhARmI5TkfOFO0fgN/wZbEm26vSzfn0MiqcFa7\n\tZrUuHy7xAkm2dDEp9S8LuyiUJK8wAj2RDy09dWT8he4CSPI2Oml91N3/fYLcJE0msC8A\n\tA6kl89xqGvgoS5n1mQKuwMaWAAedmNjNC0Va5Mc5f8hchmnfu+JBFD5FgI1zdPEc4IIH\n\thmIQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=VRQPbMjATDW218Qr5JK6p58aXllbg4RzqQpxf7AK7+s=;\n\tb=C7LE2F6DdolIP6gQZcUxS0OS9nqAIEdHWio7eRADaY5jfng1bW/is8pVCLoLbbfSeA\n\tnVHG8RWKD9k9XlGyXShs0j3GsCPd93W9lANlyESkwUPzoDA5iy9sS71PtD9ekwzCBcah\n\tyt8MCIRQoFYx73hgl55n0Ma1cxonykrSymaCWxl6WpjssUiI2MBVXVhsZ2hEzanykTlN\n\tweed3RugcAATkHgUChR6TG0zMwHbXMWXiWPx4BJZhVX4JyjiczTDLWNE8WjY+DG9JM9j\n\tWa0If+zusb2/+Q/WDH/kaA3ely8hwdzf50taHdDlaqzYBFzaeRqOEf002ijfjEq8iVLv\n\tS40A==",
        "X-Gm-Message-State": "AHPjjUix5WDCTjOL5wVb3F3Jh9On72R7z316N9RxMEmIj6DwCX84HokF\n\tDoVwVqarym7ZTMSo",
        "X-Google-Smtp-Source": "ADKCNb5JLP2onTVKPuzpTVynbmxtp64Lf0/0oMXWFHJPaT0850lyeDRxI9Cv3EffZLY+J0R61h1pog==",
        "X-Received": "by 10.84.128.69 with SMTP id 63mr5632499pla.446.1504921997088;\n\tFri, 08 Sep 2017 18:53:17 -0700 (PDT)",
        "From": "Brendan Higgins <brendanhiggins@google.com>",
        "To": "robh+dt@kernel.org, mark.rutland@arm.com, linux@armlinux.org.uk,\n\tavifishman70@gmail.com, tmaimon77@gmail.com, raltherr@google.com,\n\tf.fainelli@gmail.com",
        "Subject": "[PATCH v5 1/3] arm: npcm: add basic support for Nuvoton BMCs",
        "Date": "Fri,  8 Sep 2017 18:53:06 -0700",
        "Message-Id": "<20170909015308.30001-2-brendanhiggins@google.com>",
        "X-Mailer": "git-send-email 2.14.1.581.gf28d330327-goog",
        "In-Reply-To": "<20170909015308.30001-1-brendanhiggins@google.com>",
        "References": "<20170909015308.30001-1-brendanhiggins@google.com>",
        "X-BeenThere": "openbmc@lists.ozlabs.org",
        "X-Mailman-Version": "2.1.23",
        "Precedence": "list",
        "List-Id": "Development list for OpenBMC <openbmc.lists.ozlabs.org>",
        "List-Unsubscribe": "<https://lists.ozlabs.org/options/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.ozlabs.org/pipermail/openbmc/>",
        "List-Post": "<mailto:openbmc@lists.ozlabs.org>",
        "List-Help": "<mailto:openbmc-request@lists.ozlabs.org?subject=help>",
        "List-Subscribe": "<https://lists.ozlabs.org/listinfo/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=subscribe>",
        "Cc": "devicetree@vger.kernel.org, openbmc@lists.ozlabs.org,\n\tBrendan Higgins <brendanhiggins@google.com>,\n\tlinux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org",
        "Errors-To": "openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org",
        "Sender": "\"openbmc\"\n\t<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"
    },
    "content": "Adds basic support for the Nuvoton NPCM750 BMC.\n\nSigned-off-by: Brendan Higgins <brendanhiggins@google.com>\n---\n arch/arm/Kconfig             |  2 +\n arch/arm/Makefile            |  1 +\n arch/arm/mach-npcm/Kconfig   | 48 ++++++++++++++++++++++++\n arch/arm/mach-npcm/Makefile  |  3 ++\n arch/arm/mach-npcm/headsmp.S | 17 +++++++++\n arch/arm/mach-npcm/npcm7xx.c | 34 +++++++++++++++++\n arch/arm/mach-npcm/platsmp.c | 88 ++++++++++++++++++++++++++++++++++++++++++++\n 7 files changed, 193 insertions(+)\n create mode 100644 arch/arm/mach-npcm/Kconfig\n create mode 100644 arch/arm/mach-npcm/Makefile\n create mode 100644 arch/arm/mach-npcm/headsmp.S\n create mode 100644 arch/arm/mach-npcm/npcm7xx.c\n create mode 100644 arch/arm/mach-npcm/platsmp.c",
    "diff": "diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig\nindex 61a0cb15067e..05543f1cfbde 100644\n--- a/arch/arm/Kconfig\n+++ b/arch/arm/Kconfig\n@@ -782,6 +782,8 @@ source \"arch/arm/mach-netx/Kconfig\"\n \n source \"arch/arm/mach-nomadik/Kconfig\"\n \n+source \"arch/arm/mach-npcm/Kconfig\"\n+\n source \"arch/arm/mach-nspire/Kconfig\"\n \n source \"arch/arm/plat-omap/Kconfig\"\ndiff --git a/arch/arm/Makefile b/arch/arm/Makefile\nindex 47d3a1ab08d2..60ca50c7d762 100644\n--- a/arch/arm/Makefile\n+++ b/arch/arm/Makefile\n@@ -191,6 +191,7 @@ machine-$(CONFIG_ARCH_MEDIATEK)\t\t+= mediatek\n machine-$(CONFIG_ARCH_MXS)\t\t+= mxs\n machine-$(CONFIG_ARCH_NETX)\t\t+= netx\n machine-$(CONFIG_ARCH_NOMADIK)\t\t+= nomadik\n+machine-$(CONFIG_ARCH_NPCM)\t\t+= npcm\n machine-$(CONFIG_ARCH_NSPIRE)\t\t+= nspire\n machine-$(CONFIG_ARCH_OXNAS)\t\t+= oxnas\n machine-$(CONFIG_ARCH_OMAP1)\t\t+= omap1\ndiff --git a/arch/arm/mach-npcm/Kconfig b/arch/arm/mach-npcm/Kconfig\nnew file mode 100644\nindex 000000000000..21dfa8ce828f\n--- /dev/null\n+++ b/arch/arm/mach-npcm/Kconfig\n@@ -0,0 +1,48 @@\n+menuconfig ARCH_NPCM\n+\tbool \"Nuvoton NPCM Architecture\"\n+\tselect ARCH_REQUIRE_GPIOLIB\n+\tselect USE_OF\n+\tselect PINCTRL\n+\tselect PINCTRL_NPCM7XX\n+\n+if ARCH_NPCM\n+\n+comment \"NPCMX50 CPU type\"\n+\n+config CPU_NPCM750\n+\tdepends on ARCH_NPCM && ARCH_MULTI_V7\n+\tbool \"Support for NPCM750 BMC CPU (Poleg)\"\n+\tselect CACHE_L2X0\n+\tselect CPU_V7\n+\tselect ARM_GIC\n+\tselect HAVE_SMP\n+\tselect SMP\n+\tselect SMP_ON_UP\n+\tselect HAVE_ARM_SCU\n+\tselect HAVE_ARM_TWD if SMP\n+\tselect ARM_ERRATA_720789\n+\tselect ARM_ERRATA_754322\n+\tselect ARM_ERRATA_764369\n+\tselect ARM_ERRATA_794072\n+\tselect PL310_ERRATA_588369\n+\tselect PL310_ERRATA_727915\n+\tselect USB_EHCI_ROOT_HUB_TT\n+\tselect USB_ARCH_HAS_HCD\n+\tselect USB_ARCH_HAS_EHCI\n+\tselect USB_EHCI_HCD\n+\tselect USB_ARCH_HAS_OHCI\n+\tselect USB_OHCI_HCD\n+\tselect USB\n+\tselect FIQ\n+\tselect CPU_USE_DOMAINS\n+\tselect GENERIC_CLOCKEVENTS\n+\tselect CLKDEV_LOOKUP\n+\tselect COMMON_CLK if OF\n+\tselect NPCM750_TIMER\n+\tselect MFD_SYSCON\n+\thelp\n+\t  Support for NPCM750 BMC CPU (Poleg).\n+\n+\t  Nuvoton NPCM750 BMC based on the Cortex A9.\n+\n+endif\ndiff --git a/arch/arm/mach-npcm/Makefile b/arch/arm/mach-npcm/Makefile\nnew file mode 100644\nindex 000000000000..78416055b854\n--- /dev/null\n+++ b/arch/arm/mach-npcm/Makefile\n@@ -0,0 +1,3 @@\n+AFLAGS_headsmp.o\t\t+= -march=armv7-a\n+\n+obj-$(CONFIG_CPU_NPCM750)\t+= npcm7xx.o platsmp.o headsmp.o\ndiff --git a/arch/arm/mach-npcm/headsmp.S b/arch/arm/mach-npcm/headsmp.S\nnew file mode 100644\nindex 000000000000..9fccbbd49ed4\n--- /dev/null\n+++ b/arch/arm/mach-npcm/headsmp.S\n@@ -0,0 +1,17 @@\n+/*\n+ * Copyright 2017 Google, Inc.\n+ *\n+ * This program is free software; you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License version 2 as\n+ * published by the Free Software Foundation.\n+ */\n+\n+#include <linux/linkage.h>\n+#include <linux/init.h>\n+#include <asm/assembler.h>\n+\n+ENTRY(npcm7xx_secondary_startup)\n+\tsafe_svcmode_maskall r0\n+\n+\tb\tsecondary_startup\n+ENDPROC(npcm7xx_secondary_startup)\ndiff --git a/arch/arm/mach-npcm/npcm7xx.c b/arch/arm/mach-npcm/npcm7xx.c\nnew file mode 100644\nindex 000000000000..132e9d587857\n--- /dev/null\n+++ b/arch/arm/mach-npcm/npcm7xx.c\n@@ -0,0 +1,34 @@\n+/*\n+ * Copyright (c) 2017 Nuvoton Technology corporation.\n+ * Copyright 2017 Google, Inc.\n+ *\n+ * This program is free software; you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License version 2 as\n+ * published by the Free Software Foundation.\n+ */\n+\n+#include <linux/kernel.h>\n+#include <linux/types.h>\n+#include <asm/mach/arch.h>\n+#include <asm/mach-types.h>\n+#include <asm/mach/map.h>\n+#include <asm/hardware/cache-l2x0.h>\n+\n+#define NPCM7XX_AUX_VAL (L310_AUX_CTRL_INSTR_PREFETCH |\t\t\t       \\\n+\t\t\t L310_AUX_CTRL_DATA_PREFETCH |\t\t\t       \\\n+\t\t\t L310_AUX_CTRL_NS_LOCKDOWN |\t\t\t       \\\n+\t\t\t L310_AUX_CTRL_CACHE_REPLACE_RR |\t\t       \\\n+\t\t\t L2C_AUX_CTRL_SHARED_OVERRIDE |\t\t\t       \\\n+\t\t\t L310_AUX_CTRL_FULL_LINE_ZERO)\n+\n+static const char *const npcm7xx_dt_match[] = {\n+\t\"nuvoton,npcm750\",\n+\tNULL\n+};\n+\n+DT_MACHINE_START(NPCM7XX_DT, \"NPCMX50 Chip family\")\n+\t.atag_offset\t= 0x100,\n+\t.dt_compat\t= npcm7xx_dt_match,\n+\t.l2c_aux_val\t= NPCM7XX_AUX_VAL,\n+\t.l2c_aux_mask\t= ~NPCM7XX_AUX_VAL,\n+MACHINE_END\ndiff --git a/arch/arm/mach-npcm/platsmp.c b/arch/arm/mach-npcm/platsmp.c\nnew file mode 100644\nindex 000000000000..450e83c3c531\n--- /dev/null\n+++ b/arch/arm/mach-npcm/platsmp.c\n@@ -0,0 +1,88 @@\n+/*\n+ * Copyright 2017 Google, Inc.\n+ *\n+ * This program is free software; you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License version 2 as\n+ * published by the Free Software Foundation.\n+ */\n+\n+#define pr_fmt(fmt) \"PLATSMP: \" fmt\n+\n+#include <linux/delay.h>\n+#include <linux/device.h>\n+#include <linux/smp.h>\n+#include <linux/io.h>\n+#include <linux/of.h>\n+#include <linux/of_device.h>\n+#include <linux/of_platform.h>\n+#include <linux/of_address.h>\n+#include <asm/cacheflush.h>\n+#include <asm/smp.h>\n+#include <asm/smp_plat.h>\n+#include <asm/smp_scu.h>\n+\n+#define NPCM7XX_SCRPAD_REG 0x13c\n+\n+extern void npcm7xx_secondary_startup(void);\n+\n+static int npcm7xx_smp_boot_secondary(unsigned int cpu,\n+\t\t\t\t      struct task_struct *idle)\n+{\n+\tstruct device_node *gcr_np;\n+\tvoid __iomem *gcr_base;\n+\tint ret = 0;\n+\n+\tgcr_np = of_find_compatible_node(NULL, NULL, \"nuvoton,npcm750-gcr\");\n+\tif (!gcr_np) {\n+\t\tpr_err(\"no gcr device node\\n\");\n+\t\tret = -EFAULT;\n+\t\tgoto out;\n+\t}\n+\tgcr_base = of_iomap(gcr_np, 0);\n+\tif (!gcr_base) {\n+\t\tpr_err(\"could not iomap gcr at: 0x%p\\n\", gcr_base);\n+\t\tret = -EFAULT;\n+\t\tgoto out;\n+\t}\n+\n+\t/* give boot ROM kernel start address. */\n+\tiowrite32(__pa_symbol(npcm7xx_secondary_startup), gcr_base +\n+\t\t  NPCM7XX_SCRPAD_REG);\n+\t/* make sure npcm7xx_secondary_startup is seen by all observers. */\n+\tsmp_wmb();\n+\tdsb_sev();\n+\t/* make sure write buffer is drained */\n+\tmb();\n+\n+\tiounmap(gcr_base);\n+out:\n+\treturn ret;\n+}\n+\n+static void __init npcm7xx_smp_prepare_cpus(unsigned int max_cpus)\n+{\n+\tstruct device_node *scu_np;\n+\tvoid __iomem *scu_base;\n+\n+\tscu_np = of_find_compatible_node(NULL, NULL, \"arm,cortex-a9-scu\");\n+\tif (!scu_np) {\n+\t\tpr_err(\"no scu device node\\n\");\n+\t\treturn;\n+\t}\n+\tscu_base = of_iomap(scu_np, 0);\n+\tif (!scu_base) {\n+\t\tpr_err(\"could not iomap scu at: 0x%p\\n\", scu_base);\n+\t\treturn;\n+\t}\n+\n+\tscu_enable(scu_base);\n+\n+\tiounmap(scu_base);\n+}\n+\n+static struct smp_operations npcm7xx_smp_ops __initdata = {\n+\t.smp_prepare_cpus = npcm7xx_smp_prepare_cpus,\n+\t.smp_boot_secondary = npcm7xx_smp_boot_secondary,\n+};\n+\n+CPU_METHOD_OF_DECLARE(npcm7xx_smp, \"nuvoton,npcm7xx-smp\", &npcm7xx_smp_ops);\n",
    "prefixes": [
        "v5",
        "1/3"
    ]
}