get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2217285,
    "url": "http://patchwork.ozlabs.org/api/patches/2217285/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260327200932.2016910-3-james.hilliard1@gmail.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": "<20260327200932.2016910-3-james.hilliard1@gmail.com>",
    "list_archive_url": null,
    "date": "2026-03-27T20:09:14",
    "name": "[v4,3/5] sunxi: h616: split timing and PHY init helpers by DRAM type",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "1c3a6528201d28f8bb2aca29fa449dfc09987ac1",
    "submitter": {
        "id": 66301,
        "url": "http://patchwork.ozlabs.org/api/people/66301/?format=api",
        "name": "James Hilliard",
        "email": "james.hilliard1@gmail.com"
    },
    "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/20260327200932.2016910-3-james.hilliard1@gmail.com/mbox/",
    "series": [
        {
            "id": 497825,
            "url": "http://patchwork.ozlabs.org/api/series/497825/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=497825",
            "date": "2026-03-27T20:09:12",
            "name": "[v4,1/5] sunxi: h616: make ns_to_t() use the DRAM clock",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/497825/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2217285/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2217285/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 unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=p10y8z7e;\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=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=\"p10y8z7e\";\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=james.hilliard1@gmail.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)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fjBb233JJz1y1x\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 28 Mar 2026 07:10:22 +1100 (AEDT)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 28A2783FA7;\n\tFri, 27 Mar 2026 21:10:07 +0100 (CET)",
            "by phobos.denx.de (Postfix, from userid 109)\n id 8057283DA7; Fri, 27 Mar 2026 21:10:06 +0100 (CET)",
            "from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com\n [IPv6:2607:f8b0:4864:20::22e])\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 308548394E\n for <u-boot@lists.denx.de>; Fri, 27 Mar 2026 21:10:03 +0100 (CET)",
            "by mail-oi1-x22e.google.com with SMTP id\n 5614622812f47-464ba2bb3aeso1492537b6e.1\n for <u-boot@lists.denx.de>; Fri, 27 Mar 2026 13:10:03 -0700 (PDT)",
            "from james-x399.localdomain (71-33-142-50.hlrn.qwest.net.\n [71.33.142.50]) by smtp.gmail.com with ESMTPSA id\n 46e09a7af769-7da0a7b5b41sm166102a34.15.2026.03.27.13.10.00\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 27 Mar 2026 13:10:00 -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=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_GMAIL_RCVD,\n FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,\n SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1774642201; x=1775247001; 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=D81tqlM9p36aa6IXtx4qsIfEJnRmqGR3OB+YgHyg9Qg=;\n b=p10y8z7egd5Y3mFq0+Mye0ZVdO++J+zxGqcG6z0VFJGjfLItgsNoAGpI1iH4aTVSz9\n sLdnU5tA6cMU5o7bk5gYX2h2KX3Eh+LE2z3+u8rRj2+oShipSLdVoouBpC24CexhwOI/\n K38XvSF+vK5T58EBzQ4P5RShry5pu6G2lebPXrTPJ6HmlMsjzwEOb6OSuKvNmh9U2Anm\n IJTfHV4ZQJ25Yh34gXmTlttm32qZ6300/tzsf6JyxlKkIwrxu9psrR6MDxikd1zdSJLf\n P/lVmtSbIqnxE0RHBlbicOoPTHm0Ql2Q5nggIm47RVB7ZSFldwMT4ZovAyjJcK+NRlgK\n 5oRg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774642201; x=1775247001;\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=D81tqlM9p36aa6IXtx4qsIfEJnRmqGR3OB+YgHyg9Qg=;\n b=qB4DWbk1CVW4hyqoX8fLS7008zSDnD9pgL9DCilMA8uQrfDyjkjlqU2rJySOobKl7O\n H0l/wQqOfqRV0U2581Jv5lk8bReXobeorl3Rcg1a+DFyWMw5L45gOYkUpBWA/ZIUe1iA\n CSC6zdjnsY4hVBiOASzRPWy7TdUnMJnVM+Y4uE0ulAmj9eJkhRAgxrMzg77obmDXf1WA\n KGZtlstDc0vbYfQJIDujJDZcUUciy9Jk3nixx1kcuzKyKabccFn0HLiEd9qbQWe2bXv5\n 1oS9PnupZmE7FCHe/8VHiQBH4leNYO0BDMZlFRLXSgHHnZuThZT6esRYIU6rBpU+sUrh\n 9fFQ==",
        "X-Gm-Message-State": "AOJu0YxBlosdZh59nonN6VdBPEwjRjruL0kEa04YGCEIf+zDW9c6zthK\n zAju+sFlGx7JheeA7CWspmwEo9QzqsQBlvZY+PbRNJbgXmQ/t4D3GMMpCaxMKR9h",
        "X-Gm-Gg": "ATEYQzzlRTIjCXlyo22NLnCw7vL9/rTF6Ywthsq5b+VnDgGFeBYgcdHVlTdebaScvht\n rOfnh0vLlBiI54XGUPzxT5eNgSG0Jqir/9/c3BJ2OETFYKW+D1aWmX5jC69jXjBUTN7jSv5p8A7\n ATq8vZ6vDJh6l6GWDCF9dnESVkO0PcS6lODbi9B1Ua4W9Ic4WRV9AHCS8yyG9aE3jg2H7/S7xGO\n JW/uEJ6V8AkqpvgZDM/4UWG5v15WaQVW+apc4HZHReCMl0JiN8E0ylFS6Zy6Zqo2IrKu/QphF0V\n +BjvIXJItwvd/vpqrR0IVhziuvmupHdKjq7VRaojhQNF75n0EgIEWtKDRr0dPobVDFgXfUIUUir\n AQFoZrpVDc0iSoe0C11t+C6rUw7Jxz1lvHMDWGVWQSDEfk3CLoUGidH8/P3i/GfS6IgOfBl+Ypk\n MV2Q8YHrF8fptjfnQlhsfy2QQU90Gv2R1CqSinWInZp2X6xVKKmOtosI6oBF4z3yC/s//1ZnZOG\n TyvxXybJayB/iS+wSLoYGuF7Hdlry8IP+pMx+WUs3lWF9D1UWKAxBgrIZsa",
        "X-Received": "by 2002:a05:6808:1585:b0:467:317:805a with SMTP id\n 5614622812f47-46a7aa0c450mr2683421b6e.26.1774642200878;\n Fri, 27 Mar 2026 13:10:00 -0700 (PDT)",
        "From": "James Hilliard <james.hilliard1@gmail.com>",
        "To": "u-boot@lists.denx.de",
        "Cc": "James Hilliard <james.hilliard1@gmail.com>,\n Andre Przywara <andre.przywara@arm.com>, Tom Rini <trini@konsulko.com>,\n Jernej Skrabec <jernej.skrabec@gmail.com>,\n Paul Kocialkowski <contact@paulk.fr>,\n \"Kory Maincent (TI.com)\" <kory.maincent@bootlin.com>,\n Simon Glass <sjg@chromium.org>,\n Richard Genoud <richard.genoud@bootlin.com>,\n Alexander Graf <agraf@csgraf.de>, Cody Eksal <masterr3c0rd@epochal.quest>,\n Samuel Holland <samuel@sholland.org>,\n Mikhail Kalashnikov <iuncuim@gmail.com>",
        "Subject": "[PATCH v4 3/5] sunxi: h616: split timing and PHY init helpers by DRAM\n type",
        "Date": "Fri, 27 Mar 2026 14:09:14 -0600",
        "Message-ID": "<20260327200932.2016910-3-james.hilliard1@gmail.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260327200932.2016910-1-james.hilliard1@gmail.com>",
        "References": "<20260327200932.2016910-1-james.hilliard1@gmail.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": "Give each H616 timing file its own timing entry point and PHY\ninitialisation accessor, then dispatch to them through inline\nhelpers in the H616 header.\n\nThis keeps the current fixed-profile build model intact while\nmaking the common H616 code consume DRAM-type-specific helpers\nthrough a uniform interface.\n\nSigned-off-by: James Hilliard <james.hilliard1@gmail.com>\n---\n .../include/asm/arch-sunxi/dram_sun50i_h616.h | 34 +++++++++++++++++--\n arch/arm/mach-sunxi/dram_sun50i_h616.c        |  1 +\n .../mach-sunxi/dram_timings/h616_ddr3_1333.c  | 12 ++++---\n .../arm/mach-sunxi/dram_timings/h616_lpddr3.c | 12 ++++---\n .../dram_timings/h616_lpddr4_2133.c           | 12 ++++---\n 5 files changed, 57 insertions(+), 14 deletions(-)",
    "diff": "diff --git a/arch/arm/include/asm/arch-sunxi/dram_sun50i_h616.h b/arch/arm/include/asm/arch-sunxi/dram_sun50i_h616.h\nindex fa12d5d2685..6dab3b4832b 100644\n--- a/arch/arm/include/asm/arch-sunxi/dram_sun50i_h616.h\n+++ b/arch/arm/include/asm/arch-sunxi/dram_sun50i_h616.h\n@@ -177,7 +177,37 @@ static inline int ns_to_t(const struct dram_para *para, int nanoseconds)\n \treturn DIV_ROUND_UP(ctrl_freq * nanoseconds, 1000);\n }\n \n-extern const u8 *phy_init;\n-void mctl_set_timing_params(const struct dram_para *para);\n+void h616_ddr3_set_timing_params(const struct dram_para *para);\n+void h616_lpddr3_set_timing_params(const struct dram_para *para);\n+void h616_lpddr4_set_timing_params(const struct dram_para *para);\n+\n+const u8 *h616_ddr3_get_phy_init(void);\n+const u8 *h616_lpddr3_get_phy_init(void);\n+const u8 *h616_lpddr4_get_phy_init(void);\n+\n+static inline void mctl_set_timing_params(const struct dram_para *para)\n+{\n+#ifdef CONFIG_SUNXI_DRAM_H616_DDR3_1333\n+\th616_ddr3_set_timing_params(para);\n+#elif defined(CONFIG_SUNXI_DRAM_H616_LPDDR3)\n+\th616_lpddr3_set_timing_params(para);\n+#elif defined(CONFIG_SUNXI_DRAM_H616_LPDDR4)\n+\th616_lpddr4_set_timing_params(para);\n+#endif\n+}\n+\n+static inline const u8 *h616_get_phy_init(const struct dram_para *para)\n+{\n+\t(void)para;\n+\n+#ifdef CONFIG_SUNXI_DRAM_H616_DDR3_1333\n+\treturn h616_ddr3_get_phy_init();\n+#elif defined(CONFIG_SUNXI_DRAM_H616_LPDDR3)\n+\treturn h616_lpddr3_get_phy_init();\n+#elif defined(CONFIG_SUNXI_DRAM_H616_LPDDR4)\n+\treturn h616_lpddr4_get_phy_init();\n+#endif\n+\treturn NULL;\n+}\n \n #endif /* _SUNXI_DRAM_SUN50I_H616_H */\ndiff --git a/arch/arm/mach-sunxi/dram_sun50i_h616.c b/arch/arm/mach-sunxi/dram_sun50i_h616.c\nindex 5ee1ca25311..c3e1286fb35 100644\n--- a/arch/arm/mach-sunxi/dram_sun50i_h616.c\n+++ b/arch/arm/mach-sunxi/dram_sun50i_h616.c\n@@ -869,6 +869,7 @@ static bool mctl_phy_init(const struct dram_para *para,\n \t\t\t(struct sunxi_mctl_com_reg *)SUNXI_DRAM_COM_BASE;\n \tstruct sunxi_mctl_ctl_reg * const mctl_ctl =\n \t\t\t(struct sunxi_mctl_ctl_reg *)SUNXI_DRAM_CTL0_BASE;\n+\tconst u8 *phy_init = h616_get_phy_init(para);\n \tu32 val, val2, *ptr, mr0, mr2;\n \tint i;\n \ndiff --git a/arch/arm/mach-sunxi/dram_timings/h616_ddr3_1333.c b/arch/arm/mach-sunxi/dram_timings/h616_ddr3_1333.c\nindex f367f604d5f..20c90f20cb9 100644\n--- a/arch/arm/mach-sunxi/dram_timings/h616_ddr3_1333.c\n+++ b/arch/arm/mach-sunxi/dram_timings/h616_ddr3_1333.c\n@@ -28,11 +28,15 @@ static const u8 h616_ddr3_phy_init_addr_map_1[H616_PHY_INIT_LEN] = {\n \t0x06, 0x09, 0x0f\n };\n \n-const u8 *phy_init = IS_ENABLED(CONFIG_DRAM_SUNXI_PHY_ADDR_MAP_1) ?\n-\t\t     h616_ddr3_phy_init_addr_map_1 :\n-\t\t     h616_ddr3_phy_init_default;\n+const u8 *h616_ddr3_get_phy_init(void)\n+{\n+\tif (IS_ENABLED(CONFIG_DRAM_SUNXI_PHY_ADDR_MAP_1))\n+\t\treturn h616_ddr3_phy_init_addr_map_1;\n+\n+\treturn h616_ddr3_phy_init_default;\n+}\n \n-void mctl_set_timing_params(const struct dram_para *para)\n+void h616_ddr3_set_timing_params(const struct dram_para *para)\n {\n \tstruct sunxi_mctl_ctl_reg * const mctl_ctl =\n \t\t\t(struct sunxi_mctl_ctl_reg *)SUNXI_DRAM_CTL0_BASE;\ndiff --git a/arch/arm/mach-sunxi/dram_timings/h616_lpddr3.c b/arch/arm/mach-sunxi/dram_timings/h616_lpddr3.c\nindex 7efb1b22a84..23b29cc973c 100644\n--- a/arch/arm/mach-sunxi/dram_timings/h616_lpddr3.c\n+++ b/arch/arm/mach-sunxi/dram_timings/h616_lpddr3.c\n@@ -28,11 +28,15 @@ static const u8 h616_lpddr3_phy_init_addr_map_1[H616_PHY_INIT_LEN] = {\n \t0x08, 0x01, 0x1a\n };\n \n-const u8 *phy_init = IS_ENABLED(CONFIG_DRAM_SUNXI_PHY_ADDR_MAP_1) ?\n-\t\t     h616_lpddr3_phy_init_addr_map_1 :\n-\t\t     h616_lpddr3_phy_init_default;\n+const u8 *h616_lpddr3_get_phy_init(void)\n+{\n+\tif (IS_ENABLED(CONFIG_DRAM_SUNXI_PHY_ADDR_MAP_1))\n+\t\treturn h616_lpddr3_phy_init_addr_map_1;\n+\n+\treturn h616_lpddr3_phy_init_default;\n+}\n \n-void mctl_set_timing_params(const struct dram_para *para)\n+void h616_lpddr3_set_timing_params(const struct dram_para *para)\n {\n \tstruct sunxi_mctl_ctl_reg * const mctl_ctl =\n \t\t\t(struct sunxi_mctl_ctl_reg *)SUNXI_DRAM_CTL0_BASE;\ndiff --git a/arch/arm/mach-sunxi/dram_timings/h616_lpddr4_2133.c b/arch/arm/mach-sunxi/dram_timings/h616_lpddr4_2133.c\nindex 055d8dd3cad..c19ae025f75 100644\n--- a/arch/arm/mach-sunxi/dram_timings/h616_lpddr4_2133.c\n+++ b/arch/arm/mach-sunxi/dram_timings/h616_lpddr4_2133.c\n@@ -26,11 +26,15 @@ static const u8 h616_lpddr4_phy_init_addr_map_1[H616_PHY_INIT_LEN] = {\n \t0x18, 0x04, 0x1a\n };\n \n-const u8 *phy_init = IS_ENABLED(CONFIG_DRAM_SUNXI_PHY_ADDR_MAP_1) ?\n-\t\t     h616_lpddr4_phy_init_addr_map_1 :\n-\t\t     h616_lpddr4_phy_init_default;\n+const u8 *h616_lpddr4_get_phy_init(void)\n+{\n+\tif (IS_ENABLED(CONFIG_DRAM_SUNXI_PHY_ADDR_MAP_1))\n+\t\treturn h616_lpddr4_phy_init_addr_map_1;\n+\n+\treturn h616_lpddr4_phy_init_default;\n+}\n \n-void mctl_set_timing_params(const struct dram_para *para)\n+void h616_lpddr4_set_timing_params(const struct dram_para *para)\n {\n \tstruct sunxi_mctl_ctl_reg * const mctl_ctl =\n \t\t\t(struct sunxi_mctl_ctl_reg *)SUNXI_DRAM_CTL0_BASE;\n",
    "prefixes": [
        "v4",
        "3/5"
    ]
}