musb_hcd.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Mentor USB OTG Core host controller driver.
  3. *
  4. * Copyright (c) 2008 Texas Instruments
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License as
  8. * published by the Free Software Foundation; either version 2 of
  9. * the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  19. * MA 02111-1307 USA
  20. *
  21. * Author: Thomas Abraham t-abraham@ti.com, Texas Instruments
  22. */
  23. #ifndef __MUSB_HCD_H__
  24. #define __MUSB_HCD_H__
  25. #include "musb_core.h"
  26. #ifdef CONFIG_USB_KEYBOARD
  27. #include <devices.h>
  28. extern unsigned char new[];
  29. #endif
  30. #ifndef CONFIG_MUSB_TIMEOUT
  31. # define CONFIG_MUSB_TIMEOUT 100000
  32. #endif
  33. /* This defines the endpoint number used for control transfers */
  34. #define MUSB_CONTROL_EP 0
  35. /* This defines the endpoint number used for bulk transfer */
  36. #define MUSB_BULK_EP 1
  37. /* This defines the endpoint number used for interrupt transfer */
  38. #define MUSB_INTR_EP 2
  39. /* Determine the operating speed of MUSB core */
  40. #define musb_ishighspeed() \
  41. ((readb(&musbr->power) & MUSB_POWER_HSMODE) \
  42. >> MUSB_POWER_HSMODE_SHIFT)
  43. /* extern functions */
  44. extern int musb_platform_init(void);
  45. extern void musb_platform_deinit(void);
  46. #endif /* __MUSB_HCD_H__ */