omap2430.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Copyright (C) 2005-2006 by Texas Instruments
  3. *
  4. * The Inventra Controller Driver for Linux is free software; you
  5. * can redistribute it and/or modify it under the terms of the GNU
  6. * General Public License version 2 as published by the Free Software
  7. * Foundation.
  8. */
  9. #ifndef __MUSB_OMAP243X_H__
  10. #define __MUSB_OMAP243X_H__
  11. #if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3430)
  12. #include <mach/hardware.h>
  13. #include <mach/usb.h>
  14. /*
  15. * OMAP2430-specific definitions
  16. */
  17. #define MENTOR_BASE_OFFSET 0
  18. #if defined(CONFIG_ARCH_OMAP2430)
  19. #define OMAP_HSOTG_BASE (OMAP243X_HS_BASE)
  20. #elif defined(CONFIG_ARCH_OMAP3430)
  21. #define OMAP_HSOTG_BASE (OMAP34XX_HSUSB_OTG_BASE)
  22. #endif
  23. #define OMAP_HSOTG(offset) (OMAP_HSOTG_BASE + 0x400 + (offset))
  24. #define OTG_REVISION OMAP_HSOTG(0x0)
  25. #define OTG_SYSCONFIG OMAP_HSOTG(0x4)
  26. # define MIDLEMODE 12 /* bit position */
  27. # define FORCESTDBY (0 << MIDLEMODE)
  28. # define NOSTDBY (1 << MIDLEMODE)
  29. # define SMARTSTDBY (2 << MIDLEMODE)
  30. # define SIDLEMODE 3 /* bit position */
  31. # define FORCEIDLE (0 << SIDLEMODE)
  32. # define NOIDLE (1 << SIDLEMODE)
  33. # define SMARTIDLE (2 << SIDLEMODE)
  34. # define ENABLEWAKEUP (1 << 2)
  35. # define SOFTRST (1 << 1)
  36. # define AUTOIDLE (1 << 0)
  37. #define OTG_SYSSTATUS OMAP_HSOTG(0x8)
  38. # define RESETDONE (1 << 0)
  39. #define OTG_INTERFSEL OMAP_HSOTG(0xc)
  40. # define EXTCP (1 << 2)
  41. # define PHYSEL 0 /* bit position */
  42. # define UTMI_8BIT (0 << PHYSEL)
  43. # define ULPI_12PIN (1 << PHYSEL)
  44. # define ULPI_8PIN (2 << PHYSEL)
  45. #define OTG_SIMENABLE OMAP_HSOTG(0x10)
  46. # define TM1 (1 << 0)
  47. #define OTG_FORCESTDBY OMAP_HSOTG(0x14)
  48. # define ENABLEFORCE (1 << 0)
  49. #endif /* CONFIG_ARCH_OMAP2430 */
  50. #endif /* __MUSB_OMAP243X_H__ */