c67x00.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * usb_c67x00.h: platform definitions for the Cypress C67X00 USB chip
  3. *
  4. * Copyright (C) 2006-2008 Barco N.V.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (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., 51 Franklin Street, Fifth Floor, Boston,
  19. * MA 02110-1301 USA.
  20. */
  21. #ifndef _LINUX_USB_C67X00_H
  22. #define _LINUX_USB_C67X00_H
  23. /* SIE configuration */
  24. #define C67X00_SIE_UNUSED 0
  25. #define C67X00_SIE_HOST 1
  26. #define C67X00_SIE_PERIPHERAL_A 2 /* peripheral on A port */
  27. #define C67X00_SIE_PERIPHERAL_B 3 /* peripheral on B port */
  28. #define c67x00_sie_config(config, n) (((config)>>(4*(n)))&0x3)
  29. #define C67X00_SIE1_UNUSED (C67X00_SIE_UNUSED << 0)
  30. #define C67X00_SIE1_HOST (C67X00_SIE_HOST << 0)
  31. #define C67X00_SIE1_PERIPHERAL_A (C67X00_SIE_PERIPHERAL_A << 0)
  32. #define C67X00_SIE1_PERIPHERAL_B (C67X00_SIE_PERIPHERAL_B << 0)
  33. #define C67X00_SIE2_UNUSED (C67X00_SIE_UNUSED << 4)
  34. #define C67X00_SIE2_HOST (C67X00_SIE_HOST << 4)
  35. #define C67X00_SIE2_PERIPHERAL_A (C67X00_SIE_PERIPHERAL_A << 4)
  36. #define C67X00_SIE2_PERIPHERAL_B (C67X00_SIE_PERIPHERAL_B << 4)
  37. struct c67x00_platform_data {
  38. int sie_config; /* SIEs config (C67X00_SIEx_*) */
  39. unsigned long hpi_regstep; /* Step between HPI registers */
  40. };
  41. #endif /* _LINUX_USB_C67X00_H */