blob: e28c734a7195b8b28f93f981de0b3c28dea51ce8 [file] [log] [blame]
Jin Hong690e3352012-05-02 09:25:05 -07001/* Copyright (c) 2012, 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 */
13
14#include <linux/init.h>
15#include <linux/ioport.h>
16#include <mach/board.h>
17#include <mach/gpio.h>
18#include <mach/gpiomux.h>
19
20static struct gpiomux_setting gpio_uart_config = {
21 .func = GPIOMUX_FUNC_2,
22 .drv = GPIOMUX_DRV_16MA,
23 .pull = GPIOMUX_PULL_NONE,
24 .dir = GPIOMUX_OUT_HIGH,
25};
26
27static struct msm_gpiomux_config msm_blsp_configs[] __initdata = {
28 {
29 .gpio = 45, /* BLSP1 UART TX */
30 .settings = {
31 [GPIOMUX_SUSPENDED] = &gpio_uart_config,
32 },
33 },
34 {
35 .gpio = 46, /* BLSP1 UART RX */
36 .settings = {
37 [GPIOMUX_SUSPENDED] = &gpio_uart_config,
38 },
39 },
40};
41
42void __init msm9625_init_gpiomux(void)
43{
44 int rc;
45
46 rc = msm_gpiomux_init(NR_GPIO_IRQS);
47 if (rc) {
48 pr_err(KERN_ERR "msm9625_init_gpiomux failed %d\n", rc);
49 return;
50 }
51
52 msm_gpiomux_install(msm_blsp_configs, ARRAY_SIZE(msm_blsp_configs));
53}