summaryrefslogtreecommitdiff
path: root/arch/arm/mach-davinci/board-omapl138-hawk.c
diff options
context:
space:
mode:
authorDavid Lechner <david@lechnology.com>2016-10-31 23:47:20 +0300
committerSekhar Nori <nsekhar@ti.com>2016-11-01 12:54:14 +0300
commit0004b02a6820e855788fc029b21d710b3c5fdfe0 (patch)
treea8c43a1bc66c1d85b38c5b75c05e9975d4d54d09 /arch/arm/mach-davinci/board-omapl138-hawk.c
parent3b996e5f8f4057b76eacae493a309215f3fd8485 (diff)
downloadlinux-0004b02a6820e855788fc029b21d710b3c5fdfe0.tar.xz
ARM: davinci: da8xx: add usb phy clocks
Up to this point, the USB phy clock configuration was handled manually in the board files and in the usb drivers. This adds proper clocks so that the usb drivers can use clk_get and clk_enable and not have to worry about the details. Also, the related code is removed from the board files and replaced with the new clock registration functions. This also removes the #if IS_ENABLED(CONFIG_USB_MUSB_HDRC) around the musb declaration and renames the musb platform device so that we can reference it from the usb20 clock even if the musb device is not used. Signed-off-by: David Lechner <david@lechnology.com> Signed-off-by: Axel Haslam <ahaslam@baylibre.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Diffstat (limited to 'arch/arm/mach-davinci/board-omapl138-hawk.c')
-rw-r--r--arch/arm/mach-davinci/board-omapl138-hawk.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c
index 67477ca4f15a..a4e87264ebd7 100644
--- a/arch/arm/mach-davinci/board-omapl138-hawk.c
+++ b/arch/arm/mach-davinci/board-omapl138-hawk.c
@@ -13,7 +13,6 @@
#include <linux/init.h>
#include <linux/console.h>
#include <linux/gpio.h>
-#include <linux/mfd/da8xx-cfgchip.h>
#include <linux/platform_data/gpio-davinci.h>
#include <linux/regulator/machine.h>
@@ -245,7 +244,6 @@ static irqreturn_t omapl138_hawk_usb_ocic_irq(int irq, void *dev_id)
static __init void omapl138_hawk_usb_init(void)
{
int ret;
- u32 cfgchip2;
ret = davinci_cfg_reg_list(da850_hawk_usb11_pins);
if (ret) {
@@ -253,12 +251,15 @@ static __init void omapl138_hawk_usb_init(void)
return;
}
- /* Setup the Ref. clock frequency for the HAWK at 24 MHz. */
+ ret = da8xx_register_usb20_phy_clk(false);
+ if (ret)
+ pr_warn("%s: USB 2.0 PHY CLK registration failed: %d\n",
+ __func__, ret);
- cfgchip2 = __raw_readl(DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG));
- cfgchip2 &= ~CFGCHIP2_REFFREQ_MASK;
- cfgchip2 |= CFGCHIP2_REFFREQ_24MHZ;
- __raw_writel(cfgchip2, DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG));
+ ret = da8xx_register_usb11_phy_clk(false);
+ if (ret)
+ pr_warn("%s: USB 1.1 PHY CLK registration failed: %d\n",
+ __func__, ret);
ret = da8xx_register_usb_phy();
if (ret)