blob: 3d86ba78e327254f06a70bdccc1ab2c6fbfe40c9 [file] [log] [blame]
Abhimanyu Kapura6e27742013-03-18 16:39:31 -07001/* Copyright (c) 2013, The Linux Foundation. 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_1,
22 .drv = GPIOMUX_DRV_8MA,
23 .pull = GPIOMUX_PULL_NONE,
24};
25
26static struct msm_gpiomux_config msm_blsp_configs[] __initdata = {
27 {
28 .gpio = 8, /* BLSP1 UART TX */
29 .settings = {
30 [GPIOMUX_SUSPENDED] = &gpio_uart_config,
31 },
32 },
33 {
34 .gpio = 9, /* BLSP1 UART RX */
35 .settings = {
36 [GPIOMUX_SUSPENDED] = &gpio_uart_config,
37 },
38 },
39};
40
41void __init msmkrypton_init_gpiomux(void)
42{
43 int rc;
44
45 rc = msm_gpiomux_init_dt();
46 if (rc) {
47 pr_err("%s failed %d\n", __func__, rc);
48 return;
49 }
50
51 msm_gpiomux_install(msm_blsp_configs, ARRAY_SIZE(msm_blsp_configs));
52}