functionDefinition.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * linux/arch/arm/mach-mv78xx0/mpp.h -- Multi Purpose Pins
  3. *
  4. *
  5. * sebastien requiem <sebastien@requiem.fr>
  6. *
  7. * This file is licensed under the terms of the GNU General Public
  8. * License version 2. This program is licensed "as is" without any
  9. * warranty of any kind, whether express or implied.
  10. */
  11. #ifndef __MV78X00_MPP_H
  12. #define __MV78X00_MPP_H
  13. #define MPP(_num, _sel, _in, _out, _78100_A0) (\
  14. /* MPP number */ ((_num) & 0xff) | \
  15. /* MPP select value */ (((_sel) & 0xf) << 8) | \
  16. /* may be input signal */ ((!!(_in)) << 12) | \
  17. /* may be output signal */ ((!!(_out)) << 13) | \
  18. /* available on A0 */ ((!!(_78100_A0)) << 14))
  19. /* num sel i o 78100_A0 */
  20. #define MPP_78100_A0_MASK MPP(0, 0x0, 0, 0, 1)
  21. #define MPP0_GPIO MPP(0, 0x0, 1, 1, 1)
  22. #define MPP0_GE0_COL MPP(0, 0x1, 0, 0, 1)
  23. #define MPP0_GE1_TXCLK MPP(0, 0x2, 0, 0, 1)
  24. #define MPP0_UNUSED MPP(0, 0x3, 0, 0, 1)
  25. #define MPP1_GPIO MPP(1, 0x0, 1, 1, 1)
  26. #define MPP1_GE0_RXERR MPP(1, 0x1, 0, 0, 1)
  27. #define MPP1_GE1_TXCTL MPP(1, 0x2, 0, 0, 1)
  28. #define MPP1_UNUSED MPP(1, 0x3, 0, 0, 1)