100-MIPS-BCM63XX-add-USB-host-clock-enable-delay.patch 897 B

12345678910111213141516171819202122232425262728
  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. Knowledge of the clock setup delay should remain at the clock level (so
  6. it can be clock specific and CPU specific). Add the 100 milliseconds
  7. required clock delay for the USB host clock when it gets enabled.
  8. Signed-off-by: Florian Fainelli <florian@openwrt.org>
  9. ---
  10. arch/mips/bcm63xx/clk.c | 5 +++++
  11. 1 file changed, 5 insertions(+)
  12. --- a/arch/mips/bcm63xx/clk.c
  13. +++ b/arch/mips/bcm63xx/clk.c
  14. @@ -177,6 +177,11 @@ static void usbh_set(struct clk *clk, in
  15. bcm_hwclock_set(CKCTL_6362_USBH_EN, enable);
  16. else if (BCMCPU_IS_6368())
  17. bcm_hwclock_set(CKCTL_6368_USBH_EN, enable);
  18. + else
  19. + return;
  20. +
  21. + if (enable)
  22. + msleep(100);
  23. }
  24. static struct clk clk_usbh = {