bcm63xx: add support for linux 3.8
[openwrt.git] / target / linux / brcm63xx / patches-3.8 / 108-MIPS-BCM63XX-add-USB-host-clock-enable-delay.patch
1 From 80a2f983e9f44dbc3e01ae31c62d877846a7f791 Mon Sep 17 00:00:00 2001
2 From: Florian Fainelli <florian@openwrt.org>
3 Date: Mon, 28 Jan 2013 20:06:19 +0100
4 Subject: [PATCH 01/11] MIPS: BCM63XX: add USB host clock enable delay
5
6 Knowledge of the clock setup delay should remain at the clock level (so
7 it can be clock specific and CPU specific). Add the 100 milliseconds
8 required clock delay for the USB host clock when it gets enabled.
9
10 Signed-off-by: Florian Fainelli <florian@openwrt.org>
11 ---
12  arch/mips/bcm63xx/clk.c |    5 +++++
13  1 file changed, 5 insertions(+)
14
15 --- a/arch/mips/bcm63xx/clk.c
16 +++ b/arch/mips/bcm63xx/clk.c
17 @@ -162,6 +162,11 @@ static void usbh_set(struct clk *clk, in
18                 bcm_hwclock_set(CKCTL_6348_USBH_EN, enable);
19         else if (BCMCPU_IS_6368())
20                 bcm_hwclock_set(CKCTL_6368_USBH_EN, enable);
21 +       else
22 +               return;
23 +
24 +       if (enable)
25 +               msleep(100);
26  }
27  
28  static struct clk clk_usbh = {