Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/812581/?format=api
{ "id": 812581, "url": "http://patchwork.ozlabs.org/api/patches/812581/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1505160270-10650-3-git-send-email-philipp.tomsich@theobroma-systems.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": "<1505160270-10650-3-git-send-email-philipp.tomsich@theobroma-systems.com>", "list_archive_url": null, "date": "2017-09-11T20:04:10", "name": "[U-Boot,v3,02/19] dm: timer: Convert to livetree", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "75987f475f34298477a8ddf09f984acad8f3f16d", "submitter": { "id": 53488, "url": "http://patchwork.ozlabs.org/api/people/53488/?format=api", "name": "Philipp Tomsich", "email": "philipp.tomsich@theobroma-systems.com" }, "delegate": { "id": 69486, "url": "http://patchwork.ozlabs.org/api/users/69486/?format=api", "username": "ptomsich", "first_name": "Philipp", "last_name": "Tomsich", "email": "philipp.tomsich@theobroma-systems.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/1505160270-10650-3-git-send-email-philipp.tomsich@theobroma-systems.com/mbox/", "series": [ { "id": 2559, "url": "http://patchwork.ozlabs.org/api/series/2559/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=2559", "date": "2017-09-11T20:04:11", "name": "rockchip: convert the RK3368 to OF_LIVE and validate on the RK3368-uQ7", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/2559/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/812581/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/812581/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\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)", "Received": [ "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xrf860nJVz9sBZ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 12 Sep 2017 06:06:30 +1000 (AEST)", "by lists.denx.de (Postfix, from userid 105)\n\tid D1724C21F94; Mon, 11 Sep 2017 20:05:02 +0000 (UTC)", "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id F1C79C21F1D;\n\tMon, 11 Sep 2017 20:04:44 +0000 (UTC)", "by lists.denx.de (Postfix, from userid 105)\n\tid 1AC64C21E31; Mon, 11 Sep 2017 20:04:42 +0000 (UTC)", "from mail.theobroma-systems.com (vegas.theobroma-systems.com\n\t[144.76.126.164])\n\tby lists.denx.de (Postfix) with ESMTPS id B0BFFC21E31\n\tfor <u-boot@lists.denx.de>; Mon, 11 Sep 2017 20:04:42 +0000 (UTC)", "from [86.59.122.178] (port=59228 helo=android.lan)\n\tby mail.theobroma-systems.com with esmtpsa\n\t(TLS1.2:RSA_AES_128_CBC_SHA256:128)\n\t(Exim 4.80) (envelope-from <philipp.tomsich@theobroma-systems.com>)\n\tid 1drUwg-0003kn-PZ; Mon, 11 Sep 2017 22:04:38 +0200" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=0.0 required=5.0 tests=none autolearn=unavailable\n\tautolearn_force=no version=3.4.0", "From": "Philipp Tomsich <philipp.tomsich@theobroma-systems.com>", "To": "u-boot@lists.denx.de", "Date": "Mon, 11 Sep 2017 22:04:10 +0200", "Message-Id": "<1505160270-10650-3-git-send-email-philipp.tomsich@theobroma-systems.com>", "X-Mailer": "git-send-email 2.1.4", "In-Reply-To": "<1505160270-10650-1-git-send-email-philipp.tomsich@theobroma-systems.com>", "References": "<1505160270-10650-1-git-send-email-philipp.tomsich@theobroma-systems.com>", "Cc": "Vlad Zakharov <vzakhar@synopsys.com>,\n\tZakharov Vlad <Vladislav.Zakharov@synopsys.com>,\n\tKlaus Goger <klaus.goger@theobroma-systems.com>", "Subject": "[U-Boot] [PATCH v3 02/19] dm: timer: Convert to livetree", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.18", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<http://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\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>" }, "content": "This updates dm_timer_init to support a live tree and deals with\nsome fallout (i.e. the need to restructure the code such, that we\ndon't need multiple discontinuous #if CONFIG_IS_ENABLED blocks).\n\nSigned-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>\nReviewed-by: Simon Glass <sjg@chromium.org>\nAcked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>\n---\n\nChanges in v3: None\nChanges in v2: None\n\n drivers/timer/timer-uclass.c | 45 ++++++++++++++++++++++----------------------\n 1 file changed, 23 insertions(+), 22 deletions(-)", "diff": "diff --git a/drivers/timer/timer-uclass.c b/drivers/timer/timer-uclass.c\nindex a84755f..62d6f0b 100644\n--- a/drivers/timer/timer-uclass.c\n+++ b/drivers/timer/timer-uclass.c\n@@ -8,6 +8,7 @@\n #include <dm.h>\n #include <dm/lists.h>\n #include <dm/device-internal.h>\n+#include <dm/root.h>\n #include <clk.h>\n #include <errno.h>\n #include <timer.h>\n@@ -54,9 +55,10 @@ static int timer_pre_probe(struct udevice *dev)\n \t\tif (IS_ERR_VALUE(ret))\n \t\t\treturn ret;\n \t\tuc_priv->clock_rate = ret;\n-\t} else\n-\t\tuc_priv->clock_rate = fdtdec_get_int(gd->fdt_blob,\n-\t\t\t\tdev_of_offset(dev),\t\"clock-frequency\", 0);\n+\t} else {\n+\t\tuc_priv->clock_rate =\n+\t\t\tdev_read_u32_default(dev, \"clock-frequency\", 0);\n+\t}\n #endif\n \n \treturn 0;\n@@ -83,9 +85,8 @@ u64 timer_conv_64(u32 count)\n \n int notrace dm_timer_init(void)\n {\n-\t__maybe_unused const void *blob = gd->fdt_blob;\n \tstruct udevice *dev = NULL;\n-\tint node = -ENOENT;\n+\t__maybe_unused ofnode node;\n \tint ret;\n \n \tif (gd->timer)\n@@ -93,27 +94,27 @@ int notrace dm_timer_init(void)\n \n #if !CONFIG_IS_ENABLED(OF_PLATDATA)\n \t/* Check for a chosen timer to be used for tick */\n-\tnode = fdtdec_get_chosen_node(blob, \"tick-timer\");\n+\tnode = ofnode_get_chosen_node(\"tick-timer\");\n+\n+\tif (ofnode_valid(node) &&\n+\t uclass_get_device_by_ofnode(UCLASS_TIMER, node, &dev)) {\n+\t\t/*\n+\t\t * If the timer is not marked to be bound before\n+\t\t * relocation, bind it anyway.\n+\t\t */\n+\t\tif (!lists_bind_fdt(dm_root(), node, &dev)) {\n+\t\t\tret = device_probe(dev);\n+\t\t\tif (ret)\n+\t\t\t\treturn ret;\n+\t\t}\n+\t}\n #endif\n-\tif (node < 0) {\n-\t\t/* No chosen timer, trying first available timer */\n+\n+\tif (!dev) {\n+\t\t/* Fall back to the first available timer */\n \t\tret = uclass_first_device_err(UCLASS_TIMER, &dev);\n \t\tif (ret)\n \t\t\treturn ret;\n-\t} else {\n-\t\tif (uclass_get_device_by_of_offset(UCLASS_TIMER, node, &dev)) {\n-\t\t\t/*\n-\t\t\t * If the timer is not marked to be bound before\n-\t\t\t * relocation, bind it anyway.\n-\t\t\t */\n-\t\t\tif (node > 0 &&\n-\t\t\t !lists_bind_fdt(gd->dm_root, offset_to_ofnode(node),\n-\t\t\t\t\t &dev)) {\n-\t\t\t\tret = device_probe(dev);\n-\t\t\t\tif (ret)\n-\t\t\t\t\treturn ret;\n-\t\t\t}\n-\t\t}\n \t}\n \n \tif (dev) {\n", "prefixes": [ "U-Boot", "v3", "02/19" ] }