Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/955952/?format=api
{ "id": 955952, "url": "http://patchwork.ozlabs.org/api/patches/955952/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20180810060711.6547-13-jagan@amarulasolutions.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": "<20180810060711.6547-13-jagan@amarulasolutions.com>", "list_archive_url": null, "date": "2018-08-10T06:06:30", "name": "[U-Boot,v2,12/53] clk: sunxi: Add Allwinner R40 CLK driver", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "e0abebd7f9adfd86621cb985df2f14f616a33c02", "submitter": { "id": 69820, "url": "http://patchwork.ozlabs.org/api/people/69820/?format=api", "name": "Jagan Teki", "email": "jagan@amarulasolutions.com" }, "delegate": { "id": 17739, "url": "http://patchwork.ozlabs.org/api/users/17739/?format=api", "username": "jagan", "first_name": "Jagannadha Sutradharudu", "last_name": "Teki", "email": "jagannadh.teki@gmail.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20180810060711.6547-13-jagan@amarulasolutions.com/mbox/", "series": [ { "id": 60190, "url": "http://patchwork.ozlabs.org/api/series/60190/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=60190", "date": "2018-08-10T06:06:18", "name": "clk: Add Allwinner CLK, RESET support", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/60190/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/955952/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/955952/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>)", "ozlabs.org; dmarc=none (p=none dis=none)\n\theader.from=amarulasolutions.com", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=amarulasolutions.com\n\theader.i=@amarulasolutions.com header.b=\"DqPGWp1t\"; \n\tdkim-atps=neutral" ], "Received": [ "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 41mvyD3wsZz9s8f\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 10 Aug 2018 16:15:59 +1000 (AEST)", "by lists.denx.de (Postfix, from userid 105)\n\tid 760AFC21E02; Fri, 10 Aug 2018 06:12:59 +0000 (UTC)", "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id D268BC21D83;\n\tFri, 10 Aug 2018 06:09:28 +0000 (UTC)", "by lists.denx.de (Postfix, from userid 105)\n\tid BEEB7C21DC1; Fri, 10 Aug 2018 06:08:29 +0000 (UTC)", "from mail-pg1-f196.google.com (mail-pg1-f196.google.com\n\t[209.85.215.196])\n\tby lists.denx.de (Postfix) with ESMTPS id 03213C21C51\n\tfor <u-boot@lists.denx.de>; Fri, 10 Aug 2018 06:08:24 +0000 (UTC)", "by mail-pg1-f196.google.com with SMTP id y4-v6so3882928pgp.9\n\tfor <u-boot@lists.denx.de>; Thu, 09 Aug 2018 23:08:23 -0700 (PDT)", "from localhost.localdomain ([183.82.228.250])\n\tby smtp.gmail.com with ESMTPSA id\n\tr23-v6sm16880975pfj.5.2018.08.09.23.08.19\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 09 Aug 2018 23:08:22 -0700 (PDT)" ], "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=RCVD_IN_MSPIKE_H3,\n\tRCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID autolearn=unavailable autolearn_force=no\n\tversion=3.4.0", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=amarulasolutions.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=kEZQ1CAb8/6tBeEVsT0BIB5fZYqyfOgWiOADLKVtIAM=;\n\tb=DqPGWp1t0303OmAEI2F7H19JV4UYfamU1S6s3CjiO5tyC07szhflN5CcMMlc2Q0ej6\n\tXTy5jnHJ5rGVmMXZlrpFoQ8wQqXfBr/e3+3zw5vF8TFUeGxKjXwaylepY7E3uXI/kZAA\n\tw25/m2mD9Br5gYaUEkxBfsUMGVsR3F1nDYp1c=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=kEZQ1CAb8/6tBeEVsT0BIB5fZYqyfOgWiOADLKVtIAM=;\n\tb=EcScViSTjoHorpfJ36018o/w6Kc3ba/FeAorC/G4EOsmFqEG2YSHWbWhvGpYggd1uP\n\tNY5TVqsb5JKjdU/fSk7HUHGn/03HRp5lq1qZqJ9Mv6s4/kCTP2/tTVDiF4RxoqRAmoeP\n\tm6oEl3EsFekLacjwVp/tAspA4UqCmtLI7Qg4jVNoLSzhb9x/e+DaYG8anmo584FfDnpV\n\twedakP5GLmIVQ77GwghsJmtuCFJQhQNAToqnvv+WXtkyuRjC4rEdLukvN5N8bJkqM68K\n\tBmozZL5Z/67Vz02PqtLKr651mWqXIPpDPgZSZ02lPiYWe4Ly/wwaBxK0Zf4X3qQyXk9J\n\tx6Hw==", "X-Gm-Message-State": "AOUpUlEslTMT4zR5UpLDMFOoxPjNo/+ZBelwImmBdvjan0Bcir8FW3tQ\n\tYsjGUS5v+Mmh5XnWol9JiLmMVw==", "X-Google-Smtp-Source": "AA+uWPzi6LcygQ+K/dapCJjseHPI3lN5NemcLhZirDl3S9aCBv0uoVGRsujYNSIQhtqGAyG9q6gZTQ==", "X-Received": "by 2002:a62:2ac8:: with SMTP id\n\tq191-v6mr5561516pfq.139.1533881302542; \n\tThu, 09 Aug 2018 23:08:22 -0700 (PDT)", "From": "Jagan Teki <jagan@amarulasolutions.com>", "To": "Maxime Ripard <maxime.ripard@bootlin.com>,\n\tAndre Przywara <andre.przywara@arm.com>, Chen-Yu Tsai <wens@csie.org>,\n\tIcenowy Zheng <icenowy@aosc.io>", "Date": "Fri, 10 Aug 2018 11:36:30 +0530", "Message-Id": "<20180810060711.6547-13-jagan@amarulasolutions.com>", "X-Mailer": "git-send-email 2.18.0.321.gffc6fa0e3", "In-Reply-To": "<20180810060711.6547-1-jagan@amarulasolutions.com>", "References": "<20180810060711.6547-1-jagan@amarulasolutions.com>", "MIME-Version": "1.0", "Cc": "Tom Rini <trini@konsulko.com>, u-boot@lists.denx.de", "Subject": "[U-Boot] [PATCH v2 12/53] clk: sunxi: Add Allwinner R40 CLK driver", "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>", "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": "Add initial clock driver for Allwinner R40.\n\n- Implement USB bus and USB clocks via ccu_clk_map descriptor\n for R40, so it can accessed in common clk enable and disable\n functions from clk_sunxi.c\n- Implement USB bus and USB resets via ccu_reset_map descriptor\n for R40, so it can accessed in common reset deassert and assert\n functions from reset-sunxi.c\n\nSigned-off-by: Jagan Teki <jagan@amarulasolutions.com>\n---\n drivers/clk/sunxi/Kconfig | 7 +++\n drivers/clk/sunxi/Makefile | 1 +\n drivers/clk/sunxi/clk_r40.c | 89 +++++++++++++++++++++++++++++++++++++\n 3 files changed, 97 insertions(+)\n create mode 100644 drivers/clk/sunxi/clk_r40.c", "diff": "diff --git a/drivers/clk/sunxi/Kconfig b/drivers/clk/sunxi/Kconfig\nindex 90af70d171..c45a4ba378 100644\n--- a/drivers/clk/sunxi/Kconfig\n+++ b/drivers/clk/sunxi/Kconfig\n@@ -44,6 +44,13 @@ config CLK_SUN8I_A83T\n \t This enables common clock driver support for platforms based\n \t on Allwinner A83T SoC.\n \n+config CLK_SUN8I_R40\n+\tbool \"Clock driver for Allwinner R40\"\n+\tdefault MACH_SUN8I_R40\n+\thelp\n+\t This enables common clock driver support for platforms based\n+\t on Allwinner R40 SoC.\n+\n config CLK_SUN8I_H3\n \tbool \"Clock driver for Allwinner H3/H5\"\n \tdefault MACH_SUNXI_H3_H5\ndiff --git a/drivers/clk/sunxi/Makefile b/drivers/clk/sunxi/Makefile\nindex 4a254c8671..61f8b87396 100644\n--- a/drivers/clk/sunxi/Makefile\n+++ b/drivers/clk/sunxi/Makefile\n@@ -11,5 +11,6 @@ obj-$(CONFIG_CLK_SUN5I_A10S) += clk_a10s.o\n obj-$(CONFIG_CLK_SUN6I_A31) += clk_a31.o\n obj-$(CONFIG_CLK_SUN8I_A23) += clk_a23.o\n obj-$(CONFIG_CLK_SUN8I_A83T) += clk_a83t.o\n+obj-$(CONFIG_CLK_SUN8I_R40) += clk_r40.o\n obj-$(CONFIG_CLK_SUN8I_H3) += clk_h3.o\n obj-$(CONFIG_CLK_SUN50I_A64) += clk_a64.o\ndiff --git a/drivers/clk/sunxi/clk_r40.c b/drivers/clk/sunxi/clk_r40.c\nnew file mode 100644\nindex 0000000000..746d6734b2\n--- /dev/null\n+++ b/drivers/clk/sunxi/clk_r40.c\n@@ -0,0 +1,89 @@\n+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\n+/*\n+ * Copyright (C) 2018 Amarula Solutions.\n+ * Author: Jagan Teki <jagan@amarulasolutions.com>\n+ */\n+\n+#include <common.h>\n+#include <clk-uclass.h>\n+#include <dm.h>\n+#include <errno.h>\n+#include <asm/arch/ccu.h>\n+#include <dt-bindings/clock/sun8i-r40-ccu.h>\n+#include <dt-bindings/reset/sun8i-r40-ccu.h>\n+\n+static struct ccu_clk_map r40_clks[] = {\n+\t[CLK_BUS_OTG]\t\t= { 0x060, BIT(25), NULL },\n+\t[CLK_BUS_EHCI0]\t\t= { 0x060, BIT(26), NULL },\n+\t[CLK_BUS_EHCI1]\t\t= { 0x060, BIT(27), NULL },\n+\t[CLK_BUS_EHCI2]\t\t= { 0x060, BIT(28), NULL },\n+\t[CLK_BUS_OHCI0]\t\t= { 0x060, BIT(29), NULL },\n+\t[CLK_BUS_OHCI1]\t\t= { 0x060, BIT(30), NULL },\n+\t[CLK_BUS_OHCI2]\t\t= { 0x060, BIT(31), NULL },\n+\n+\n+\t[CLK_USB_PHY0]\t\t= { 0x0cc, BIT(8), NULL },\n+\t[CLK_USB_PHY1]\t\t= { 0x0cc, BIT(9), NULL },\n+\t[CLK_USB_PHY2]\t\t= { 0x0cc, BIT(10), NULL },\n+\t[CLK_USB_OHCI0]\t\t= { 0x0cc, BIT(16), NULL },\n+\t[CLK_USB_OHCI1]\t\t= { 0x0cc, BIT(17), NULL },\n+\t[CLK_USB_OHCI2]\t\t= { 0x0cc, BIT(18), NULL },\n+};\n+\n+static struct ccu_reset_map r40_resets[] = {\n+\t[RST_USB_PHY0]\t\t= { 0x0cc, BIT(0) },\n+\t[RST_USB_PHY1]\t\t= { 0x0cc, BIT(1) },\n+\t[RST_USB_PHY2]\t\t= { 0x0cc, BIT(2) },\n+\n+\t[RST_BUS_OTG]\t\t= { 0x2c0, BIT(25) },\n+\t[RST_BUS_EHCI0]\t\t= { 0x2c0, BIT(26) },\n+\t[RST_BUS_EHCI1]\t\t= { 0x2c0, BIT(27) },\n+\t[RST_BUS_EHCI2]\t\t= { 0x2c0, BIT(28) },\n+\t[RST_BUS_OHCI0]\t\t= { 0x2c0, BIT(29) },\n+\t[RST_BUS_OHCI1]\t\t= { 0x2c0, BIT(30) },\n+\t[RST_BUS_OHCI2]\t\t= { 0x2c0, BIT(31) },\n+};\n+\n+static const struct ccu_desc sun8i_r40_ccu_desc = {\n+\t.clks = r40_clks,\n+\t.num_clks = ARRAY_SIZE(r40_clks),\n+\n+\t.resets = r40_resets,\n+\t.num_resets = ARRAY_SIZE(r40_resets),\n+};\n+\n+static int r40_clk_probe(struct udevice *dev)\n+{\n+\tstruct sunxi_clk_priv *priv = dev_get_priv(dev);\n+\n+\tpriv->base = dev_read_addr_ptr(dev);\n+\tif (!priv->base)\n+\t\treturn -ENOMEM;\n+\n+\tpriv->desc = (const struct ccu_desc *)dev_get_driver_data(dev);\n+\tif (!priv->desc)\n+\t\treturn -EINVAL;\n+\n+\treturn 0;\n+}\n+\n+static int r40_clk_bind(struct udevice *dev)\n+{\n+\treturn sunxi_reset_bind(dev, 80);\n+}\n+\n+static const struct udevice_id r40_clk_ids[] = {\n+\t{ .compatible = \"allwinner,sun8i-r40-ccu\",\n+\t .data = (ulong)&sun8i_r40_ccu_desc },\n+\t{ }\n+};\n+\n+U_BOOT_DRIVER(clk_sun8i_r40) = {\n+\t.name\t\t= \"sun8i_r40_ccu\",\n+\t.id\t\t= UCLASS_CLK,\n+\t.of_match\t= r40_clk_ids,\n+\t.priv_auto_alloc_size\t= sizeof(struct sunxi_clk_priv),\n+\t.ops\t\t= &sunxi_clk_ops,\n+\t.probe\t\t= r40_clk_probe,\n+\t.bind\t\t= r40_clk_bind,\n+};\n", "prefixes": [ "U-Boot", "v2", "12/53" ] }