Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2218611/?format=api
{ "id": 2218611, "url": "http://patchwork.ozlabs.org/api/patches/2218611/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260401-casey-ccf-clk-prep-v2-7-16a78c8c62da@linaro.org/", "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": "<20260401-casey-ccf-clk-prep-v2-7-16a78c8c62da@linaro.org>", "list_archive_url": null, "date": "2026-04-01T14:34:08", "name": "[v2,7/7] clk: compat: add clk (un)prepare and associated functions", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "668be6a49a08cf72411c4b559c8b8809d2f2ddfd", "submitter": { "id": 90679, "url": "http://patchwork.ozlabs.org/api/people/90679/?format=api", "name": "Casey Connolly", "email": "casey.connolly@linaro.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260401-casey-ccf-clk-prep-v2-7-16a78c8c62da@linaro.org/mbox/", "series": [ { "id": 498343, "url": "http://patchwork.ozlabs.org/api/series/498343/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=498343", "date": "2026-04-01T14:34:02", "name": "clk: prepare for adding Linux CCF port", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/498343/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2218611/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2218611/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=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=ewzWSPqS;\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=linaro.org", "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=linaro.org header.i=@linaro.org header.b=\"ewzWSPqS\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=linaro.org", "phobos.denx.de;\n spf=pass smtp.mailfrom=casey.connolly@linaro.org" ], "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 4fm6wL4qGWz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 02 Apr 2026 01:35:30 +1100 (AEDT)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id C9AD08414B;\n\tWed, 1 Apr 2026 16:34:27 +0200 (CEST)", "by phobos.denx.de (Postfix, from userid 109)\n id 60085840F1; Wed, 1 Apr 2026 16:34:25 +0200 (CEST)", "from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com\n [IPv6:2a00:1450:4864:20::32a])\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 D9BC18414B\n for <u-boot@lists.denx.de>; Wed, 1 Apr 2026 16:34:21 +0200 (CEST)", "by mail-wm1-x32a.google.com with SMTP id\n 5b1f17b1804b1-486fb14227cso92522975e9.3\n for <u-boot@lists.denx.de>; Wed, 01 Apr 2026 07:34:21 -0700 (PDT)", "from lion.localdomain (p4fc3dd86.dip0.t-ipconnect.de.\n [79.195.221.134]) by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-4887e80a63esm161821795e9.3.2026.04.01.07.34.20\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 01 Apr 2026 07:34:20 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,\n SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1775054061; x=1775658861; 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=UzL2sauUwr+llsDzghXaGJvUYu2Z/A1MC81/qWtrgGU=;\n b=ewzWSPqSR31WbUyT4S1vtjZyb3yvwLM3rxwhO6vtS1YrqNttJgxVtzzTYMvg7dUUw1\n 8TSsjwA/OPIe1igUF+tscjrfcoNhsZikfqoAtQON5P6c+9wRbkriOkTkmIfYBsvJJbS3\n eGbuOx5OKJj6OYSL/5rvbd8ER0I2a6xR9pwTMRQqUT6qQTfsaoXPxUUlheStfladEepo\n x7bYRPY+o4nGFpLYVp7dO0vWPh8bt0+Zqim/owMz3IyfRNe7irl+O2M5HyfaNOzYPMAk\n GcK4hTZ2o/y/bg6X+1xb2h6wIZafjeUm6BHrOTW5IYnVTjqZJdfNInHNqx7QuSVzoAE8\n C7Nw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775054061; x=1775658861;\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=UzL2sauUwr+llsDzghXaGJvUYu2Z/A1MC81/qWtrgGU=;\n b=p4mwI2Bal1qbFOtPPx40tnR4t90GQObKy5nf5cPEX4WGGenvKhl/b7Ei+p9+fPuDSG\n 1NSNydD2wNlphkedtLgHnrRqHX77auvFAcmmlFyweQZQjopfkYnWJzsPEWfgDNAYIlgp\n RJU9Es8V7Q+NMNUV24dZfxiffxHkm95HG+PRltJZAOnMqflmdx61bBil7pmKFArsEx1m\n +4srnG6od0Z21+Qx6/J48uiVqCNQ1Z38qFstxc+iXVfp3Akl3h7XoKejytYvX/KsmZU2\n D+DfM4T77ecr+3boYfw8sXY7qO7shS2X0C3hypUa7mqVh2EZ7suGuWEBA+w7Yx7FhVff\n Fr7g==", "X-Forwarded-Encrypted": "i=1;\n AJvYcCVPsgSpGTg8qx2t0KoFXiQe4IFQ+gzDkuxxmHiPKkyVGY9VO/pbeZ2XZmFsu6QO282uleWRDEE=@lists.denx.de", "X-Gm-Message-State": "AOJu0YyTxgZ01XtX5MMZcdv2HvAns4WwDxOCSs7XntAHjj4qIe8CLMVg\n nECZ9+CsVRdbRB/5Ubzvh9QJw8blF2GIQpVm/Qbff/vkJWggBZi8etFEeA8gQ5umlZo=", "X-Gm-Gg": "ATEYQzxaVXHp4qF54Y8ID00LQrSIVZE4X4D5e90PJxk2vAE31ejz6zRuYURTrcbcfXN\n trC48E0+Xhd6IXu63ogIJ8lHy4UN5Dr7BdE9I9wNo04PUpkB9qHz0+HzWyIuvyO44FRnzXp7joW\n oXhJMcfn50vr3M48ChKnOiUlcY946vz48yGUiyudTeBXb/YOcKt5WB0dGRUlRNM/bN6pM0vw937\n xOzJG79VD60DoDsvvn/f6erJzTrijQvcpksBzUxIwKHcHLJwjYFaxias0A4eAuKmy0HkWLJ5qJN\n 11LAQzHwqzUHN16CnsxCb6eo+fnopsLWku+eNyDVmbZ2OO9HCJyYn1SQGdglG8FNGedZqV/CqpW\n yjpYKCA8I+xjjIIdV8Qw6KxJPLNgZh+eGzz+iNByLOaXP30nKglwmpsOOpbx9pR/qnz1UGQcy+6\n RBKvtFIUfLwoSOh1YIKHznNB6KdN6SngStq42KKo05v6kOD7st+4ycMujFO5lM6qRz4wej", "X-Received": "by 2002:a05:600c:1e02:b0:487:4eb:d125 with SMTP id\n 5b1f17b1804b1-48883575cc9mr75812185e9.9.1775054061172;\n Wed, 01 Apr 2026 07:34:21 -0700 (PDT)", "From": "Casey Connolly <casey.connolly@linaro.org>", "Date": "Wed, 01 Apr 2026 16:34:08 +0200", "Subject": "[PATCH v2 7/7] clk: compat: add clk (un)prepare and associated\n functions", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "7bit", "Message-Id": "<20260401-casey-ccf-clk-prep-v2-7-16a78c8c62da@linaro.org>", "References": "<20260401-casey-ccf-clk-prep-v2-0-16a78c8c62da@linaro.org>", "In-Reply-To": "<20260401-casey-ccf-clk-prep-v2-0-16a78c8c62da@linaro.org>", "To": "Tom Rini <trini@konsulko.com>, Lukasz Majewski <lukma@denx.de>,\n Marek Vasut <marex@denx.de>", "Cc": "Casey Connolly <casey.connolly@linaro.org>,\n Neil Armstrong <neil.armstrong@linaro.org>,\n Quentin Schulz <quentin.schulz@cherry.de>,\n Mattijs Korpershoek <mkorpershoek@kernel.org>, u-boot@lists.denx.de,\n u-boot-amlogic@groups.io, u-boot-qcom@groups.io", "X-Mailer": "b4 0.15-dev-47773", "X-Developer-Signature": "v=1; a=openpgp-sha256; l=3067;\n i=casey.connolly@linaro.org; h=from:subject:message-id;\n bh=IDjDTfUKfPC9O3Xt5VwKw5S4av9GhFWz+Ya5oltXAzA=;\n b=owGbwMvMwCFYaeA6f6eBkTjjabUkhsyzOo9ZHsuuWPv1vMOe4KdrTQu1NAVezkic5cPxL9KnK\n XavsvWvjlIWBkEOBlkxRRbxE8ssm9ZettfYvuACzBxWJpAhDFycAjCRl+aMDM3+VaIGy17ZvNxg\n 57ir2/ZhVWevn0mn6VXLVX6aqo27khj++ymtlTn4mD2ituSnwrT35qmmvbzFnGumnvR+Lvzf2zI\n nDwA=", "X-Developer-Key": "i=casey.connolly@linaro.org; a=openpgp;\n fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47", "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": "Introduce clk_prepare/prepare_enable as well as unprepare and bulk\nassociated functions. These are just stubs but will be used with\nCCF_FULL.\n\nSigned-off-by: Casey Connolly <casey.connolly@linaro.org>\n---\n drivers/clk/clk-uclass.c | 7 +++++\n include/clk.h | 68 ++++++++++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 75 insertions(+)", "diff": "diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c\nindex 095329e25f15..e960d2ad2383 100644\n--- a/drivers/clk/clk-uclass.c\n+++ b/drivers/clk/clk-uclass.c\n@@ -837,8 +837,15 @@ struct clk *devm_clk_get(struct udevice *dev, const char *id)\n \n \treturn clk;\n }\n \n+int clk_prepare(struct clk *clk)\n+{\n+\treturn 0;\n+}\n+\n+void clk_unprepare(struct clk *clk) { }\n+\n int clk_uclass_post_probe(struct udevice *dev)\n {\n \t/*\n \t * when a clock provider is probed. Call clk_set_defaults()\ndiff --git a/include/clk.h b/include/clk.h\nindex 0520032f692c..6ae033259cb1 100644\n--- a/include/clk.h\n+++ b/include/clk.h\n@@ -514,8 +514,35 @@ long clk_set_rate(struct clk *clk, ulong rate);\n * Return: new rate, or -ve error code.\n */\n int clk_set_parent(struct clk *clk, struct clk *parent);\n \n+/**\n+ * clk_prepare - prepare a clock source\n+ * @clk: clock source\n+ *\n+ * This prepares the clock source for use.\n+ *\n+ * Must not be called from within atomic context.\n+ *\n+ * U-Boot: this is a no-op unless CCF_FULL is enabled.\n+ */\n+int clk_prepare(struct clk *clk);\n+\n+int clk_prepare_bulk(struct clk_bulk *clks);\n+\n+/**\n+ * clk_unprepare - undo preparation of a clock source\n+ * @clk: clock source\n+ *\n+ * This undoes a previously prepared clock. The caller must balance\n+ * the number of prepare and unprepare calls.\n+ *\n+ * Must not be called from within atomic context.\n+ */\n+void clk_unprepare(struct clk *clk);\n+\n+int clk_unprepare_bulk(struct clk_bulk *clks);\n+\n /**\n * clk_enable() - Enable (turn on) a clock.\n * @clk:\tA clock struct that was previously successfully requested by\n *\t\tclk_request/get_by_*().\n@@ -550,8 +577,49 @@ int clk_disable(struct clk *clk);\n * Return: zero on success, or -ve error code.\n */\n int clk_disable_bulk(struct clk_bulk *bulk);\n \n+static inline int clk_prepare_enable(struct clk *clk)\n+{\n+\tint ret;\n+\n+\tret = clk_prepare(clk);\n+\tif (!ret)\n+\t\tret = clk_enable(clk);\n+\n+\treturn ret;\n+}\n+\n+static inline int clk_disable_unprepare(struct clk *clk)\n+{\n+\tint ret;\n+\n+\tret = clk_disable(clk);\n+\tif (!ret)\n+\t\tclk_unprepare(clk);\n+\treturn ret;\n+}\n+\n+static inline int clk_prepare_enable_bulk(struct clk_bulk *clks)\n+{\n+\tint ret;\n+\n+\tret = clk_prepare_bulk(clks);\n+\tif (!ret)\n+\t\tret = clk_enable_bulk(clks);\n+\treturn ret;\n+}\n+\n+static inline int clk_disable_unprepare_bulk(struct clk_bulk *clks)\n+{\n+\tint ret;\n+\n+\tret = clk_disable_bulk(clks);\n+\tif (!ret)\n+\t\tret = clk_unprepare_bulk(clks);\n+\treturn ret;\n+}\n+\n /**\n * clk_is_match - check if two clk's point to the same hardware clock\n * @p: clk compared against q\n * @q: clk compared against p\n", "prefixes": [ "v2", "7/7" ] }