Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Revert "USB: musb: blackfin: pm: make it work"

This reverts commit 1e393c6eece048052d4131ec4dad3b98e35a98e2.

Needed to properly merge the musb changes that are in the
usb-next branch into Linus's tree.

Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

+24 -50
+23 -49
drivers/usb/musb/blackfin.c
··· 324 324 return -EIO; 325 325 } 326 326 327 - static void musb_platform_reg_init(struct musb *musb) 327 + int __init musb_platform_init(struct musb *musb, void *board_data) 328 328 { 329 + 330 + /* 331 + * Rev 1.0 BF549 EZ-KITs require PE7 to be high for both DEVICE 332 + * and OTG HOST modes, while rev 1.1 and greater require PE7 to 333 + * be low for DEVICE mode and high for HOST mode. We set it high 334 + * here because we are in host mode 335 + */ 336 + 337 + if (gpio_request(musb->config->gpio_vrsel, "USB_VRSEL")) { 338 + printk(KERN_ERR "Failed ro request USB_VRSEL GPIO_%d \n", 339 + musb->config->gpio_vrsel); 340 + return -ENODEV; 341 + } 342 + gpio_direction_output(musb->config->gpio_vrsel, 0); 343 + 344 + usb_nop_xceiv_register(); 345 + musb->xceiv = otg_get_transceiver(); 346 + if (!musb->xceiv) { 347 + gpio_free(musb->config->gpio_vrsel); 348 + return -ENODEV; 349 + } 350 + 329 351 if (ANOMALY_05000346) { 330 352 bfin_write_USB_APHY_CALIB(ANOMALY_05000346_value); 331 353 SSYNC(); ··· 382 360 EP2_RX_ENA | EP3_RX_ENA | EP4_RX_ENA | 383 361 EP5_RX_ENA | EP6_RX_ENA | EP7_RX_ENA); 384 362 SSYNC(); 385 - } 386 - 387 - int __init musb_platform_init(struct musb *musb, void *board_data) 388 - { 389 - 390 - /* 391 - * Rev 1.0 BF549 EZ-KITs require PE7 to be high for both DEVICE 392 - * and OTG HOST modes, while rev 1.1 and greater require PE7 to 393 - * be low for DEVICE mode and high for HOST mode. We set it high 394 - * here because we are in host mode 395 - */ 396 - 397 - if (gpio_request(musb->config->gpio_vrsel, "USB_VRSEL")) { 398 - printk(KERN_ERR "Failed ro request USB_VRSEL GPIO_%d\n", 399 - musb->config->gpio_vrsel); 400 - return -ENODEV; 401 - } 402 - gpio_direction_output(musb->config->gpio_vrsel, 0); 403 - 404 - usb_nop_xceiv_register(); 405 - musb->xceiv = otg_get_transceiver(); 406 - if (!musb->xceiv) { 407 - gpio_free(musb->config->gpio_vrsel); 408 - return -ENODEV; 409 - } 410 - 411 - musb_platform_reg_init(musb); 412 363 413 364 if (is_host_enabled(musb)) { 414 365 musb->board_set_vbus = bfin_set_vbus; ··· 395 400 396 401 return 0; 397 402 } 398 - 399 - #ifdef CONFIG_PM 400 - void musb_platform_save_context(struct musb *musb, 401 - struct musb_context_registers *musb_context) 402 - { 403 - if (is_host_active(musb)) 404 - /* 405 - * During hibernate gpio_vrsel will change from high to low 406 - * low which will generate wakeup event resume the system 407 - * immediately. Set it to 0 before hibernate to avoid this 408 - * wakeup event. 409 - */ 410 - gpio_set_value(musb->config->gpio_vrsel, 0); 411 - } 412 - 413 - void musb_platform_restore_context(struct musb *musb, 414 - struct musb_context_registers *musb_context) 415 - { 416 - musb_platform_reg_init(musb); 417 - } 418 - #endif 419 403 420 404 int musb_platform_exit(struct musb *musb) 421 405 {
+1 -1
drivers/usb/musb/musb_core.h
··· 487 487 }; 488 488 489 489 #if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3) || \ 490 - defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_BLACKFIN) 490 + defined(CONFIG_ARCH_OMAP4) 491 491 extern void musb_platform_save_context(struct musb *musb, 492 492 struct musb_context_registers *musb_context); 493 493 extern void musb_platform_restore_context(struct musb *musb,