]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
ARM: davinci: da8xx: Fix sleeping function called from invalid context
authorAlexandre Bailon <abailon@baylibre.com>
Fri, 9 Dec 2016 16:59:33 +0000 (17:59 +0100)
committerSekhar Nori <nsekhar@ti.com>
Mon, 2 Jan 2017 10:45:07 +0000 (16:15 +0530)
commitd1df1e01af1d7c91e48204b9eb8b9f20cdb90700
treee23eac4faf8313329646723c3081214b095d2f73
parent48cd30b49527f04078ef7de217cc188157f76ba6
ARM: davinci: da8xx: Fix sleeping function called from invalid context

Everytime the usb20 phy is enabled, there is a
"sleeping function called from invalid context" BUG.
In addition, there is a recursive locking happening
because of the recurse call to clk_enable().

clk_enable() from arch/arm/mach-davinci/clock.c uses
spin_lock_irqsave() before to invoke the callback
usb20_phy_clk_enable(). usb20_phy_clk_enable() uses
clk_get() and clk_enable_prepapre() which may sleep.

Replace clk_prepare_enable() by davinci_clk_enable().

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
Suggested-by: David Lechner <david@lechnology.com>
[nsekhar@ti.com: minor commit description adjustment]
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
arch/arm/mach-davinci/usb-da8xx.c