mux.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * mux.h
  3. *
  4. * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
  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 version 2.
  9. *
  10. * This program is distributed "as is" WITHOUT ANY WARRANTY of any
  11. * kind, whether express or implied; without even the implied warranty
  12. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. */
  15. #ifndef _MUX_H_
  16. #define _MUX_H_
  17. #include <common.h>
  18. #include <asm/io.h>
  19. #ifdef CONFIG_AM33XX
  20. #include <asm/arch/mux_am33xx.h>
  21. #elif defined(CONFIG_TI814X)
  22. #include <asm/arch/mux_ti814x.h>
  23. #elif defined(CONFIG_TI816X)
  24. #include <asm/arch/mux_ti816x.h>
  25. #elif defined(CONFIG_AM43XX)
  26. #include <asm/arch/mux_am43xx.h>
  27. #endif
  28. struct module_pin_mux {
  29. short reg_offset;
  30. unsigned int val;
  31. };
  32. /* Pad control register offset */
  33. #define PAD_CTRL_BASE 0x800
  34. #define OFFSET(x) (unsigned int) (&((struct pad_signals *)\
  35. (PAD_CTRL_BASE))->x)
  36. /*
  37. * Configure the pin mux for the module
  38. */
  39. void configure_module_pin_mux(struct module_pin_mux *mod_pin_mux);
  40. #endif /* endif _MUX_H */