003-missing_from_upstream.patch 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. --- a/arch/arm/mach-gemini/board-wbd111.c
  2. +++ b/arch/arm/mach-gemini/board-wbd111.c
  3. @@ -22,9 +22,29 @@
  4. #include <asm/mach/arch.h>
  5. #include <asm/mach/time.h>
  6. +#include <mach/gmac.h>
  7. #include "common.h"
  8. +static struct mdio_gpio_platform_data wbd111_mdio = {
  9. + .mdc = 22,
  10. + .mdio = 21,
  11. + .phy_mask = ~(1 << 1),
  12. +};
  13. +
  14. +static struct platform_device wbd111_phy_device = {
  15. + .name = "mdio-gpio",
  16. + .id = 0,
  17. + .dev = {
  18. + .platform_data = &wbd111_mdio,
  19. + },
  20. +};
  21. +
  22. +static struct gemini_gmac_platform_data gmac_data = {
  23. + .bus_id[0] = "0:01",
  24. + .interface[0] = PHY_INTERFACE_MODE_MII,
  25. +};
  26. +
  27. static struct gpio_keys_button wbd111_keys[] = {
  28. {
  29. .code = KEY_SETUP,
  30. @@ -131,6 +151,8 @@ static void __init wbd111_init(void)
  31. wbd111_num_partitions);
  32. platform_device_register(&wbd111_leds_device);
  33. platform_device_register(&wbd111_keys_device);
  34. + platform_device_register(&wbd111_phy_device);
  35. + platform_register_ethernet(&gmac_data);
  36. }
  37. MACHINE_START(WBD111, "Wiliboard WBD-111")
  38. --- a/arch/arm/mach-gemini/board-wbd222.c
  39. +++ b/arch/arm/mach-gemini/board-wbd222.c
  40. @@ -22,9 +22,31 @@
  41. #include <asm/mach/arch.h>
  42. #include <asm/mach/time.h>
  43. +#include <mach/gmac.h>
  44. #include "common.h"
  45. +static struct mdio_gpio_platform_data wbd222_mdio = {
  46. + .mdc = 22,
  47. + .mdio = 21,
  48. + .phy_mask = ~((1 << 1) | (1 << 3)),
  49. +};
  50. +
  51. +static struct platform_device wbd222_phy_device = {
  52. + .name = "mdio-gpio",
  53. + .id = 0,
  54. + .dev = {
  55. + .platform_data = &wbd222_mdio,
  56. + },
  57. +};
  58. +
  59. +static struct gemini_gmac_platform_data gmac_data = {
  60. + .bus_id[0] = "0:01",
  61. + .interface[0] = PHY_INTERFACE_MODE_MII,
  62. + .bus_id[1] = "0:03",
  63. + .interface[1] = PHY_INTERFACE_MODE_MII,
  64. +};
  65. +
  66. static struct gpio_keys_button wbd222_keys[] = {
  67. {
  68. .code = KEY_SETUP,
  69. @@ -131,6 +153,10 @@ static void __init wbd222_init(void)
  70. wbd222_num_partitions);
  71. platform_device_register(&wbd222_leds_device);
  72. platform_device_register(&wbd222_keys_device);
  73. + platform_device_register(&wbd222_phy_device);
  74. + platform_register_ethernet(&gmac_data);
  75. + platform_register_usb(0);
  76. + platform_register_usb(1);
  77. }
  78. MACHINE_START(WBD222, "Wiliboard WBD-222")