mux.c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * mux.c
  3. *
  4. * Copyright (C) 2011 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. #include <common.h>
  16. #include <asm/arch/sys_proto.h>
  17. #include <asm/arch/hardware.h>
  18. #include <asm/arch/mux.h>
  19. #include <asm/io.h>
  20. #include <i2c.h>
  21. #include "evm.h"
  22. static struct module_pin_mux uart0_pin_mux[] = {
  23. {OFFSET(pincntl70), PULLUP_EN | MODE(0x01)}, /* UART0_RXD */
  24. {OFFSET(pincntl71), PULLUP_EN | MODE(0x01)}, /* UART0_TXD */
  25. {-1},
  26. };
  27. static struct module_pin_mux mmc1_pin_mux[] = {
  28. {OFFSET(pincntl1), PULLUP_EN | MODE(0x01)}, /* SD1_CLK */
  29. {OFFSET(pincntl2), PULLUP_EN | MODE(0x01)}, /* SD1_CMD */
  30. {OFFSET(pincntl3), PULLUP_EN | MODE(0x01)}, /* SD1_DAT[0] */
  31. {OFFSET(pincntl4), PULLUP_EN | MODE(0x01)}, /* SD1_DAT[1] */
  32. {OFFSET(pincntl5), PULLUP_EN | MODE(0x01)}, /* SD1_DAT[2] */
  33. {OFFSET(pincntl6), PULLUP_EN | MODE(0x01)}, /* SD1_DAT[3] */
  34. {OFFSET(pincntl74), PULLUP_EN | MODE(0x40)}, /* SD1_POW */
  35. {OFFSET(pincntl75), MODE(0x40)}, /* SD1_SDWP */
  36. {OFFSET(pincntl80), PULLUP_EN | MODE(0x02)}, /* SD1_SDCD */
  37. {-1},
  38. };
  39. void enable_uart0_pin_mux(void)
  40. {
  41. configure_module_pin_mux(uart0_pin_mux);
  42. }
  43. void enable_mmc1_pin_mux(void)
  44. {
  45. configure_module_pin_mux(mmc1_pin_mux);
  46. }