aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-01-23 21:49:36 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-23 21:49:36 -0500
commit0ba3307a8ec35252f7b1e222e32889a6f3d9ceb3 (patch)
tree26126ed7a2080a706f0488c215549fc9f5f76a59 /drivers/usb
parent903a9f77d1d00c8621bc37afd959ac45a4b3ebec (diff)
parentcd2f43a1f7400a74a084094502f70df2e169c6e8 (diff)
Merge tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM driver updates from Olof Johansson: "Updates of SoC-near drivers and other driver updates that makes more sense to take through our tree. The largest part of this is a conversion of device registration for some renesas shmobile/sh devices over to use resources. This has required coordination with the corresponding arch/sh changes, and we've agreed to merge the arch/sh changes through our tree. Added in this branch is support for Trusted Foundations secure firmware, which is what is used on many of the commercial Nvidia Tegra products that are in the market, including the Nvidia Shield. The code is local to arch/arm at this time since it's uncertain whether it will be shared with arm64 longer-term, if needed we will refactor later. A couple of new RTC drivers used on ARM boards, merged through our tree on request by the RTC maintainer. ... plus a bunch of smaller updates across the board, gpio conversions for davinci, etc" * tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (45 commits) watchdog: davinci: rename platform driver to davinci-wdt tty: serial: Limit msm_serial_hs driver to platforms that use it mmc: msm_sdcc: Limit driver to platforms that use it usb: phy: msm: Move mach dependent code to platform data clk: versatile: fixup IM-PD1 clock implementation clk: versatile: pass a name to ICST clock provider ARM: integrator: pass parent IRQ to the SIC irqchip: versatile FPGA: support cascaded interrupts from DT gpio: davinci: don't create irq_domain in case of unbanked irqs gpio: davinci: use chained_irq_enter/chained_irq_exit API gpio: davinci: add OF support gpio: davinci: remove unused variable intc_irq_num gpio: davinci: convert to use irqdomain support. gpio: introduce GPIO_DAVINCI kconfig option gpio: davinci: get rid of DAVINCI_N_GPIO gpio: davinci: use {readl|writel}_relaxed() instead of __raw_* serial: sh-sci: Add OF support serial: sh-sci: Add device tree bindings documentation serial: sh-sci: Remove platform data mapbase and irqs fields serial: sh-sci: Remove platform data scbrr_algo_id field ...
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/r8a66597-hcd.c4
-rw-r--r--drivers/usb/phy/phy-msm-usb.c35
2 files changed, 17 insertions, 22 deletions
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index c6c325e4d80d..110b4b9ebeaa 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -94,7 +94,7 @@ static int r8a66597_clock_enable(struct r8a66597 *r8a66597)
94 int i = 0; 94 int i = 0;
95 95
96 if (r8a66597->pdata->on_chip) { 96 if (r8a66597->pdata->on_chip) {
97 clk_enable(r8a66597->clk); 97 clk_prepare_enable(r8a66597->clk);
98 do { 98 do {
99 r8a66597_write(r8a66597, SCKE, SYSCFG0); 99 r8a66597_write(r8a66597, SCKE, SYSCFG0);
100 tmp = r8a66597_read(r8a66597, SYSCFG0); 100 tmp = r8a66597_read(r8a66597, SYSCFG0);
@@ -138,7 +138,7 @@ static void r8a66597_clock_disable(struct r8a66597 *r8a66597)
138 udelay(1); 138 udelay(1);
139 139
140 if (r8a66597->pdata->on_chip) { 140 if (r8a66597->pdata->on_chip) {
141 clk_disable(r8a66597->clk); 141 clk_disable_unprepare(r8a66597->clk);
142 } else { 142 } else {
143 r8a66597_bclr(r8a66597, PLLC, SYSCFG0); 143 r8a66597_bclr(r8a66597, PLLC, SYSCFG0);
144 r8a66597_bclr(r8a66597, XCKE, SYSCFG0); 144 r8a66597_bclr(r8a66597, XCKE, SYSCFG0);
diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index 37752832b770..8546c8dccd51 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -40,8 +40,6 @@
40#include <linux/usb/msm_hsusb_hw.h> 40#include <linux/usb/msm_hsusb_hw.h>
41#include <linux/regulator/consumer.h> 41#include <linux/regulator/consumer.h>
42 42
43#include <mach/clk.h>
44
45#define MSM_USB_BASE (motg->regs) 43#define MSM_USB_BASE (motg->regs)
46#define DRIVER_NAME "msm_otg" 44#define DRIVER_NAME "msm_otg"
47 45
@@ -308,33 +306,30 @@ static void ulpi_init(struct msm_otg *motg)
308 306
309static int msm_otg_link_clk_reset(struct msm_otg *motg, bool assert) 307static int msm_otg_link_clk_reset(struct msm_otg *motg, bool assert)
310{ 308{
311 int ret; 309 int ret = 0;
310
311 if (!motg->pdata->link_clk_reset)
312 return ret;
313
314 ret = motg->pdata->link_clk_reset(motg->clk, assert);
315 if (ret)
316 dev_err(motg->phy.dev, "usb link clk reset %s failed\n",
317 assert ? "assert" : "deassert");
312 318
313 if (assert) {
314 ret = clk_reset(motg->clk, CLK_RESET_ASSERT);
315 if (ret)
316 dev_err(motg->phy.dev, "usb hs_clk assert failed\n");
317 } else {
318 ret = clk_reset(motg->clk, CLK_RESET_DEASSERT);
319 if (ret)
320 dev_err(motg->phy.dev, "usb hs_clk deassert failed\n");
321 }
322 return ret; 319 return ret;
323} 320}
324 321
325static int msm_otg_phy_clk_reset(struct msm_otg *motg) 322static int msm_otg_phy_clk_reset(struct msm_otg *motg)
326{ 323{
327 int ret; 324 int ret = 0;
328 325
329 ret = clk_reset(motg->phy_reset_clk, CLK_RESET_ASSERT); 326 if (!motg->pdata->phy_clk_reset)
330 if (ret) {
331 dev_err(motg->phy.dev, "usb phy clk assert failed\n");
332 return ret; 327 return ret;
333 } 328
334 usleep_range(10000, 12000); 329 ret = motg->pdata->phy_clk_reset(motg->phy_reset_clk);
335 ret = clk_reset(motg->phy_reset_clk, CLK_RESET_DEASSERT);
336 if (ret) 330 if (ret)
337 dev_err(motg->phy.dev, "usb phy clk deassert failed\n"); 331 dev_err(motg->phy.dev, "usb phy clk reset failed\n");
332
338 return ret; 333 return ret;
339} 334}
340 335