Commit 1740d483 authored by Anand Gadiyar's avatar Anand Gadiyar Committed by Tony Lindgren

arm: omap4: pandaboard: turn on PHY reference clock at init

The SMSC 3320 USB PHY on the OMAP4 Pandaboard needs a 19.2 MHz
reference clock. This clock is provided from the OMAP4's fref_clk3
pad.

Recent changes to clock44xx_data.c made the clock framework aware
of the existence of these fref_clk[i] lines. If the option
CONFIG_OMAP_RESET_CLOCKS is enabled in the kernel, then the
clock framework will turn these clocks off during bootup.

Explicitly request and keep this clock enabled at init for the
Pandaboard, so that the PHY receives this clock at all times.
Reported-by: default avatarMing Lei <tom.leiming@gmail.com>
Signed-off-by: default avatarAnand Gadiyar <gadiyar@ti.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Reviewed-by: default avatarPaul Walmsley <paul@pwsan.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 56a6a19d
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/clk.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/leds.h> #include <linux/leds.h>
#include <linux/gpio.h> #include <linux/gpio.h>
...@@ -95,7 +96,16 @@ static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { ...@@ -95,7 +96,16 @@ static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
static void __init omap4_ehci_init(void) static void __init omap4_ehci_init(void)
{ {
int ret; int ret;
struct clk *phy_ref_clk;
/* FREF_CLK3 provides the 19.2 MHz reference clock to the PHY */
phy_ref_clk = clk_get(NULL, "auxclk3_ck");
if (IS_ERR(phy_ref_clk)) {
pr_err("Cannot request auxclk3\n");
goto error1;
}
clk_set_rate(phy_ref_clk, 19200000);
clk_enable(phy_ref_clk);
/* disable the power to the usb hub prior to init */ /* disable the power to the usb hub prior to init */
ret = gpio_request(GPIO_HUB_POWER, "hub_power"); ret = gpio_request(GPIO_HUB_POWER, "hub_power");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment