get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1421824,
    "url": "http://patchwork.ozlabs.org/api/patches/1421824/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20210103092633.36226-9-jernej.skrabec@siol.net/",
    "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": "<20210103092633.36226-9-jernej.skrabec@siol.net>",
    "list_archive_url": null,
    "date": "2021-01-03T09:26:24",
    "name": "[08/17] sunxi: introduce support for H616 clocks",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "9a67ce636340906b0229d5231e02ba8bd74feb91",
    "submitter": {
        "id": 70601,
        "url": "http://patchwork.ozlabs.org/api/people/70601/?format=api",
        "name": "Jernej Škrabec",
        "email": "jernej.skrabec@siol.net"
    },
    "delegate": {
        "id": 114289,
        "url": "http://patchwork.ozlabs.org/api/users/114289/?format=api",
        "username": "apritzel",
        "first_name": "Andre",
        "last_name": "Przywara",
        "email": "andre.przywara@arm.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20210103092633.36226-9-jernej.skrabec@siol.net/mbox/",
    "series": [
        {
            "id": 222511,
            "url": "http://patchwork.ozlabs.org/api/series/222511/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=222511",
            "date": "2021-01-03T09:26:16",
            "name": "sunxi: Introduce H616 support",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/222511/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1421824/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1421824/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": [
            "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=<UNKNOWN>)",
            "ozlabs.org;\n dmarc=fail (p=none dis=none) header.from=siol.net",
            "phobos.denx.de;\n dmarc=fail (p=none dis=none) header.from=siol.net",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=siol.net",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=jernej.skrabec@siol.net"
        ],
        "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 RSA-PSS (4096 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 4D7tjb0wrRz9sVn\n\tfor <incoming@patchwork.ozlabs.org>; Sun,  3 Jan 2021 20:28:35 +1100 (AEDT)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 475708267E;\n\tSun,  3 Jan 2021 10:27:14 +0100 (CET)",
            "by phobos.denx.de (Postfix, from userid 109)\n id 59B0C8266F; Sun,  3 Jan 2021 10:27:10 +0100 (CET)",
            "from mail.siol.net (mailoutvs29.siol.net [185.57.226.220])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id D399582668\n for <u-boot@lists.denx.de>; Sun,  3 Jan 2021 10:27:07 +0100 (CET)",
            "from localhost (localhost [127.0.0.1])\n by mail.siol.net (Zimbra) with ESMTP id 9265B522CA5;\n Sun,  3 Jan 2021 10:27:07 +0100 (CET)",
            "from mail.siol.net ([127.0.0.1])\n by localhost (psrvmta12.zcs-production.pri [127.0.0.1]) (amavisd-new,\n port 10032)\n with ESMTP id DeEeYEZwWOA9; Sun,  3 Jan 2021 10:27:07 +0100 (CET)",
            "from mail.siol.net (localhost [127.0.0.1])\n by mail.siol.net (Zimbra) with ESMTPS id 49BCE522CB4;\n Sun,  3 Jan 2021 10:27:07 +0100 (CET)",
            "from localhost.localdomain (89-212-178-211.dynamic.t-2.net\n [89.212.178.211]) (Authenticated sender: 031275009)\n by mail.siol.net (Zimbra) with ESMTPSA id 1211D522CA5;\n Sun,  3 Jan 2021 10:27:05 +0100 (CET)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,\n SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2",
        "From": "Jernej Skrabec <jernej.skrabec@siol.net>",
        "To": "jagan@amarulasolutions.com,\n\tandre.przywara@arm.com",
        "Cc": "hdegoede@redhat.com, jernej.skrabec@siol.net, lukma@denx.de, hs@denx.de,\n peng.fan@nxp.com, joe.hershberger@ni.com, jh80.chung@samsung.com,\n u-boot@lists.denx.de, linux-sunxi@googlegroups.com",
        "Subject": "[PATCH 08/17] sunxi: introduce support for H616 clocks",
        "Date": "Sun,  3 Jan 2021 10:26:24 +0100",
        "Message-Id": "<20210103092633.36226-9-jernej.skrabec@siol.net>",
        "X-Mailer": "git-send-email 2.30.0",
        "In-Reply-To": "<20210103092633.36226-1-jernej.skrabec@siol.net>",
        "References": "<20210103092633.36226-1-jernej.skrabec@siol.net>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "quoted-printable",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.34",
        "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.102.3 at phobos.denx.de",
        "X-Virus-Status": "Clean"
    },
    "content": "H616 has mostly the same clocks as H6 with some small differences. Just\nreuse H6 clocks for H616 and handle differences with macros.\n\nSigned-off-by: Jernej Skrabec <jernej.skrabec@siol.net>\n---\n .../include/asm/arch-sunxi/clock_sun50i_h6.h   | 18 +++++++++++++++++-\n arch/arm/mach-sunxi/clock_sun50i_h6.c          | 10 +++++++++-\n 2 files changed, 26 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h b/arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h\nindex e83e84ab6cab..62abfc4ef6bd 100644\n--- a/arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h\n+++ b/arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h\n@@ -230,6 +230,7 @@ struct sunxi_ccm_reg {\n #define CCM_PLL1_CTRL_EN\t\tBIT(31)\n #define CCM_PLL1_LOCK_EN\t\tBIT(29)\n #define CCM_PLL1_LOCK\t\t\tBIT(28)\n+#define CCM_PLL1_OUT_EN\t\t\tBIT(27)\n #define CCM_PLL1_CLOCK_TIME_2\t\t(2 << 24)\n #define CCM_PLL1_CTRL_P(p)\t\t((p) << 16)\n #define CCM_PLL1_CTRL_N(n)\t\t((n) << 8)\n@@ -238,6 +239,7 @@ struct sunxi_ccm_reg {\n #define CCM_PLL5_CTRL_EN\t\tBIT(31)\n #define CCM_PLL5_LOCK_EN\t\tBIT(29)\n #define CCM_PLL5_LOCK\t\t\tBIT(28)\n+#define CCM_PLL5_OUT_EN\t\t\tBIT(27)\n #define CCM_PLL5_CTRL_N(n)\t\t((n) << 8)\n #define CCM_PLL5_CTRL_DIV1(div1)\t((div1) << 0)\n #define CCM_PLL5_CTRL_DIV2(div0)\t((div0) << 1)\n@@ -252,7 +254,6 @@ struct sunxi_ccm_reg {\n #define CCM_PLL6_CTRL_DIV1_MASK\t\t(0x1 << CCM_PLL6_CTRL_DIV1_SHIFT)\n #define CCM_PLL6_CTRL_DIV2_SHIFT\t1\n #define CCM_PLL6_CTRL_DIV2_MASK\t\t(0x1 << CCM_PLL6_CTRL_DIV2_SHIFT)\n-#define CCM_PLL6_DEFAULT\t\t0xa0006300\n \n /* cpu_axi bit field*/\n #define CCM_CPU_AXI_MUX_MASK\t\t(0x3 << 24)\n@@ -262,6 +263,9 @@ struct sunxi_ccm_reg {\n #define CCM_CPU_AXI_AXI_MASK\t\t0x3\n #define CCM_CPU_AXI_DEFAULT_FACTORS\t0x301\n \n+#ifdef CONFIG_MACH_SUN50I_H6\n+#define CCM_PLL6_DEFAULT\t\t0xa0006300\n+\n /* psi_ahb1_ahb2 bit field */\n #define CCM_PSI_AHB1_AHB2_DEFAULT\t0x03000102\n \n@@ -270,6 +274,18 @@ struct sunxi_ccm_reg {\n \n /* apb1 bit field */\n #define CCM_APB1_DEFAULT\t\t0x03000102\n+#elif CONFIG_MACH_SUN50I_H616\n+#define CCM_PLL6_DEFAULT\t\t0xa8003100\n+\n+/* psi_ahb1_ahb2 bit field */\n+#define CCM_PSI_AHB1_AHB2_DEFAULT\t0x03000002\n+\n+/* ahb3 bit field */\n+#define CCM_AHB3_DEFAULT\t\t0x03000002\n+\n+/* apb1 bit field */\n+#define CCM_APB1_DEFAULT\t\t0x03000102\n+#endif\n \n /* apb2 bit field */\n #define APB2_CLK_SRC_OSC24M\t\t(0x0 << 24)\ndiff --git a/arch/arm/mach-sunxi/clock_sun50i_h6.c b/arch/arm/mach-sunxi/clock_sun50i_h6.c\nindex 6bd466915c11..a4cc1b53728b 100644\n--- a/arch/arm/mach-sunxi/clock_sun50i_h6.c\n+++ b/arch/arm/mach-sunxi/clock_sun50i_h6.c\n@@ -68,6 +68,9 @@ void clock_set_pll1(unsigned int clk)\n \n \t/* clk = 24*n/p, p is ignored if clock is >288MHz */\n \twritel(CCM_PLL1_CTRL_EN | CCM_PLL1_LOCK_EN | CCM_PLL1_CLOCK_TIME_2 |\n+#ifdef CONFIG_MACH_SUN50I_H616\n+\t       CCM_PLL1_OUT_EN |\n+#endif\n \t       CCM_PLL1_CTRL_N(clk / 24000000), &ccm->pll1_cfg);\n \twhile (!(readl(&ccm->pll1_cfg) & CCM_PLL1_LOCK)) {}\n \n@@ -83,6 +86,11 @@ unsigned int clock_get_pll6(void)\n {\n \tstruct sunxi_ccm_reg *const ccm =\n \t\t(struct sunxi_ccm_reg *)SUNXI_CCM_BASE;\n+#ifdef CONFIG_MACH_SUN50I_H6\n+\tint m = 4;\n+#else\n+\tint m = 2;\n+#endif\n \n \tuint32_t rval = readl(&ccm->pll6_cfg);\n \tint n = ((rval & CCM_PLL6_CTRL_N_MASK) >> CCM_PLL6_CTRL_N_SHIFT);\n@@ -91,7 +99,7 @@ unsigned int clock_get_pll6(void)\n \tint div2 = ((rval & CCM_PLL6_CTRL_DIV2_MASK) >>\n \t\t\tCCM_PLL6_CTRL_DIV2_SHIFT) + 1;\n \t/* The register defines PLL6-4X, not plain PLL6 */\n-\treturn 24000000 / 4 * n / div1 / div2;\n+\treturn 24000000 / m * n / div1 / div2;\n }\n \n int clock_twi_onoff(int port, int state)\n",
    "prefixes": [
        "08/17"
    ]
}