From patchwork Mon Jan 8 02:17:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Lechner X-Patchwork-Id: 10148759 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A7C6360210 for ; Mon, 8 Jan 2018 02:29:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9340E2876D for ; Mon, 8 Jan 2018 02:29:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 881F3287F9; Mon, 8 Jan 2018 02:29:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B28082876D for ; Mon, 8 Jan 2018 02:29:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=nY8zK741zAPwpwkaYfulhEUHKxnq0M0nks4WkctXeyY=; b=Hf8L9qh92OHxBNWbmLr9oVtong fZQjWD1NcgfebQ7M9+qK07EaIOGUHnAq0DBoNBw+o0GSThiCpY6lqs52aOdj3/3JVgvs+NpDeXQCK LIiKh8pbZRkd9x/s7nKlcQpCCbo1KYmbKdiIlKHHVCAAoh6+/TZKbmpH8fGd2xIfoOBniuHnql4X6 iuZ3KbpUlVmniOSPzeLk+ruj042AXdYOs0pqIzj9QepMEiPeEc0sG6nWgnX9FVl5HfhsHY/R0goHc iyegzPQGpC5A1H+hwR+FXGXCK3wVsvW+e8mhKMgf+veeUTK6AgNSdvVMDY0f5HjoI+9y+X9Yjz7pf bczsEUtw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYNBp-0000ZJ-Bq; Mon, 08 Jan 2018 02:29:29 +0000 Received: from vern.gendns.com ([206.190.152.46]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYN1a-0008Lj-Vv for linux-arm-kernel@lists.infradead.org; Mon, 08 Jan 2018 02:19:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject :Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=bGlntkHMN9sRKMRsys56069Ia6wkM5vvLC/FWswK3Rk=; b=N28Eler7jBSCqr4LVaZEWDgqh DDnMcWPl7jPe2Uzrk1aYAKAyXQui+UCByihaf8w4pRlOO2plP8ypO+FoHwXDgolabtaXffVlw2+is UJhYztNytmi2IX60DlQ+NLDqZHGzZxe1V5HV6uW5ZmT2meaEGXYTXJeWXNzWa3s2Rt5xp86EOAXC5 BhZ2opM83ykusRHf/ssb5sH9rtSjsKSKczDPRHI5zd7ftIbCigTBn0dnU2qblCsM27KDd1FAfzMB5 VQ0xKrN3ONP4uvOj09jAkYlC2a9L42VVAGxJdAW4qpjeFf1QGK3SUqj1xR2m707UZBpu5tnX26af9 /BRoHWWyg==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:53904 helo=freyr.lechnology.com) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-SHA256:128) (Exim 4.89) (envelope-from ) id 1eYN1Q-0009GR-Jl; Sun, 07 Jan 2018 21:18:45 -0500 From: David Lechner To: linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 21/44] clk: davinci: New driver for TI DA8XX USB PHY clocks Date: Sun, 7 Jan 2018 20:17:20 -0600 Message-Id: <1515377863-20358-22-git-send-email-david@lechnology.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515377863-20358-1-git-send-email-david@lechnology.com> References: <1515377863-20358-1-git-send-email-david@lechnology.com> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - lists.infradead.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180107_181856_234562_CEF856A5 X-CRM114-Status: GOOD ( 18.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , David Lechner , Kevin Hilman , Stephen Boyd , Michael Turquette , Sekhar Nori , linux-kernel@vger.kernel.org, Rob Herring , Adam Ford MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This adds a new driver for the USB PHY clocks in the CFGCHIP2 syscon register on TI DA8XX-type SoCs. The USB0 (USB 2.0) PHY clock is an interesting case because it calls clk_enable() in a reentrant way. The USB 2.0 PSC only has to be enabled temporarily while we are locking the PLL, which takes place during the clk_enable() callback. Signed-off-by: David Lechner --- drivers/clk/davinci/Makefile | 1 + drivers/clk/davinci/da8xx-usb-phy-clk.c | 425 ++++++++++++++++++++++++++++++++ include/linux/clk/davinci.h | 13 + 3 files changed, 439 insertions(+) create mode 100644 drivers/clk/davinci/da8xx-usb-phy-clk.c diff --git a/drivers/clk/davinci/Makefile b/drivers/clk/davinci/Makefile index 11178b7..4c772a7 100644 --- a/drivers/clk/davinci/Makefile +++ b/drivers/clk/davinci/Makefile @@ -2,6 +2,7 @@ ifeq ($(CONFIG_COMMON_CLK), y) obj-$(CONFIG_ARCH_DAVINCI_DA8XX) += da8xx-cfgchip.o +obj-$(CONFIG_ARCH_DAVINCI_DA8XX) += da8xx-usb-phy-clk.o obj-y += pll.o obj-$(CONFIG_ARCH_DAVINCI_DA830) += pll-da830.o diff --git a/drivers/clk/davinci/da8xx-usb-phy-clk.c b/drivers/clk/davinci/da8xx-usb-phy-clk.c new file mode 100644 index 0000000..fc6ea07 --- /dev/null +++ b/drivers/clk/davinci/da8xx-usb-phy-clk.c @@ -0,0 +1,425 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * da8xx-usb-phy-clk - TI DaVinci DA8xx USB PHY clocks driver + * + * Copyright (C) 2017 David Lechner + * + * This driver exposes the USB PHY clocks on DA8xx/AM18xx/OMAP-L13x SoCs. + * The clocks consist of two muxes and a PLL. The USB 2.0 PHY mux and PLL are + * combined into a single clock in Linux. The USB 1.0 PHY clock just consists + * of a mux. These clocks are controlled through CFGCHIP2, which is accessed + * as a syscon regmap since it is shared with other devices. + */ + +#include +#include +#include +#include +#include +#include +#include + +/* --- USB 2.0 PHY clock --- */ + +struct da8xx_usb0_phy_clk { + struct clk_hw hw; + struct clk *clk; + struct regmap *regmap; +}; + +enum da8xx_usb0_phy_clk_parent { + DA8XX_USB0_PHY_CLK_PARENT_USB_REFCLKIN, + DA8XX_USB0_PHY_CLK_PARENT_PLL0_AUXCLK, +}; + +#define to_da8xx_usb0_phy_clk(_hw) \ + container_of((_hw), struct da8xx_usb0_phy_clk, hw) + +static int da8xx_usb0_phy_clk_prepare(struct clk_hw *hw) +{ + struct da8xx_usb0_phy_clk *clk = to_da8xx_usb0_phy_clk(hw); + + /* The USB 2.0 PSC clock is only needed temporarily during the USB 2.0 + * PHY clock enable, but since clk_prepare() can't be called in an + * atomic context (i.e. in clk_enable()), we have to prepare it here. + */ + return clk_prepare(clk->clk); +} + +static void da8xx_usb0_phy_clk_unprepare(struct clk_hw *hw) +{ + struct da8xx_usb0_phy_clk *clk = to_da8xx_usb0_phy_clk(hw); + + clk_unprepare(clk->clk); +} + +static int da8xx_usb0_phy_clk_enable(struct clk_hw *hw) +{ + struct da8xx_usb0_phy_clk *clk = to_da8xx_usb0_phy_clk(hw); + unsigned int mask, val; + int ret; + + /* Locking the USB 2.O PLL requires that the USB 2.O PSC is enabled + * temporaily. It can be turned back off once the PLL is locked. + */ + clk_enable(clk->clk); + + /* Turn on the USB 2.0 PHY, but just the PLL, and not OTG. The USB 1.1 + * PHY may use the USB 2.0 PLL clock without USB 2.0 OTG being used. + */ + mask = CFGCHIP2_RESET | CFGCHIP2_PHYPWRDN | CFGCHIP2_PHY_PLLON; + val = CFGCHIP2_PHY_PLLON; + + regmap_write_bits(clk->regmap, CFGCHIP(2), mask, val); + ret = regmap_read_poll_timeout(clk->regmap, CFGCHIP(2), val, + val & CFGCHIP2_PHYCLKGD, 0, 500000); + + clk_disable(clk->clk); + + return ret; +} + +static void da8xx_usb0_phy_clk_disable(struct clk_hw *hw) +{ + struct da8xx_usb0_phy_clk *clk = to_da8xx_usb0_phy_clk(hw); + unsigned int val; + + val = CFGCHIP2_PHYPWRDN; + regmap_write_bits(clk->regmap, CFGCHIP(2), val, val); +} + +static int da8xx_usb0_phy_clk_is_enabled(struct clk_hw *hw) +{ + struct da8xx_usb0_phy_clk *clk = to_da8xx_usb0_phy_clk(hw); + unsigned int val; + + regmap_read(clk->regmap, CFGCHIP(2), &val); + + return !!(val & CFGCHIP2_PHYCLKGD); +} + +static unsigned long da8xx_usb0_phy_clk_recalc_rate(struct clk_hw *hw, + unsigned long parent_rate) +{ + struct da8xx_usb0_phy_clk *clk = to_da8xx_usb0_phy_clk(hw); + unsigned int mask, val; + + /* The parent clock rate must be one of the following */ + mask = CFGCHIP2_REFFREQ_MASK; + switch (parent_rate) { + case 12000000: + val = CFGCHIP2_REFFREQ_12MHZ; + break; + case 13000000: + val = CFGCHIP2_REFFREQ_13MHZ; + break; + case 19200000: + val = CFGCHIP2_REFFREQ_19_2MHZ; + break; + case 20000000: + val = CFGCHIP2_REFFREQ_20MHZ; + break; + case 24000000: + val = CFGCHIP2_REFFREQ_24MHZ; + break; + case 26000000: + val = CFGCHIP2_REFFREQ_26MHZ; + break; + case 38400000: + val = CFGCHIP2_REFFREQ_38_4MHZ; + break; + case 40000000: + val = CFGCHIP2_REFFREQ_40MHZ; + break; + case 48000000: + val = CFGCHIP2_REFFREQ_48MHZ; + break; + default: + return 0; + } + + regmap_write_bits(clk->regmap, CFGCHIP(2), mask, val); + + /* USB 2.0 PLL always supplies 48MHz */ + return 48000000; +} + +static long da8xx_usb0_phy_clk_round_rate(struct clk_hw *hw, unsigned long rate, + unsigned long *parent_rate) +{ + return 48000000; +} + +static int da8xx_usb0_phy_clk_set_parent(struct clk_hw *hw, u8 index) +{ + struct da8xx_usb0_phy_clk *clk = to_da8xx_usb0_phy_clk(hw); + unsigned int mask, val; + + /* Set the mux depending on the parent clock. */ + mask = CFGCHIP2_USB2PHYCLKMUX; + switch (index) { + case DA8XX_USB0_PHY_CLK_PARENT_USB_REFCLKIN: + val = 0; + break; + case DA8XX_USB0_PHY_CLK_PARENT_PLL0_AUXCLK: + val = CFGCHIP2_USB2PHYCLKMUX; + break; + default: + return -EINVAL; + } + + regmap_write_bits(clk->regmap, CFGCHIP(2), mask, val); + + return 0; +} + +static u8 da8xx_usb0_phy_clk_get_parent(struct clk_hw *hw) +{ + struct da8xx_usb0_phy_clk *clk = to_da8xx_usb0_phy_clk(hw); + unsigned int val; + + regmap_read(clk->regmap, CFGCHIP(2), &val); + + if (val & CFGCHIP2_USB2PHYCLKMUX) + return DA8XX_USB0_PHY_CLK_PARENT_PLL0_AUXCLK; + + return DA8XX_USB0_PHY_CLK_PARENT_USB_REFCLKIN; +} + +static const struct clk_ops da8xx_usb0_phy_clk_ops = { + .prepare = da8xx_usb0_phy_clk_prepare, + .unprepare = da8xx_usb0_phy_clk_unprepare, + .enable = da8xx_usb0_phy_clk_enable, + .disable = da8xx_usb0_phy_clk_disable, + .is_enabled = da8xx_usb0_phy_clk_is_enabled, + .recalc_rate = da8xx_usb0_phy_clk_recalc_rate, + .round_rate = da8xx_usb0_phy_clk_round_rate, + .set_parent = da8xx_usb0_phy_clk_set_parent, + .get_parent = da8xx_usb0_phy_clk_get_parent, +}; + +/** + * da8xx_usb0_phy_clk_register - Register a new USB 2.0 PHY clock + * @name: The clock name + * @parent0: The name of the USB_REFCLKIN clock + * @parent1: The name of the PLL0 AUXCLK + * @usb0_psc_clk: The USB 2.0 PSC clock + * @regmap: The CFGCHIP regmap + */ +struct clk *da8xx_usb0_phy_clk_register(const char *name, + const char *parent0, + const char *parent1, + struct clk *usb0_psc_clk, + struct regmap *regmap) +{ + const char * const parent_names[] = { + [DA8XX_USB0_PHY_CLK_PARENT_USB_REFCLKIN] = parent0, + [DA8XX_USB0_PHY_CLK_PARENT_PLL0_AUXCLK] = parent1, + }; + struct da8xx_usb0_phy_clk *clk; + struct clk_init_data init; + + clk = kzalloc(sizeof(*clk), GFP_KERNEL); + if (!clk) + return ERR_PTR(-ENOMEM); + + init.name = name; + init.ops = &da8xx_usb0_phy_clk_ops; + init.parent_names = parent_names; + init.num_parents = 2; + + clk->hw.init = &init; + clk->clk = usb0_psc_clk; + clk->regmap = regmap; + + return clk_register(NULL, &clk->hw); +} + +/* --- USB 1.1 PHY clock --- */ + +struct da8xx_usb1_phy_clk { + struct clk_hw hw; + struct regmap *regmap; +}; + +enum usb1_phy_clk_parent { + DA8XX_USB1_PHY_CLK_PARENT_USB0_PHY_PLL, + DA8XX_USB1_PHY_CLK_PARENT_USB_REFCLKIN, +}; + +#define to_da8xx_usb1_phy_clk(_hw) \ + container_of((_hw), struct da8xx_usb1_phy_clk, hw) + +static int da8xx_usb1_phy_clk_set_parent(struct clk_hw *hw, u8 index) +{ + struct da8xx_usb1_phy_clk *clk = to_da8xx_usb1_phy_clk(hw); + unsigned int mask, val; + + /* Set the USB 1.1 PHY clock mux based on the parent clock. */ + mask = CFGCHIP2_USB1PHYCLKMUX; + switch (index) { + case DA8XX_USB1_PHY_CLK_PARENT_USB_REFCLKIN: + val = CFGCHIP2_USB1PHYCLKMUX; + break; + case DA8XX_USB1_PHY_CLK_PARENT_USB0_PHY_PLL: + val = 0; + break; + default: + return -EINVAL; + } + + regmap_write_bits(clk->regmap, CFGCHIP(2), mask, val); + + return 0; +} + +static u8 da8xx_usb1_phy_clk_get_parent(struct clk_hw *hw) +{ + struct da8xx_usb1_phy_clk *clk = to_da8xx_usb1_phy_clk(hw); + unsigned int val; + + regmap_read(clk->regmap, CFGCHIP(2), &val); + + if (val & CFGCHIP2_USB1PHYCLKMUX) + return DA8XX_USB1_PHY_CLK_PARENT_USB_REFCLKIN; + + return DA8XX_USB1_PHY_CLK_PARENT_USB0_PHY_PLL; +} + +static const struct clk_ops da8xx_usb1_phy_clk_ops = { + .set_parent = da8xx_usb1_phy_clk_set_parent, + .get_parent = da8xx_usb1_phy_clk_get_parent, +}; + +/** + * da8xx_usb1_phy_clk_register - Register a new USB 1.1 PHY clock + * @name: The clock name + * @parent0: The name of the USB 2.0 PHY clock + * @parent1: The name of the USB_REFCLKIN clock + * @regmap: The CFGCHIP regmap + */ +struct clk *da8xx_usb1_phy_clk_register(const char *name, + const char *parent0, + const char *parent1, + struct regmap *regmap) +{ + const char * const parent_names[] = { + [DA8XX_USB1_PHY_CLK_PARENT_USB0_PHY_PLL] = parent0, + [DA8XX_USB1_PHY_CLK_PARENT_USB_REFCLKIN] = parent1, + }; + struct da8xx_usb1_phy_clk *clk; + struct clk_init_data init; + + clk = kzalloc(sizeof(*clk), GFP_KERNEL); + if (!clk) + return ERR_PTR(-ENOMEM); + + init.name = name; + init.ops = &da8xx_usb1_phy_clk_ops; + init.parent_names = parent_names; + init.num_parents = 2; + + clk->hw.init = &init; + clk->regmap = regmap; + + return clk_register(NULL, &clk->hw); +} + +#ifdef CONFIG_OF +static void da8xx_usb0_phy_clk_init(struct device_node *np) +{ + const char *name = np->name; + const char *parent0, *parent1; + struct regmap *regmap; + struct clk *usb0_psc_clk, *clk; + int ret; + + regmap = syscon_node_to_regmap(of_get_parent(np)); + if (IS_ERR(regmap)) { + pr_err("%s: No regmap for syscon parent of %s (%ld)\n", + __func__, np->full_name, PTR_ERR(regmap)); + return; + } + + ret = of_property_match_string(np, "clock-names", "usb_refclkin"); + parent0 = of_clk_get_parent_name(np, ret); + if (!parent0) { + pr_err("%s: Could not get usb_refclkin (%d)\n", __func__, ret); + return; + } + + ret = of_property_match_string(np, "clock-names", "auxclk"); + parent1 = of_clk_get_parent_name(np, ret); + if (!parent1) { + pr_err("%s: Could not get auxclk (%d)\n", __func__, ret); + return; + } + + usb0_psc_clk = of_clk_get_by_name(np, "usb0_lpsc"); + if (IS_ERR(usb0_psc_clk)) { + pr_err("%s: Could not get usb0_lpsc (%ld)\n", __func__, + PTR_ERR(usb0_psc_clk)); + return; + } + + of_property_read_string(np, "clock-output-names", &name); + + clk = da8xx_usb0_phy_clk_register(name, parent0, parent1, usb0_psc_clk, + regmap); + if (IS_ERR(clk)) { + pr_err("%s: Failed to register clock %s (%ld)\n", __func__, + np->full_name, PTR_ERR(clk)); + clk_put(usb0_psc_clk); + return; + } + + of_clk_add_provider(np, of_clk_src_simple_get, clk); +} + +CLK_OF_DECLARE(da8xx_usb0_phy_clk, "ti,da830-usb0-phy-clock", + da8xx_usb0_phy_clk_init); + +static void da8xx_usb1_phy_clk_init(struct device_node *np) +{ + const char *name = np->name; + const char *parent0, *parent1; + struct regmap *regmap; + struct clk *clk; + int ret; + + regmap = syscon_node_to_regmap(of_get_parent(np)); + if (IS_ERR(regmap)) { + pr_err("%s: No regmap for syscon parent of %s (%ld)\n", + __func__, np->full_name, PTR_ERR(regmap)); + return; + } + + ret = of_property_match_string(np, "clock-names", "usb0_phy"); + parent0 = of_clk_get_parent_name(np, ret); + if (!parent0) { + pr_err("%s: Could not get usb0_phy (%d)\n", __func__, ret); + return; + } + + ret = of_property_match_string(np, "clock-names", "usb_refclkin"); + parent1 = of_clk_get_parent_name(np, ret); + if (!parent1) { + pr_err("%s: Could not get usb_refclkin (%d)\n", __func__, ret); + return; + } + + of_property_read_string(np, "clock-output-names", &name); + + clk = da8xx_usb1_phy_clk_register(name, parent0, parent1, regmap); + if (IS_ERR(clk)) { + pr_err("%s: Failed to register clock %s (%ld)\n", + __func__, np->full_name, PTR_ERR(clk)); + return; + } + + of_clk_add_provider(np, of_clk_src_simple_get, clk); +} + +CLK_OF_DECLARE(da8xx_usb1_phy_clk, "ti,da830-usb1-phy-clock", + da8xx_usb1_phy_clk_init); +#endif diff --git a/include/linux/clk/davinci.h b/include/linux/clk/davinci.h index 3810ea3..ec7403e 100644 --- a/include/linux/clk/davinci.h +++ b/include/linux/clk/davinci.h @@ -9,6 +9,9 @@ #include +struct clk; +struct regmap; + void da830_pll_clk_init(void __iomem *pll); void da850_pll_clk_init(void __iomem *pll0, void __iomem *pll1); void dm355_pll_clk_init(void __iomem *pll1, void __iomem *pll2); @@ -23,4 +26,14 @@ void dm365_psc_clk_init(void __iomem *psc); void dm644x_psc_clk_init(void __iomem *psc); void dm646x_psc_clk_init(void __iomem *psc); +struct clk *da8xx_usb0_phy_clk_register(const char *name, + const char *parent0, + const char *parent1, + struct clk *usb0_psc_clk, + struct regmap *regmap); +struct clk *da8xx_usb1_phy_clk_register(const char *name, + const char *parent0, + const char *parent1, + struct regmap *regmap); + #endif /* __LINUX_CLK_DAVINCI_H__ */