get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2175664,
    "url": "http://patchwork.ozlabs.org/api/1.0/patches/2175664/?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": "<20251218-clk-mtk-improvements-v1-8-72db131ba148@baylibre.com>",
    "date": "2025-12-18T17:17:06",
    "name": "[8/8] clk: mediatek: implement dump callbacks",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "fa72ea4bb5cdb2436e92b96ce3ef64ae37bba74e",
    "submitter": {
        "id": 87228,
        "url": "http://patchwork.ozlabs.org/api/1.0/people/87228/?format=api",
        "name": "David Lechner",
        "email": "dlechner@baylibre.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/20251218-clk-mtk-improvements-v1-8-72db131ba148@baylibre.com/mbox/",
    "series": [
        {
            "id": 485889,
            "url": "http://patchwork.ozlabs.org/api/1.0/series/485889/?format=api",
            "date": "2025-12-18T17:16:58",
            "name": "clk: mediatek: implement of_xlate and dump",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/485889/mbox/"
        }
    ],
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2175664/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=baylibre-com.20230601.gappssmtp.com\n header.i=@baylibre-com.20230601.gappssmtp.com header.a=rsa-sha256\n header.s=20230601 header.b=U+a1NE6d;\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=none (p=none dis=none) header.from=baylibre.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=baylibre-com.20230601.gappssmtp.com\n header.i=@baylibre-com.20230601.gappssmtp.com header.b=\"U+a1NE6d\";\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=none (p=none dis=none) header.from=baylibre.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=dlechner@baylibre.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 4dXHVm2HKjz1xty\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 19 Dec 2025 04:20:32 +1100 (AEDT)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id C5549839D7;\n\tThu, 18 Dec 2025 18:18:43 +0100 (CET)",
            "by phobos.denx.de (Postfix, from userid 109)\n id 7389C80077; Thu, 18 Dec 2025 18:18:23 +0100 (CET)",
            "from mail-oa1-x29.google.com (mail-oa1-x29.google.com\n [IPv6:2001:4860:4864:20::29])\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 43324836CE\n for <u-boot@lists.denx.de>; Thu, 18 Dec 2025 18:18:12 +0100 (CET)",
            "by mail-oa1-x29.google.com with SMTP id\n 586e51a60fabf-3f0c93ecf42so1260610fac.0\n for <u-boot@lists.denx.de>; Thu, 18 Dec 2025 09:18:12 -0800 (PST)",
            "from [127.0.1.1] ([2600:8803:e7e4:500:e5ea:76dc:e589:2d5e])\n by smtp.gmail.com with ESMTPSA id\n 006d021491bc7-65cff214d66sm1316372eaf.9.2025.12.18.09.18.10\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 18 Dec 2025 09:18:10 -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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,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=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1766078291;\n x=1766683091;\n darn=lists.denx.de;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:from:to:cc:subject:date:message-id\n :reply-to; bh=dLKwZZC24pumN41pEQsuk9P9tjQkkR3Je9PDljIN3Do=;\n b=U+a1NE6dBDF0JRJEcbiZ9rbNrJufQDtI/iHDM8fyrzAani50T67Lfr8Kit6ZpRk7Jv\n a+ikgmmZEAjCLbJxAYst7yt4Il84AQLFj0qqXR6AWElT3Tzb+s8NfErupOsJ9xahnTmn\n 2hsjX47d61alC05NwMRzTHz+pAbJUSuI9grOMsZgKvay4wkznjmUT7ju3OsSiQZg4cQc\n J+JwvjA1U2wp3N6KOe937cTA/VjsZPERoIPSuZZvEfGPFqvlQhQngROdFC5QT5caZG1h\n /E5tWknacIl+mWMpvCrFJ6dSXoNOsCheMx62PVFj8NYmgDQquzIAUDK6hCyMSiih7rv9\n 7ExQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1766078291; x=1766683091;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to\n :cc:subject:date:message-id:reply-to;\n bh=dLKwZZC24pumN41pEQsuk9P9tjQkkR3Je9PDljIN3Do=;\n b=AjxrqyR1gzzRKG/orNEseC3fynO9whZWqXMth9xqpVNP1hpM2GBdNteMiJvV7GHpyl\n W7zuBO1tFgxqDSjHdrnA1zTmSVeQgBxu1BHDTF9ctxyL0Jvs71rTu73sUUJDFPHc+77o\n yBv3eXZNLuozh8V/9qakb+FMsmqBdO/qRBp7/z9eOXzgso8kPua/yf7ooPmfnT0p7dI9\n 7W9iSJUiA5HDSM4RnhE9P2oXlJqx2U5PY5C6lZzTFKSof+iFT/ApjEiGI+TNxAwPQGGZ\n L+f8FYDznfMaslmKc+S1CzoyFxVaZ0ZwC7jcyHzMR134skiAb9Ekr0Sinat33rTkqbJt\n gBkA==",
        "X-Forwarded-Encrypted": "i=1;\n AJvYcCWcnjfMKlEW50C6QrR14xMDtM2tzOXDgR7E4W8F6drCTuBAV4pTawkMkx+LR//KehI4pztWIY0=@lists.denx.de",
        "X-Gm-Message-State": "AOJu0YwgE7ihrYIz+g5X0mvBxx24TtEFbf3HCB83KowojwPO9gdlvr+P\n qVCZkkaUpZEWy14ExTI24kESjwgvsZHqtK8lAa6A9iivYsa6IdKaUVOzYJcGaVK0NZM=",
        "X-Gm-Gg": "AY/fxX4onk/JCT0KjnoyAVd58F60AeM3R02bxyaaWlKOIy+aR9k/fJ6QdfJJmxfqbRH\n gRc4tvQjNCXj/trY+cGDHLYwBsOTweYPdtiAS/bO2pfWcN8pXDmdpmr1CKYPJvRoP8X+DHJ638N\n N/r4VwXO94XYKfgsBf1pudZ0EZeA9f9F2rKjkSsNXphktNo7cyadDm2WI5nIIqLd4qgdlnB8B/5\n 2auohG+WfNwXRsjD9iZpQ2esy3t5sT+JERv6izyHwt1uk5Ejf+4UP6whxyh4FJ+9xL0/oXJnVJc\n M1HrKYjFYehm+4yn6uxP4x07QnAG92Jl9Vsca99M8VNMoBoL5ds5CX63zc6KhigXbY04UZfzOZH\n yAmVaCidm4VFvjw0UYkqUf+7pHXS0G0G5/WauP6GUtxqoNaU366/6HE+KWP/l0wW086KTJFXrfx\n sl+D5f8bXtR3QlzWo=",
        "X-Google-Smtp-Source": "\n AGHT+IHIOidLd02tQ9z8pAl8LeYyi/3d5bN3yb7XtWYr9Cbp1oKCN8A7QL4hoE+x3To4OnhULdXwDA==",
        "X-Received": "by 2002:a05:6820:6106:b0:65c:fb36:f246 with SMTP id\n 006d021491bc7-65d0e386ec8mr102240eaf.19.1766078290908;\n Thu, 18 Dec 2025 09:18:10 -0800 (PST)",
        "From": "David Lechner <dlechner@baylibre.com>",
        "Date": "Thu, 18 Dec 2025 11:17:06 -0600",
        "Subject": "[PATCH 8/8] clk: mediatek: implement dump callbacks",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "Message-Id": "<20251218-clk-mtk-improvements-v1-8-72db131ba148@baylibre.com>",
        "References": "<20251218-clk-mtk-improvements-v1-0-72db131ba148@baylibre.com>",
        "In-Reply-To": "<20251218-clk-mtk-improvements-v1-0-72db131ba148@baylibre.com>",
        "To": "Lukasz Majewski <lukma@denx.de>, Ryder Lee <ryder.lee@mediatek.com>,\n Weijie Gao <weijie.gao@mediatek.com>,\n Chunfeng Yun <chunfeng.yun@mediatek.com>,\n Igor Belwon <igor.belwon@mentallysanemainliners.org>,\n GSS_MTK_Uboot_upstream <GSS_MTK_Uboot_upstream@mediatek.com>,\n Tom Rini <trini@konsulko.com>",
        "Cc": "Julien Stephan <jstephan@baylibre.com>, u-boot@lists.denx.de,\n David Lechner <dlechner@baylibre.com>",
        "X-Mailer": "b4 0.14.3",
        "X-Developer-Signature": "v=1; a=openpgp-sha256; l=9849; i=dlechner@baylibre.com;\n h=from:subject:message-id;\n bh=rKIQcrfxCiRLbqu0MfsR9wpIbJzyepYas0StyDOKlZ4=;\n b=owEBhAF7/pANAwAKAcLMIAH/AY/AAcsmYgBpRDdE3aW14uUhPslBnxlKDwKo5maaaY5OWZdy0\n 406JSbExRiJAUoEAAEKADQWIQTsGNmeYg6D1pzYaJjCzCAB/wGPwAUCaUQ3RBYcZGxlY2huZXJA\n YmF5bGlicmUuY29tAAoJEMLMIAH/AY/ALwwH/0TcsR78k1dlnh20IaAcRPsSz8qSPShC+dArQs5\n QTOWGMP7zR6jIAk9H25Xd4Ppq1zU9pAzKapIK2GHyoHP901rpkpLeV60Im8ZIssW3FDg6nvNtiH\n /Hpca+yyTt23rfCyA1BvgF0vK0ZRXpyhn2zihtGvShf0eJhMJxv0imEHl1/fjVCIO8mt6bWd00w\n 3Jz5QNu2Wose0Dvs4N2uK+euZ+bWBPa7LhUlWjpu5OBqnbD9DPUXjP1uNNlLUEbEcu6fhJB/cES\n inp3aoSH4RC4TsBew0BhEV2B+TC08+m8jA2w1SwtPmg+85mQhbzLu67j5iwqEfpuSjzhQ3pZtLB\n YarI=",
        "X-Developer-Key": "i=dlechner@baylibre.com; a=openpgp;\n fpr=8A73D82A6A1F509907F373881F8AF88C82F77C03",
        "X-Mailman-Approved-At": "Thu, 18 Dec 2025 18:18:40 +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": "Implement dump callbacks for Mediatek clocks. On these platforms, there\nare 100s of clocks, so it can be easy to miss mistakes. The dump\ncallbacks will be useful for debugging and verifying clock configs.\n\nSigned-off-by: David Lechner <dlechner@baylibre.com>\n---\n drivers/clk/mediatek/clk-mtk.c | 248 +++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 248 insertions(+)",
    "diff": "diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c\nindex 1539dc6cbcc..a3dd18363f6 100644\n--- a/drivers/clk/mediatek/clk-mtk.c\n+++ b/drivers/clk/mediatek/clk-mtk.c\n@@ -193,6 +193,108 @@ static int mtk_clk_mux_set_parent(void __iomem *base, u32 parent,\n \treturn 0;\n }\n \n+#if CONFIG_IS_ENABLED(CMD_CLK)\n+static void mtk_clk_print_dev_parent(struct udevice *parent)\n+{\n+\tprintf(\"Parent device: %s %s\\n\", parent->driver->name, parent->name);\n+}\n+\n+static void mtk_clk_print_mapped_id(int unmapped_id, int mapped_id, bool has_map)\n+{\n+\t/*\n+\t * If there is a ID map, then having unmapped and mapped IDs differ is\n+\t * expected. On the other hand, if there is no map, then they should be\n+\t * the same, and it is a programming error if they differ.\n+\t */\n+\tif (has_map)\n+\t\tprintf(\", (mapped ID: %u)\", mapped_id);\n+\telse if (unmapped_id != mapped_id)\n+\t\tprintf(\", (error! should be %u)\", mapped_id);\n+}\n+\n+static void mtk_clk_print_rate(struct udevice *dev, int mapped_id)\n+{\n+\tstruct clk clk = {\n+\t\t.dev = dev,\n+\t\t.id = mapped_id,\n+\t};\n+\tlong rate = clk_get_rate(&clk);\n+\n+\tif (rate < 0)\n+\t\tprintf(\", error! clk_get_rate() failed: %ld\", rate);\n+\telse\n+\t\tprintf(\", Rate: %lu Hz\", rate);\n+}\n+\n+static void mtk_clk_print_parent(const char *prefix, int parent, u32 flags)\n+{\n+\tconst char *parent_type_str;\n+\n+\tswitch (flags & CLK_PARENT_MASK) {\n+\tcase CLK_PARENT_APMIXED:\n+\t\tparent_type_str = \"apmixedsys\";\n+\t\tbreak;\n+\tcase CLK_PARENT_TOPCKGEN:\n+\t\tparent_type_str = \"topckgen\";\n+\t\tbreak;\n+\tcase CLK_PARENT_INFRASYS:\n+\t\tparent_type_str = \"infrasys\";\n+\t\tbreak;\n+\tcase CLK_PARENT_XTAL:\n+\t\tparent_type_str = \"xtal\";\n+\t\tbreak;\n+\tcase CLK_PARENT_MIXED:\n+\t\tparent_type_str = \"mixed\";\n+\t\tbreak;\n+\tdefault:\n+\t\tparent_type_str = \"default\";\n+\t\tbreak;\n+\t}\n+\n+\tprintf(\"%s%s-%u\", prefix, parent_type_str, parent);\n+}\n+\n+static void mtk_clk_print_single_parent(int parent, u32 flags)\n+{\n+\tmtk_clk_print_parent(\", Parent: \", parent, flags);\n+}\n+\n+static void mtk_clk_print_mux_parents(struct mtk_clk_priv *priv,\n+\t\t\t\t      const struct mtk_composite *mux)\n+{\n+\tconst char *prefix = \"\";\n+\tu32 selected;\n+\tint i;\n+\n+\tprintf(\", Parents: \");\n+\n+\tselected = readl(priv->base + mux->mux_reg);\n+\tselected &= mux->mux_mask << mux->mux_shift;\n+\tselected >>= mux->mux_shift;\n+\n+\t/* Print parents separated by \"/\" and selected parent enclosed in \"*\"s */\n+\tfor (i = 0; i < mux->num_parents; i++) {\n+\t\tif (i == selected) {\n+\t\t\tprintf(\"%s\", prefix);\n+\t\t\tprefix = \"*\";\n+\t\t}\n+\n+\t\tif (mux->flags & CLK_PARENT_MIXED) {\n+\t\t\tconst struct mtk_parent *parent = &mux->parent_flags[i];\n+\n+\t\t\tmtk_clk_print_parent(prefix, parent->id, parent->flags);\n+\t\t} else {\n+\t\t\tmtk_clk_print_parent(prefix, mux->parent[i], mux->flags);\n+\t\t}\n+\n+\t\tprefix = \"/\";\n+\n+\t\tif (i == selected)\n+\t\t\tprintf(\"*\");\n+\t}\n+}\n+#endif\n+\n /* apmixedsys functions */\n \n static const int mtk_apmixedsys_of_xlate(struct clk *clk,\n@@ -437,6 +539,36 @@ static int mtk_apmixedsys_disable(struct clk *clk)\n \treturn 0;\n }\n \n+#if CONFIG_IS_ENABLED(CMD_CLK)\n+static void mtk_apmixedsys_dump(struct udevice *dev)\n+{\n+\tstruct mtk_clk_priv *priv = dev_get_priv(dev);\n+\tconst struct mtk_clk_tree *tree = priv->tree;\n+\tu32 i;\n+\n+\tmtk_clk_print_dev_parent(priv->parent);\n+\n+\tfor (i = 0; i < tree->num_plls; i++) {\n+\t\tconst struct mtk_pll_data *pll = &tree->plls[i];\n+\n+\t\tprintf(\"[PLL%u] DT: %u\", i, pll->id);\n+\t\tmtk_clk_print_mapped_id(pll->id, i, tree->id_offs_map);\n+\t\tmtk_clk_print_rate(dev, i);\n+\t\tprintf(\"\\n\");\n+\t}\n+\n+\tfor (i = 0; i < tree->num_gates; i++) {\n+\t\tconst struct mtk_gate *gate = &tree->gates[i];\n+\n+\t\tprintf(\"[GATE%u] DT: %u\", i, gate->id);\n+\t\tmtk_clk_print_mapped_id(gate->id, i + tree->gates_offs, tree->id_offs_map);\n+\t\tmtk_clk_print_rate(dev, i + tree->gates_offs);\n+\t\tmtk_clk_print_single_parent(gate->parent, gate->flags);\n+\t\tprintf(\"\\n\");\n+\t}\n+}\n+#endif\n+\n /* topckgen functions */\n \n static const int mtk_topckgen_of_xlate(struct clk *clk,\n@@ -651,6 +783,48 @@ static int mtk_common_clk_set_parent(struct clk *clk, struct clk *parent)\n \t\t\t&priv->tree->muxes[clk->id - priv->tree->muxes_offs]);\n }\n \n+#if CONFIG_IS_ENABLED(CMD_CLK)\n+static void mtk_topckgen_dump(struct udevice *dev)\n+{\n+\tstruct mtk_clk_priv *priv = dev_get_priv(dev);\n+\tconst struct mtk_clk_tree *tree = priv->tree;\n+\tu32 i;\n+\n+\tmtk_clk_print_dev_parent(priv->parent);\n+\n+\tfor (i = 0; i < tree->num_fclks; i++) {\n+\t\tconst struct mtk_fixed_clk *fclk = &tree->fclks[i];\n+\n+\t\tprintf(\"[FCLK%u] DT: %u\", i, fclk->id);\n+\t\tmtk_clk_print_mapped_id(fclk->id, i, tree->id_offs_map);\n+\t\tmtk_clk_print_rate(dev, i);\n+\t\t/* FIXME: fclk needs flags to fully determine parent. */\n+\t\tmtk_clk_print_single_parent(fclk->parent, 0);\n+\t\tprintf(\"\\n\");\n+\t}\n+\n+\tfor (i = 0; i < tree->num_fdivs; i++) {\n+\t\tconst struct mtk_fixed_factor *fdiv = &tree->fdivs[i];\n+\n+\t\tprintf(\"[FDIV%u] DT: %u\", i, fdiv->id);\n+\t\tmtk_clk_print_mapped_id(fdiv->id, i + tree->fdivs_offs, tree->id_offs_map);\n+\t\tmtk_clk_print_rate(dev, i + tree->fdivs_offs);\n+\t\tmtk_clk_print_single_parent(fdiv->parent, fdiv->flags);\n+\t\tprintf(\", Mult: %u, Div: %u\\n\", fdiv->mult, fdiv->div);\n+\t}\n+\n+\tfor (i = 0; i < tree->num_muxes; i++) {\n+\t\tconst struct mtk_composite *mux = &tree->muxes[i];\n+\n+\t\tprintf(\"[MUX%u] DT: %u\", i, mux->id);\n+\t\tmtk_clk_print_mapped_id(mux->id, i + tree->muxes_offs, tree->id_offs_map);\n+\t\tmtk_clk_print_rate(dev, i + tree->muxes_offs);\n+\t\tmtk_clk_print_mux_parents(priv, mux);\n+\t\tprintf(\"\\n\");\n+\t}\n+}\n+#endif\n+\n /* infrasys functions */\n \n static const int mtk_infrasys_of_xlate(struct clk *clk,\n@@ -793,6 +967,44 @@ static ulong mtk_infrasys_get_rate(struct clk *clk)\n \treturn rate;\n }\n \n+#if CONFIG_IS_ENABLED(CMD_CLK)\n+static void mtk_infrasys_dump(struct udevice *dev)\n+{\n+\tstruct mtk_clk_priv *priv = dev_get_priv(dev);\n+\tconst struct mtk_clk_tree *tree = priv->tree;\n+\tu32 i;\n+\n+\tmtk_clk_print_dev_parent(priv->parent);\n+\n+\tfor (i = 0; i < tree->num_fdivs; i++) {\n+\t\tconst struct mtk_fixed_factor *fdiv = &tree->fdivs[i];\n+\n+\t\tprintf(\"[FDIV%u] DT: %u\", i, fdiv->id);\n+\t\tmtk_clk_print_mapped_id(fdiv->id, i + tree->fdivs_offs, tree->id_offs_map);\n+\t\tmtk_clk_print_single_parent(fdiv->parent, fdiv->flags);\n+\t\tprintf(\", Mult: %u, Div: %u\\n\", fdiv->mult, fdiv->div);\n+\t}\n+\n+\tfor (i = 0; i < tree->num_muxes; i++) {\n+\t\tconst struct mtk_composite *mux = &tree->muxes[i];\n+\n+\t\tprintf(\"[MUX%u] DT: %u\", i, mux->id);\n+\t\tmtk_clk_print_mapped_id(mux->id, i + tree->muxes_offs, tree->id_offs_map);\n+\t\tmtk_clk_print_mux_parents(priv, mux);\n+\t\tprintf(\"\\n\");\n+\t}\n+\n+\tfor (i = 0; i < tree->num_gates; i++) {\n+\t\tconst struct mtk_gate *gate = &tree->gates[i];\n+\n+\t\tprintf(\"[GATE%u] DT: %u\", i, gate->id);\n+\t\tmtk_clk_print_mapped_id(gate->id, i + tree->gates_offs, tree->id_offs_map);\n+\t\tmtk_clk_print_single_parent(gate->parent, gate->flags);\n+\t\tprintf(\"\\n\");\n+\t}\n+}\n+#endif\n+\n /* CG functions */\n \n static const int mtk_clk_gate_of_xlate(struct clk *clk,\n@@ -869,12 +1081,36 @@ static ulong mtk_clk_gate_get_rate(struct clk *clk)\n \treturn mtk_clk_find_parent_rate(clk, gate->parent, parent);\n }\n \n+#if CONFIG_IS_ENABLED(CMD_CLK)\n+static void mtk_clk_gate_dump(struct udevice *dev)\n+{\n+\tstruct mtk_cg_priv *priv = dev_get_priv(dev);\n+\tconst struct mtk_clk_tree *tree = priv->tree;\n+\tu32 i;\n+\n+\tmtk_clk_print_dev_parent(priv->parent);\n+\n+\tfor (i = 0; i < priv->num_gates; i++) {\n+\t\tconst struct mtk_gate *gate = &priv->gates[i];\n+\n+\t\tprintf(\"[GATE%u] DT: %u\", i, gate->id);\n+\t\tmtk_clk_print_mapped_id(gate->id, i + tree->gates_offs, tree->id_offs_map);\n+\t\tmtk_clk_print_rate(dev, i + tree->gates_offs);\n+\t\tmtk_clk_print_single_parent(gate->parent, gate->flags);\n+\t\tprintf(\"\\n\");\n+\t}\n+}\n+#endif\n+\n const struct clk_ops mtk_clk_apmixedsys_ops = {\n \t.of_xlate = mtk_apmixedsys_of_xlate,\n \t.enable = mtk_apmixedsys_enable,\n \t.disable = mtk_apmixedsys_disable,\n \t.set_rate = mtk_apmixedsys_set_rate,\n \t.get_rate = mtk_apmixedsys_get_rate,\n+#if CONFIG_IS_ENABLED(CMD_CLK)\n+\t.dump = mtk_apmixedsys_dump,\n+#endif\n };\n \n const struct clk_ops mtk_clk_fixed_pll_ops = {\n@@ -882,6 +1118,9 @@ const struct clk_ops mtk_clk_fixed_pll_ops = {\n \t.enable = mtk_dummy_enable,\n \t.disable = mtk_dummy_enable,\n \t.get_rate = mtk_topckgen_get_rate,\n+#if CONFIG_IS_ENABLED(CMD_CLK)\n+\t.dump = mtk_topckgen_dump,\n+#endif\n };\n \n const struct clk_ops mtk_clk_topckgen_ops = {\n@@ -890,6 +1129,9 @@ const struct clk_ops mtk_clk_topckgen_ops = {\n \t.disable = mtk_clk_mux_disable,\n \t.get_rate = mtk_topckgen_get_rate,\n \t.set_parent = mtk_common_clk_set_parent,\n+#if CONFIG_IS_ENABLED(CMD_CLK)\n+\t.dump = mtk_topckgen_dump,\n+#endif\n };\n \n const struct clk_ops mtk_clk_infrasys_ops = {\n@@ -898,6 +1140,9 @@ const struct clk_ops mtk_clk_infrasys_ops = {\n \t.disable = mtk_clk_infrasys_disable,\n \t.get_rate = mtk_infrasys_get_rate,\n \t.set_parent = mtk_common_clk_set_parent,\n+#if CONFIG_IS_ENABLED(CMD_CLK)\n+\t.dump = mtk_infrasys_dump,\n+#endif\n };\n \n const struct clk_ops mtk_clk_gate_ops = {\n@@ -905,6 +1150,9 @@ const struct clk_ops mtk_clk_gate_ops = {\n \t.enable = mtk_clk_gate_enable,\n \t.disable = mtk_clk_gate_disable,\n \t.get_rate = mtk_clk_gate_get_rate,\n+#if CONFIG_IS_ENABLED(CMD_CLK)\n+\t.dump = mtk_clk_gate_dump,\n+#endif\n };\n \n static int mtk_common_clk_init_drv(struct udevice *dev,\n",
    "prefixes": [
        "8/8"
    ]
}