omap2430.c (7099dbc5b3eb9f52efdb78406826f7463f07d71c) omap2430.c (f730f205cc5116b6edfedf568fdfbb4935248e8e)
1/*
2 * Copyright (C) 2005-2007 by Texas Instruments
3 * Some code has been taken from tusb6010.c
4 * Copyrights for that are attributable to:
5 * Copyright (C) 2006 Nokia Corporation
6 * Tony Lindgren <tony@atomide.com>
7 *
8 * This file is part of the Inventra Controller Driver for Linux.

--- 386 unchanged lines hidden (view full) ---

395 * do it earlier as struct musb is not yet allocated and we
396 * need to touch the musb registers for runtime PM.
397 */
398 pm_runtime_enable(glue->dev);
399 status = pm_runtime_get_sync(glue->dev);
400 if (status < 0)
401 goto err1;
402
1/*
2 * Copyright (C) 2005-2007 by Texas Instruments
3 * Some code has been taken from tusb6010.c
4 * Copyrights for that are attributable to:
5 * Copyright (C) 2006 Nokia Corporation
6 * Tony Lindgren <tony@atomide.com>
7 *
8 * This file is part of the Inventra Controller Driver for Linux.

--- 386 unchanged lines hidden (view full) ---

395 * do it earlier as struct musb is not yet allocated and we
396 * need to touch the musb registers for runtime PM.
397 */
398 pm_runtime_enable(glue->dev);
399 status = pm_runtime_get_sync(glue->dev);
400 if (status < 0)
401 goto err1;
402
403 status = pm_runtime_get_sync(dev);
404 if (status < 0) {
405 dev_err(dev, "pm_runtime_get_sync FAILED %d\n", status);
406 pm_runtime_put_sync(glue->dev);
407 goto err1;
408 }
409
410 l = musb_readl(musb->mregs, OTG_INTERFSEL);
411
412 if (data->interface_type == MUSB_INTERFACE_UTMI) {
413 /* OMAP4 uses Internal PHY GS70 which uses UTMI interface */
414 l &= ~ULPI_12PIN; /* Disable ULPI */
415 l |= UTMI_8BIT; /* Enable UTMI */
416 } else {
417 l |= ULPI_12PIN;

--- 11 unchanged lines hidden (view full) ---

429
430 setup_timer(&musb_idle_timer, musb_do_idle, (unsigned long) musb);
431
432 if (glue->status != MUSB_UNKNOWN)
433 omap_musb_set_mailbox(glue);
434
435 phy_init(musb->phy);
436 phy_power_on(musb->phy);
403 l = musb_readl(musb->mregs, OTG_INTERFSEL);
404
405 if (data->interface_type == MUSB_INTERFACE_UTMI) {
406 /* OMAP4 uses Internal PHY GS70 which uses UTMI interface */
407 l &= ~ULPI_12PIN; /* Disable ULPI */
408 l |= UTMI_8BIT; /* Enable UTMI */
409 } else {
410 l |= ULPI_12PIN;

--- 11 unchanged lines hidden (view full) ---

422
423 setup_timer(&musb_idle_timer, musb_do_idle, (unsigned long) musb);
424
425 if (glue->status != MUSB_UNKNOWN)
426 omap_musb_set_mailbox(glue);
427
428 phy_init(musb->phy);
429 phy_power_on(musb->phy);
437
438 pm_runtime_mark_last_busy(musb->controller);
439 pm_runtime_put_autosuspend(musb->controller);
440 pm_runtime_put(glue->dev);
441 return 0;
442
443err1:
444 return status;
445}
446
447static void omap2430_musb_enable(struct musb *musb)

--- 309 unchanged lines hidden ---
430 pm_runtime_put(glue->dev);
431 return 0;
432
433err1:
434 return status;
435}
436
437static void omap2430_musb_enable(struct musb *musb)

--- 309 unchanged lines hidden ---