mux.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * Pin-multiplex helper macros for TI DaVinci family devices
  3. *
  4. * Author: Vladimir Barinov, MontaVista Software, Inc. <source@mvista.com>
  5. *
  6. * 2007 (c) MontaVista Software, Inc. This file is licensed under
  7. * the terms of the GNU General Public License version 2. This program
  8. * is licensed "as is" without any warranty of any kind, whether express
  9. * or implied.
  10. *
  11. * Copyright (C) 2008 Texas Instruments.
  12. */
  13. #ifndef _MACH_DAVINCI_MUX_H_
  14. #define _MACH_DAVINCI_MUX_H_
  15. #include <mach/mux.h>
  16. #define MUX_CFG(soc, desc, muxreg, mode_offset, mode_mask, mux_mode, dbg)\
  17. [soc##_##desc] = { \
  18. .name = #desc, \
  19. .debug = dbg, \
  20. .mux_reg_name = "PINMUX"#muxreg, \
  21. .mux_reg = PINMUX(muxreg), \
  22. .mask_offset = mode_offset, \
  23. .mask = mode_mask, \
  24. .mode = mux_mode, \
  25. },
  26. #define INT_CFG(soc, desc, mode_offset, mode_mask, mux_mode, dbg) \
  27. [soc##_##desc] = { \
  28. .name = #desc, \
  29. .debug = dbg, \
  30. .mux_reg_name = "INTMUX", \
  31. .mux_reg = INTMUX, \
  32. .mask_offset = mode_offset, \
  33. .mask = mode_mask, \
  34. .mode = mux_mode, \
  35. },
  36. #define EVT_CFG(soc, desc, mode_offset, mode_mask, mux_mode, dbg) \
  37. [soc##_##desc] = { \
  38. .name = #desc, \
  39. .debug = dbg, \
  40. .mux_reg_name = "EVTMUX", \
  41. .mux_reg = EVTMUX, \
  42. .mask_offset = mode_offset, \
  43. .mask = mode_mask, \
  44. .mode = mux_mode, \
  45. },
  46. #endif /* _MACH_DAVINCI_MUX_H */