gpiomux-8x50.c 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. * You should have received a copy of the GNU General Public License
  13. * along with this program; if not, write to the Free Software
  14. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  15. * 02110-1301, USA.
  16. */
  17. #include "gpiomux.h"
  18. #if defined(CONFIG_MMC_MSM) || defined(CONFIG_MMC_MSM_MODULE)
  19. #define SDCC_DAT_0_3_CMD_ACTV_CFG (GPIOMUX_VALID | GPIOMUX_PULL_UP\
  20. | GPIOMUX_FUNC_1 | GPIOMUX_DRV_8MA)
  21. #define SDCC_CLK_ACTV_CFG (GPIOMUX_VALID | GPIOMUX_PULL_NONE\
  22. | GPIOMUX_FUNC_1 | GPIOMUX_DRV_8MA)
  23. #else
  24. #define SDCC_DAT_0_3_CMD_ACTV_CFG 0
  25. #define SDCC_CLK_ACTV_CFG 0
  26. #endif
  27. #define SDC1_SUSPEND_CONFIG (GPIOMUX_VALID | GPIOMUX_PULL_DOWN\
  28. | GPIOMUX_FUNC_GPIO | GPIOMUX_DRV_2MA)
  29. struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS] = {
  30. [86] = { /* UART3 RX */
  31. .suspended = GPIOMUX_DRV_2MA | GPIOMUX_PULL_DOWN |
  32. GPIOMUX_FUNC_1 | GPIOMUX_VALID,
  33. },
  34. [87] = { /* UART3 TX */
  35. .suspended = GPIOMUX_DRV_2MA | GPIOMUX_PULL_DOWN |
  36. GPIOMUX_FUNC_1 | GPIOMUX_VALID,
  37. },
  38. /* SDC1 data[3:0] & CMD */
  39. [51 ... 55] = {
  40. .active = SDCC_DAT_0_3_CMD_ACTV_CFG,
  41. .suspended = SDC1_SUSPEND_CONFIG
  42. },
  43. /* SDC1 CLK */
  44. [56] = {
  45. .active = SDCC_CLK_ACTV_CFG,
  46. .suspended = SDC1_SUSPEND_CONFIG
  47. },
  48. };