132-arm-gemini-register-usb.patch 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. --- a/arch/arm/mach-gemini/board-wbd111.c
  2. +++ b/arch/arm/mach-gemini/board-wbd111.c
  3. @@ -145,6 +145,7 @@ static void __init wbd111_init(void)
  4. platform_register_watchdog();
  5. platform_device_register(&wbd111_phy_device);
  6. platform_register_ethernet(&gmac_data);
  7. + platform_register_usb(0);
  8. }
  9. MACHINE_START(WBD111, "Wiliboard WBD-111")
  10. --- a/arch/arm/mach-gemini/board-wbd222.c
  11. +++ b/arch/arm/mach-gemini/board-wbd222.c
  12. @@ -147,6 +147,7 @@ static void __init wbd222_init(void)
  13. platform_register_watchdog();
  14. platform_device_register(&wbd222_phy_device);
  15. platform_register_ethernet(&gmac_data);
  16. + platform_register_usb(0);
  17. }
  18. MACHINE_START(WBD222, "Wiliboard WBD-222")
  19. --- a/arch/arm/mach-gemini/board-rut1xx.c
  20. +++ b/arch/arm/mach-gemini/board-rut1xx.c
  21. @@ -105,6 +105,7 @@ static void __init rut1xx_init(void)
  22. platform_register_watchdog();
  23. platform_device_register(&rut1xx_phy_device);
  24. platform_register_ethernet(&gmac_data);
  25. + platform_register_usb(0);
  26. }
  27. MACHINE_START(RUT100, "Teltonika RUT100")
  28. --- a/arch/arm/mach-gemini/board-nas4220b.c
  29. +++ b/arch/arm/mach-gemini/board-nas4220b.c
  30. @@ -134,10 +134,23 @@ static void __init ib4220b_gmac_init(voi
  31. GLOBAL_ARBITRATION1_CTRL));
  32. }
  33. +static void __init usb_ib4220b_init(void)
  34. +{
  35. + unsigned int val;
  36. +
  37. + val = readl((void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
  38. + GLOBAL_MISC_CTRL));
  39. + val &= ~(USB0_PLUG_MINIB | USB1_PLUG_MINIB);
  40. + val |= USB0_VBUS_ON | USB1_VBUS_ON;
  41. + writel(val, (void __iomem*)(IO_ADDRESS(GEMINI_GLOBAL_BASE) +
  42. + GLOBAL_MISC_CTRL));
  43. +}
  44. +
  45. static void __init ib4220b_init(void)
  46. {
  47. gemini_gpio_init();
  48. ib4220b_gmac_init();
  49. + usb_ib4220b_init();
  50. platform_register_uart();
  51. platform_register_pflash(SZ_16M, NULL, 0);
  52. platform_device_register(&ib4220b_led_device);
  53. @@ -146,6 +159,8 @@ static void __init ib4220b_init(void)
  54. platform_register_watchdog();
  55. platform_device_register(&ib4220b_phy_device);
  56. platform_register_ethernet(&ib4220b_gmac_data);
  57. + platform_register_usb(0);
  58. + platform_register_usb(1);
  59. }
  60. MACHINE_START(NAS4220B, "Raidsonic NAS IB-4220-B")