{"id":812913,"url":"http://patchwork.ozlabs.org/api/patches/812913/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/1505230257-5291-2-git-send-email-philipp.tomsich@theobroma-systems.com/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/projects/18/?format=json","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":"<1505230257-5291-2-git-send-email-philipp.tomsich@theobroma-systems.com>","list_archive_url":null,"date":"2017-09-12T15:30:56","name":"[U-Boot,RESEND,1/2] rockchip: clk: rk3399: add clk_enable function and support USB HOST0/1","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"fd67b77a57241c51643c62bcd4d53844b9f22f10","submitter":{"id":53488,"url":"http://patchwork.ozlabs.org/api/people/53488/?format=json","name":"Philipp Tomsich","email":"philipp.tomsich@theobroma-systems.com"},"delegate":{"id":69486,"url":"http://patchwork.ozlabs.org/api/users/69486/?format=json","username":"ptomsich","first_name":"Philipp","last_name":"Tomsich","email":"philipp.tomsich@theobroma-systems.com"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/1505230257-5291-2-git-send-email-philipp.tomsich@theobroma-systems.com/mbox/","series":[{"id":2727,"url":"http://patchwork.ozlabs.org/api/series/2727/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/list/?series=2727","date":"2017-09-12T15:30:57","name":"rockchip: rk3399-puma: migrate from 'rockchip, vbus-gpio' to a fixed regulator","version":1,"mbox":"http://patchwork.ozlabs.org/series/2727/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/812913/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/812913/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 3xs80p1Zmrz9ryT\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 01:31:54 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 049C6C221A4; Tue, 12 Sep 2017 15:31:40 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 1224AC22183;\n\tTue, 12 Sep 2017 15:31:08 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 729F0C21EC9; Tue, 12 Sep 2017 15:31:05 +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 2837EC21EED\n\tfor <u-boot@lists.denx.de>; Tue, 12 Sep 2017 15:31:05 +0000 (UTC)","from [86.59.122.178] (port=59696 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 1drn9S-0007Vm-7d; Tue, 12 Sep 2017 17:31:02 +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":"Tue, 12 Sep 2017 17:30:56 +0200","Message-Id":"<1505230257-5291-2-git-send-email-philipp.tomsich@theobroma-systems.com>","X-Mailer":"git-send-email 2.1.4","In-Reply-To":"<1505230257-5291-1-git-send-email-philipp.tomsich@theobroma-systems.com>","References":"<1505230257-5291-1-git-send-email-philipp.tomsich@theobroma-systems.com>","Cc":"Jacob Chen <jacob2.chen@rock-chips.com>,\n\tKlaus Goger <klaus.goger@theobroma-systems.com>","Subject":"[U-Boot] [RESEND PATCH 1/2] rockchip: clk: rk3399: add clk_enable\n\tfunction and support USB HOST0/1","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":"The generic ehci-driver (ehci-generic.c) will try to enable the clocks\nlisted in the DTSI. If this fails (e.g. due to clk_enable not being\nimplemented in a driver and -ENOSYS being returned by the clk-uclass),\nthe driver will bail our and print an error message.\n\nThis implements a minimal clk_enable for the RK3399 and supports the\nclocks mandatory for the EHCI controllers; as these are enabled by\ndefault we simply return success.\n\nSigned-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>\n---\n\n drivers/clk/rockchip/clk_rk3399.c | 15 +++++++++++++++\n 1 file changed, 15 insertions(+)","diff":"diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c\nindex 04f0b3f..a2a1607 100644\n--- a/drivers/clk/rockchip/clk_rk3399.c\n+++ b/drivers/clk/rockchip/clk_rk3399.c\n@@ -950,9 +950,24 @@ static ulong rk3399_clk_set_rate(struct clk *clk, ulong rate)\n \treturn ret;\n }\n \n+static int rk3399_clk_enable(struct clk *clk)\n+{\n+\tswitch (clk->id) {\n+\tcase HCLK_HOST0:\n+\tcase HCLK_HOST0_ARB:\n+\tcase HCLK_HOST1:\n+\tcase HCLK_HOST1_ARB:\n+\t\treturn 0;\n+\t}\n+\n+\tdebug(\"%s: unsupported clk %ld\\n\", __func__, clk->id);\n+\treturn -ENOENT;\n+}\n+\n static struct clk_ops rk3399_clk_ops = {\n \t.get_rate = rk3399_clk_get_rate,\n \t.set_rate = rk3399_clk_set_rate,\n+\t.enable = rk3399_clk_enable,\n };\n \n static int rk3399_clk_probe(struct udevice *dev)\n","prefixes":["U-Boot","RESEND","1/2"]}