summaryrefslogtreecommitdiff
path: root/arch/arm/mach-davinci
diff options
context:
space:
mode:
authorAxel Haslam <ahaslam@baylibre.com>2016-10-31 23:47:21 +0300
committerSekhar Nori <nsekhar@ti.com>2016-11-01 12:54:24 +0300
commitced95ac0815501f47a6041548d70d8900400912d (patch)
treeb206124b31b72265d5f7c1c0fc2e830ef75fccc5 /arch/arm/mach-davinci
parent0004b02a6820e855788fc029b21d710b3c5fdfe0 (diff)
downloadlinux-ced95ac0815501f47a6041548d70d8900400912d.tar.xz
ARM: davinci: da8xx: register USB PHY clocks in the DT file
The usb20_phy clock needs to be registered for the driver to be able to get and enable a clock. Currently the usb phy clocks are registered from board files, which will not be called during a device tree based boot. To be able to probe correctly usb form a device tree boot, register the usb phy clocks from the DT specific init. Unfortunately, davinci does not have proper clock support on device tree yet, so by registering the clock from the DT specific file we are forced to hardcode the parent clock, and cannot select refclkin as parent for any of the phy clocks of the da850 family. As none of the current da850 based boards currently in mainline use refclkin as source. I guess we can live with this limitation until clocks are correctly represented through CCF/device tree. Signed-off-by: Axel Haslam <ahaslam@baylibre.com> [Added error checking] Signed-off-by: David Lechner <david@lechnology.com> [nsekhar@ti.com: typo fixes in commit message] Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Diffstat (limited to 'arch/arm/mach-davinci')
-rw-r--r--arch/arm/mach-davinci/da8xx-dt.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
index 5e67618180a7..92ae093a2120 100644
--- a/arch/arm/mach-davinci/da8xx-dt.c
+++ b/arch/arm/mach-davinci/da8xx-dt.c
@@ -49,6 +49,17 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
static void __init da850_init_machine(void)
{
+ int ret;
+
+ ret = da8xx_register_usb20_phy_clk(false);
+ if (ret)
+ pr_warn("%s: registering USB 2.0 PHY clock failed: %d",
+ __func__, ret);
+ ret = da8xx_register_usb11_phy_clk(false);
+ if (ret)
+ pr_warn("%s: registering USB 1.1 PHY clock failed: %d",
+ __func__, ret);
+
of_platform_default_populate(NULL, da850_auxdata_lookup, NULL);
}