diff options
author | Rohit Vaswani <rvaswani@codeaurora.org> | 2013-06-10 18:50:19 -0400 |
---|---|---|
committer | David Brown <davidb@codeaurora.org> | 2013-06-12 16:52:51 -0400 |
commit | eda9dcfa56f4864e0e4340f5af3f3e39f514b726 (patch) | |
tree | e7e48f1169aa36fc3eff75135cc8d24b362d3302 /arch/arm | |
parent | 1a56e4b23d2b4445397419202ff40e0b34ba3d7e (diff) |
ARM: msm: Remove gpiomux-v2 and re-organize MSM_GPIOMUX configs
Remove gpiomux-v2 as it's not being used and make way for future improvements.
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-msm/Kconfig | 13 | ||||
-rw-r--r-- | arch/arm/mach-msm/Makefile | 6 | ||||
-rw-r--r-- | arch/arm/mach-msm/gpiomux-8x60.c | 19 | ||||
-rw-r--r-- | arch/arm/mach-msm/gpiomux-v2.c | 25 | ||||
-rw-r--r-- | arch/arm/mach-msm/gpiomux-v2.h | 61 | ||||
-rw-r--r-- | arch/arm/mach-msm/gpiomux.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-msm/gpiomux.h | 5 |
7 files changed, 22 insertions, 122 deletions
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig index fceb093b9494..614e41e7881b 100644 --- a/arch/arm/mach-msm/Kconfig +++ b/arch/arm/mach-msm/Kconfig | |||
@@ -48,9 +48,7 @@ config ARCH_MSM8X60 | |||
48 | select CPU_V7 | 48 | select CPU_V7 |
49 | select GPIO_MSM_V2 | 49 | select GPIO_MSM_V2 |
50 | select HAVE_SMP | 50 | select HAVE_SMP |
51 | select MSM_GPIOMUX | ||
52 | select MSM_SCM if SMP | 51 | select MSM_SCM if SMP |
53 | select MSM_V2_TLMM | ||
54 | select USE_OF | 52 | select USE_OF |
55 | 53 | ||
56 | config ARCH_MSM8960 | 54 | config ARCH_MSM8960 |
@@ -58,9 +56,8 @@ config ARCH_MSM8960 | |||
58 | select ARM_GIC | 56 | select ARM_GIC |
59 | select CPU_V7 | 57 | select CPU_V7 |
60 | select HAVE_SMP | 58 | select HAVE_SMP |
61 | select MSM_GPIOMUX | 59 | select GPIO_MSM_V2 |
62 | select MSM_SCM if SMP | 60 | select MSM_SCM if SMP |
63 | select MSM_V2_TLMM | ||
64 | select USE_OF | 61 | select USE_OF |
65 | 62 | ||
66 | config MSM_HAS_DEBUG_UART_HS | 63 | config MSM_HAS_DEBUG_UART_HS |
@@ -124,10 +121,10 @@ config MSM_SMD | |||
124 | bool | 121 | bool |
125 | 122 | ||
126 | config MSM_GPIOMUX | 123 | config MSM_GPIOMUX |
127 | bool | 124 | depends on !(ARCH_MSM8X60 || ARCH_MSM8960) |
128 | 125 | bool "MSM V1 TLMM GPIOMUX architecture" | |
129 | config MSM_V2_TLMM | 126 | help |
130 | bool | 127 | Support for MSM V1 TLMM GPIOMUX architecture. |
131 | 128 | ||
132 | config MSM_SCM | 129 | config MSM_SCM |
133 | bool | 130 | bool |
diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile index 17519faf082f..1a26d04c9400 100644 --- a/arch/arm/mach-msm/Makefile +++ b/arch/arm/mach-msm/Makefile | |||
@@ -27,7 +27,5 @@ obj-$(CONFIG_ARCH_MSM7X30) += board-msm7x30.o devices-msm7x30.o | |||
27 | obj-$(CONFIG_ARCH_QSD8X50) += board-qsd8x50.o devices-qsd8x50.o | 27 | obj-$(CONFIG_ARCH_QSD8X50) += board-qsd8x50.o devices-qsd8x50.o |
28 | obj-$(CONFIG_ARCH_MSM8X60) += board-dt-8660.o | 28 | obj-$(CONFIG_ARCH_MSM8X60) += board-dt-8660.o |
29 | obj-$(CONFIG_ARCH_MSM8960) += board-dt-8960.o | 29 | obj-$(CONFIG_ARCH_MSM8960) += board-dt-8960.o |
30 | 30 | obj-$(CONFIG_MSM_GPIOMUX) += gpiomux.o | |
31 | obj-$(CONFIG_ARCH_MSM7X30) += gpiomux-v1.o gpiomux.o | 31 | obj-$(CONFIG_ARCH_QSD8X50) += gpiomux-8x50.o |
32 | obj-$(CONFIG_ARCH_QSD8X50) += gpiomux-8x50.o gpiomux-v1.o gpiomux.o | ||
33 | obj-$(CONFIG_ARCH_MSM8X60) += gpiomux-8x60.o gpiomux-v2.o gpiomux.o | ||
diff --git a/arch/arm/mach-msm/gpiomux-8x60.c b/arch/arm/mach-msm/gpiomux-8x60.c deleted file mode 100644 index 7b380b31bd0e..000000000000 --- a/arch/arm/mach-msm/gpiomux-8x60.c +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
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 | |||
19 | struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS] = {}; | ||
diff --git a/arch/arm/mach-msm/gpiomux-v2.c b/arch/arm/mach-msm/gpiomux-v2.c deleted file mode 100644 index 273396d2b127..000000000000 --- a/arch/arm/mach-msm/gpiomux-v2.c +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
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 <linux/io.h> | ||
18 | #include <mach/msm_iomap.h> | ||
19 | #include "gpiomux.h" | ||
20 | |||
21 | void __msm_gpiomux_write(unsigned gpio, gpiomux_config_t val) | ||
22 | { | ||
23 | writel(val & ~GPIOMUX_CTL_MASK, | ||
24 | MSM_TLMM_BASE + 0x1000 + (0x10 * gpio)); | ||
25 | } | ||
diff --git a/arch/arm/mach-msm/gpiomux-v2.h b/arch/arm/mach-msm/gpiomux-v2.h deleted file mode 100644 index 3bf10e7f0381..000000000000 --- a/arch/arm/mach-msm/gpiomux-v2.h +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
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 | #ifndef __ARCH_ARM_MACH_MSM_GPIOMUX_V2_H | ||
18 | #define __ARCH_ARM_MACH_MSM_GPIOMUX_V2_H | ||
19 | |||
20 | #define GPIOMUX_NGPIOS 173 | ||
21 | |||
22 | typedef u16 gpiomux_config_t; | ||
23 | |||
24 | enum { | ||
25 | GPIOMUX_DRV_2MA = 0UL << 6, | ||
26 | GPIOMUX_DRV_4MA = 1UL << 6, | ||
27 | GPIOMUX_DRV_6MA = 2UL << 6, | ||
28 | GPIOMUX_DRV_8MA = 3UL << 6, | ||
29 | GPIOMUX_DRV_10MA = 4UL << 6, | ||
30 | GPIOMUX_DRV_12MA = 5UL << 6, | ||
31 | GPIOMUX_DRV_14MA = 6UL << 6, | ||
32 | GPIOMUX_DRV_16MA = 7UL << 6, | ||
33 | }; | ||
34 | |||
35 | enum { | ||
36 | GPIOMUX_FUNC_GPIO = 0UL << 2, | ||
37 | GPIOMUX_FUNC_1 = 1UL << 2, | ||
38 | GPIOMUX_FUNC_2 = 2UL << 2, | ||
39 | GPIOMUX_FUNC_3 = 3UL << 2, | ||
40 | GPIOMUX_FUNC_4 = 4UL << 2, | ||
41 | GPIOMUX_FUNC_5 = 5UL << 2, | ||
42 | GPIOMUX_FUNC_6 = 6UL << 2, | ||
43 | GPIOMUX_FUNC_7 = 7UL << 2, | ||
44 | GPIOMUX_FUNC_8 = 8UL << 2, | ||
45 | GPIOMUX_FUNC_9 = 9UL << 2, | ||
46 | GPIOMUX_FUNC_A = 10UL << 2, | ||
47 | GPIOMUX_FUNC_B = 11UL << 2, | ||
48 | GPIOMUX_FUNC_C = 12UL << 2, | ||
49 | GPIOMUX_FUNC_D = 13UL << 2, | ||
50 | GPIOMUX_FUNC_E = 14UL << 2, | ||
51 | GPIOMUX_FUNC_F = 15UL << 2, | ||
52 | }; | ||
53 | |||
54 | enum { | ||
55 | GPIOMUX_PULL_NONE = 0UL, | ||
56 | GPIOMUX_PULL_DOWN = 1UL, | ||
57 | GPIOMUX_PULL_KEEPER = 2UL, | ||
58 | GPIOMUX_PULL_UP = 3UL, | ||
59 | }; | ||
60 | |||
61 | #endif | ||
diff --git a/arch/arm/mach-msm/gpiomux.c b/arch/arm/mach-msm/gpiomux.c index 53af21abd155..2b8e2d217082 100644 --- a/arch/arm/mach-msm/gpiomux.c +++ b/arch/arm/mach-msm/gpiomux.c | |||
@@ -17,9 +17,24 @@ | |||
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
19 | #include "gpiomux.h" | 19 | #include "gpiomux.h" |
20 | #include "proc_comm.h" | ||
20 | 21 | ||
21 | static DEFINE_SPINLOCK(gpiomux_lock); | 22 | static DEFINE_SPINLOCK(gpiomux_lock); |
22 | 23 | ||
24 | static void __msm_gpiomux_write(unsigned gpio, gpiomux_config_t val) | ||
25 | { | ||
26 | unsigned tlmm_config = (val & ~GPIOMUX_CTL_MASK) | | ||
27 | ((gpio & 0x3ff) << 4); | ||
28 | unsigned tlmm_disable = 0; | ||
29 | int rc; | ||
30 | |||
31 | rc = msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX, | ||
32 | &tlmm_config, &tlmm_disable); | ||
33 | if (rc) | ||
34 | pr_err("%s: unexpected proc_comm failure %d: %08x %08x\n", | ||
35 | __func__, rc, tlmm_config, tlmm_disable); | ||
36 | } | ||
37 | |||
23 | int msm_gpiomux_write(unsigned gpio, | 38 | int msm_gpiomux_write(unsigned gpio, |
24 | gpiomux_config_t active, | 39 | gpiomux_config_t active, |
25 | gpiomux_config_t suspended) | 40 | gpiomux_config_t suspended) |
diff --git a/arch/arm/mach-msm/gpiomux.h b/arch/arm/mach-msm/gpiomux.h index 00459f6ee13c..8e82f41a8923 100644 --- a/arch/arm/mach-msm/gpiomux.h +++ b/arch/arm/mach-msm/gpiomux.h | |||
@@ -20,12 +20,7 @@ | |||
20 | #include <linux/bitops.h> | 20 | #include <linux/bitops.h> |
21 | #include <linux/errno.h> | 21 | #include <linux/errno.h> |
22 | #include <mach/msm_gpiomux.h> | 22 | #include <mach/msm_gpiomux.h> |
23 | |||
24 | #if defined(CONFIG_MSM_V2_TLMM) | ||
25 | #include "gpiomux-v2.h" | ||
26 | #else | ||
27 | #include "gpiomux-v1.h" | 23 | #include "gpiomux-v1.h" |
28 | #endif | ||
29 | 24 | ||
30 | /** | 25 | /** |
31 | * struct msm_gpiomux_config: gpiomux settings for one gpio line. | 26 | * struct msm_gpiomux_config: gpiomux settings for one gpio line. |