hiddenDangerAnalysis.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef _ASM_ARCH_PXA27X_UDC_H
  2. #define _ASM_ARCH_PXA27X_UDC_H
  3. #ifdef _ASM_ARCH_PXA25X_UDC_H
  4. #error You cannot include both PXA25x and PXA27x UDC support
  5. #endif
  6. #define UDCCR __REG(0x40600000) /* UDC Control Register */
  7. #define UDCCR_OEN (1 << 31) /* On-the-Go Enable */
  8. #define UDCCR_AALTHNP (1 << 30) /* A-device Alternate Host Negotiation
  9. Protocol Port Support */
  10. #define UDCCR_AHNP (1 << 29) /* A-device Host Negotiation Protocol
  11. Support */
  12. #define UDCCR_BHNP (1 << 28) /* B-device Host Negotiation Protocol
  13. Enable */
  14. #define UDCCR_DWRE (1 << 16) /* Device Remote Wake-up Enable */
  15. #define UDCCR_ACN (0x03 << 11) /* Active UDC configuration Number */
  16. #define UDCCR_ACN_S 11
  17. #define UDCCR_AIN (0x07 << 8) /* Active UDC interface Number */
  18. #define UDCCR_AIN_S 8
  19. #define UDCCR_AAISN (0x07 << 5) /* Active UDC Alternate Interface
  20. Setting Number */
  21. #define UDCCR_AAISN_S 5
  22. #define UDCCR_SMAC (1 << 4) /* Switch Endpoint Memory to Active
  23. Configuration */
  24. #define UDCCR_EMCE (1 << 3) /* Endpoint Memory Configuration
  25. Error */
  26. #define UDCCR_UDR (1 << 2) /* UDC Resume */
  27. #define UDCCR_UDA (1 << 1) /* UDC Active */
  28. #define UDCCR_UDE (1 << 0) /* UDC Enable */
  29. #define UDCICR0 __REG(0x40600004) /* UDC Interrupt Control Register0 */
  30. #define UDCICR1 __REG(0x40600008) /* UDC Interrupt Control Register1 */
  31. #define UDCICR_FIFOERR (1 << 1) /* FIFO Error interrupt for EP */
  32. #define UDCICR_PKTCOMPL (1 << 0) /* Packet Complete interrupt for EP */
  33. #define UDC_INT_FIFOERROR (0x2)
  34. #define UDC_INT_PACKETCMP (0x1)
  35. #define UDCICR_INT(n,intr) (((intr) & 0x03) << (((n) & 0x0F) * 2))
  36. #define UDCICR1_IECC (1 << 31) /* IntEn - Configuration Change */
  37. #define UDCICR1_IESOF (1 << 30) /* IntEn - Start of Frame */
  38. #define UDCICR1_IERU (1 << 29) /* IntEn - Resume */
  39. #define UDCICR1_IESU (1 << 28) /* IntEn - Suspend */
  40. #define UDCICR1_IERS (1 << 27) /* IntEn - Reset */
  41. #define UDCISR0 __REG(0x4060000C) /* UDC Interrupt Status Register 0 */
  42. #define UDCISR1 __REG(0x40600010) /* UDC Interrupt Status Register 1 */
  43. #define UDCISR_INT(n,intr) (((intr) & 0x03) << (((n) & 0x0F) * 2))
  44. #define UDCISR1_IRCC (1 << 31) /* IntReq - Configuration Change */
  45. #define UDCISR1_IRSOF (1 << 30) /* IntReq - Start of Frame */