blackfin_usb.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. * Blackfin MUSB HCD (Host Controller Driver) for u-boot
  3. *
  4. * Copyright (c) 2008-2009 Analog Devices Inc.
  5. *
  6. * Licensed under the GPL-2 or later.
  7. */
  8. #ifndef __BLACKFIN_USB_H__
  9. #define __BLACKFIN_USB_H__
  10. #include <linux/types.h>
  11. /* Every register is 32bit aligned, but only 16bits in size */
  12. #define ureg(name) u16 name; u16 __pad_##name;
  13. #define musb_regs musb_regs
  14. struct musb_regs {
  15. /* common registers */
  16. ureg(faddr)
  17. ureg(power)
  18. ureg(intrtx)
  19. ureg(intrrx)
  20. ureg(intrtxe)
  21. ureg(intrrxe)
  22. ureg(intrusb)
  23. ureg(intrusbe)
  24. ureg(frame)
  25. ureg(index)
  26. ureg(testmode)
  27. ureg(globintr)
  28. ureg(global_ctl)
  29. u32 reserved0[3];
  30. /* indexed registers */
  31. ureg(txmaxp)
  32. ureg(txcsr)
  33. ureg(rxmaxp)
  34. ureg(rxcsr)
  35. ureg(rxcount)
  36. ureg(txtype)
  37. ureg(txinterval)
  38. ureg(rxtype)
  39. ureg(rxinterval)
  40. u32 reserved1;
  41. ureg(txcount)
  42. u32 reserved2[5];
  43. /* fifo */
  44. u16 fifox[32];
  45. /* OTG, dynamic FIFO, version & vendor registers */
  46. u32 reserved3[16];
  47. ureg(devctl)
  48. ureg(vbus_irq)
  49. ureg(vbus_mask)
  50. u32 reserved4[15];
  51. ureg(linkinfo)
  52. ureg(vplen)
  53. ureg(hseof1)
  54. ureg(fseof1)
  55. ureg(lseof1)
  56. u32 reserved5[41];
  57. /* target address registers */
  58. struct musb_tar_regs {
  59. ureg(txmaxp)
  60. ureg(txcsr)
  61. ureg(rxmaxp)
  62. ureg(rxcsr)
  63. ureg(rxcount)
  64. ureg(txtype)
  65. ureg(txinternal)
  66. ureg(rxtype)
  67. ureg(rxinternal)
  68. u32 reserved6;
  69. ureg(txcount)
  70. u32 reserved7[5];
  71. } tar[8];
  72. } __attribute__((packed));
  73. struct bfin_musb_dma_regs {
  74. ureg(interrupt);
  75. ureg(control);
  76. ureg(addr_low);
  77. ureg(addr_high);
  78. ureg(count_low);
  79. ureg(count_high);
  80. u32 reserved0[2];
  81. };
  82. #undef ureg
  83. /* EP5-EP7 are the only ones with 1024 byte FIFOs which BULK really needs */
  84. #define MUSB_BULK_EP 5
  85. /* Blackfin FIFO's are static */
  86. #define MUSB_NO_DYNAMIC_FIFO
  87. /* No HUB support :( */
  88. #define MUSB_NO_MULTIPOINT
  89. #endif