aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/omap-usb-host.c
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@ti.com>2012-11-15 04:48:51 -0500
committerRoger Quadros <rogerq@ti.com>2013-02-13 06:22:52 -0500
commitc6cd087ed058f8a7dfe1997cc51fdf8005e25a03 (patch)
tree52f9d2404426c13dd14814a4183ac26cd244e1df /drivers/mfd/omap-usb-host.c
parent340c64eabacb2a4331b4357c0e8944027ce37216 (diff)
mfd: omap-usb-host: Get rid of unnecessary spinlock
The driver does not have an interrupt handler and we don't really need a spinlock, so get rid of it. Signed-off-by: Roger Quadros <rogerq@ti.com> Reviewed-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/mfd/omap-usb-host.c')
-rw-r--r--drivers/mfd/omap-usb-host.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
index bdfc8b7b5aff..0740c6856b51 100644
--- a/drivers/mfd/omap-usb-host.c
+++ b/drivers/mfd/omap-usb-host.c
@@ -23,7 +23,6 @@
23#include <linux/delay.h> 23#include <linux/delay.h>
24#include <linux/clk.h> 24#include <linux/clk.h>
25#include <linux/dma-mapping.h> 25#include <linux/dma-mapping.h>
26#include <linux/spinlock.h>
27#include <linux/gpio.h> 26#include <linux/gpio.h>
28#include <linux/platform_device.h> 27#include <linux/platform_device.h>
29#include <linux/platform_data/usb-omap.h> 28#include <linux/platform_data/usb-omap.h>
@@ -108,7 +107,6 @@ struct usbhs_hcd_omap {
108 struct usbhs_omap_platform_data *pdata; 107 struct usbhs_omap_platform_data *pdata;
109 108
110 u32 usbhs_rev; 109 u32 usbhs_rev;
111 spinlock_t lock;
112}; 110};
113/*-------------------------------------------------------------------------*/ 111/*-------------------------------------------------------------------------*/
114 112
@@ -276,13 +274,11 @@ static int usbhs_runtime_resume(struct device *dev)
276{ 274{
277 struct usbhs_hcd_omap *omap = dev_get_drvdata(dev); 275 struct usbhs_hcd_omap *omap = dev_get_drvdata(dev);
278 struct usbhs_omap_platform_data *pdata = omap->pdata; 276 struct usbhs_omap_platform_data *pdata = omap->pdata;
279 unsigned long flags;
280 int i, r; 277 int i, r;
281 278
282 dev_dbg(dev, "usbhs_runtime_resume\n"); 279 dev_dbg(dev, "usbhs_runtime_resume\n");
283 280
284 omap_tll_enable(); 281 omap_tll_enable();
285 spin_lock_irqsave(&omap->lock, flags);
286 282
287 if (!IS_ERR(omap->ehci_logic_fck)) 283 if (!IS_ERR(omap->ehci_logic_fck))
288 clk_enable(omap->ehci_logic_fck); 284 clk_enable(omap->ehci_logic_fck);
@@ -324,8 +320,6 @@ static int usbhs_runtime_resume(struct device *dev)
324 } 320 }
325 } 321 }
326 322
327 spin_unlock_irqrestore(&omap->lock, flags);
328
329 return 0; 323 return 0;
330} 324}
331 325
@@ -333,13 +327,10 @@ static int usbhs_runtime_suspend(struct device *dev)
333{ 327{
334 struct usbhs_hcd_omap *omap = dev_get_drvdata(dev); 328 struct usbhs_hcd_omap *omap = dev_get_drvdata(dev);
335 struct usbhs_omap_platform_data *pdata = omap->pdata; 329 struct usbhs_omap_platform_data *pdata = omap->pdata;
336 unsigned long flags;
337 int i; 330 int i;
338 331
339 dev_dbg(dev, "usbhs_runtime_suspend\n"); 332 dev_dbg(dev, "usbhs_runtime_suspend\n");
340 333
341 spin_lock_irqsave(&omap->lock, flags);
342
343 for (i = 0; i < omap->nports; i++) { 334 for (i = 0; i < omap->nports; i++) {
344 switch (pdata->port_mode[i]) { 335 switch (pdata->port_mode[i]) {
345 case OMAP_EHCI_PORT_MODE_HSIC: 336 case OMAP_EHCI_PORT_MODE_HSIC:
@@ -362,7 +353,6 @@ static int usbhs_runtime_suspend(struct device *dev)
362 if (!IS_ERR(omap->ehci_logic_fck)) 353 if (!IS_ERR(omap->ehci_logic_fck))
363 clk_disable(omap->ehci_logic_fck); 354 clk_disable(omap->ehci_logic_fck);
364 355
365 spin_unlock_irqrestore(&omap->lock, flags);
366 omap_tll_disable(); 356 omap_tll_disable();
367 357
368 return 0; 358 return 0;
@@ -372,7 +362,6 @@ static void omap_usbhs_init(struct device *dev)
372{ 362{
373 struct usbhs_hcd_omap *omap = dev_get_drvdata(dev); 363 struct usbhs_hcd_omap *omap = dev_get_drvdata(dev);
374 struct usbhs_omap_platform_data *pdata = omap->pdata; 364 struct usbhs_omap_platform_data *pdata = omap->pdata;
375 unsigned long flags;
376 unsigned reg; 365 unsigned reg;
377 366
378 dev_dbg(dev, "starting TI HSUSB Controller\n"); 367 dev_dbg(dev, "starting TI HSUSB Controller\n");
@@ -391,7 +380,6 @@ static void omap_usbhs_init(struct device *dev)
391 } 380 }
392 381
393 pm_runtime_get_sync(dev); 382 pm_runtime_get_sync(dev);
394 spin_lock_irqsave(&omap->lock, flags);
395 383
396 reg = usbhs_read(omap->uhh_base, OMAP_UHH_HOSTCONFIG); 384 reg = usbhs_read(omap->uhh_base, OMAP_UHH_HOSTCONFIG);
397 /* setup ULPI bypass and burst configurations */ 385 /* setup ULPI bypass and burst configurations */
@@ -454,8 +442,6 @@ static void omap_usbhs_init(struct device *dev)
454 usbhs_write(omap->uhh_base, OMAP_UHH_HOSTCONFIG, reg); 442 usbhs_write(omap->uhh_base, OMAP_UHH_HOSTCONFIG, reg);
455 dev_dbg(dev, "UHH setup done, uhh_hostconfig=%x\n", reg); 443 dev_dbg(dev, "UHH setup done, uhh_hostconfig=%x\n", reg);
456 444
457 spin_unlock_irqrestore(&omap->lock, flags);
458
459 pm_runtime_put_sync(dev); 445 pm_runtime_put_sync(dev);
460 if (pdata->phy_reset) { 446 if (pdata->phy_reset) {
461 /* Hold the PHY in RESET for enough time till 447 /* Hold the PHY in RESET for enough time till
@@ -521,8 +507,6 @@ static int usbhs_omap_probe(struct platform_device *pdev)
521 return -EADDRNOTAVAIL; 507 return -EADDRNOTAVAIL;
522 } 508 }
523 509
524 spin_lock_init(&omap->lock);
525
526 omap->pdata = pdata; 510 omap->pdata = pdata;
527 511
528 pm_runtime_enable(dev); 512 pm_runtime_enable(dev);