ARM: msm: Remove gpiomux-v2 and re-organize MSM_GPIOMUX configs
authorRohit Vaswani <rvaswani@codeaurora.org>
Mon, 10 Jun 2013 22:50:19 +0000 (15:50 -0700)
committerDavid Brown <davidb@codeaurora.org>
Wed, 12 Jun 2013 20:52:51 +0000 (13:52 -0700)
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>
arch/arm/mach-msm/Kconfig
arch/arm/mach-msm/Makefile
arch/arm/mach-msm/gpiomux-8x60.c [deleted file]
arch/arm/mach-msm/gpiomux-v2.c [deleted file]
arch/arm/mach-msm/gpiomux-v2.h [deleted file]
arch/arm/mach-msm/gpiomux.c
arch/arm/mach-msm/gpiomux.h
drivers/gpio/gpio-msm-v2.c

index fceb093b949425724ebc0219471a63e6a1e94715..614e41e7881b538b77bc4c5ab0b5430de7175bea 100644 (file)
@@ -48,9 +48,7 @@ config ARCH_MSM8X60
        select CPU_V7
        select GPIO_MSM_V2
        select HAVE_SMP
-       select MSM_GPIOMUX
        select MSM_SCM if SMP
-       select MSM_V2_TLMM
        select USE_OF
 
 config ARCH_MSM8960
@@ -58,9 +56,8 @@ config ARCH_MSM8960
        select ARM_GIC
        select CPU_V7
        select HAVE_SMP
-       select MSM_GPIOMUX
+       select GPIO_MSM_V2
        select MSM_SCM if SMP
-       select MSM_V2_TLMM
        select USE_OF
 
 config MSM_HAS_DEBUG_UART_HS
@@ -124,10 +121,10 @@ config MSM_SMD
        bool
 
 config MSM_GPIOMUX
-       bool
-
-config MSM_V2_TLMM
-       bool
+       depends on !(ARCH_MSM8X60 || ARCH_MSM8960)
+       bool "MSM V1 TLMM GPIOMUX architecture"
+       help
+         Support for MSM V1 TLMM GPIOMUX architecture.
 
 config MSM_SCM
        bool
index 17519faf082f5b0c016953222490a0f93db241cf..1a26d04c9400d46a7a72266aeb040e0b9e66dd9f 100644 (file)
@@ -27,7 +27,5 @@ obj-$(CONFIG_ARCH_MSM7X30) += board-msm7x30.o devices-msm7x30.o
 obj-$(CONFIG_ARCH_QSD8X50) += board-qsd8x50.o devices-qsd8x50.o
 obj-$(CONFIG_ARCH_MSM8X60) += board-dt-8660.o
 obj-$(CONFIG_ARCH_MSM8960) += board-dt-8960.o
-
-obj-$(CONFIG_ARCH_MSM7X30) += gpiomux-v1.o gpiomux.o
-obj-$(CONFIG_ARCH_QSD8X50) += gpiomux-8x50.o gpiomux-v1.o gpiomux.o
-obj-$(CONFIG_ARCH_MSM8X60) += gpiomux-8x60.o gpiomux-v2.o gpiomux.o
+obj-$(CONFIG_MSM_GPIOMUX) += gpiomux.o
+obj-$(CONFIG_ARCH_QSD8X50) += gpiomux-8x50.o
diff --git a/arch/arm/mach-msm/gpiomux-8x60.c b/arch/arm/mach-msm/gpiomux-8x60.c
deleted file mode 100644 (file)
index 7b380b3..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
-#include "gpiomux.h"
-
-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 (file)
index 273396d..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
-#include <linux/io.h>
-#include <mach/msm_iomap.h>
-#include "gpiomux.h"
-
-void __msm_gpiomux_write(unsigned gpio, gpiomux_config_t val)
-{
-       writel(val & ~GPIOMUX_CTL_MASK,
-              MSM_TLMM_BASE + 0x1000 + (0x10 * gpio));
-}
diff --git a/arch/arm/mach-msm/gpiomux-v2.h b/arch/arm/mach-msm/gpiomux-v2.h
deleted file mode 100644 (file)
index 3bf10e7..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
-#ifndef __ARCH_ARM_MACH_MSM_GPIOMUX_V2_H
-#define __ARCH_ARM_MACH_MSM_GPIOMUX_V2_H
-
-#define GPIOMUX_NGPIOS 173
-
-typedef u16 gpiomux_config_t;
-
-enum {
-       GPIOMUX_DRV_2MA  = 0UL << 6,
-       GPIOMUX_DRV_4MA  = 1UL << 6,
-       GPIOMUX_DRV_6MA  = 2UL << 6,
-       GPIOMUX_DRV_8MA  = 3UL << 6,
-       GPIOMUX_DRV_10MA = 4UL << 6,
-       GPIOMUX_DRV_12MA = 5UL << 6,
-       GPIOMUX_DRV_14MA = 6UL << 6,
-       GPIOMUX_DRV_16MA = 7UL << 6,
-};
-
-enum {
-       GPIOMUX_FUNC_GPIO = 0UL  << 2,
-       GPIOMUX_FUNC_1    = 1UL  << 2,
-       GPIOMUX_FUNC_2    = 2UL  << 2,
-       GPIOMUX_FUNC_3    = 3UL  << 2,
-       GPIOMUX_FUNC_4    = 4UL  << 2,
-       GPIOMUX_FUNC_5    = 5UL  << 2,
-       GPIOMUX_FUNC_6    = 6UL  << 2,
-       GPIOMUX_FUNC_7    = 7UL  << 2,
-       GPIOMUX_FUNC_8    = 8UL  << 2,
-       GPIOMUX_FUNC_9    = 9UL  << 2,
-       GPIOMUX_FUNC_A    = 10UL << 2,
-       GPIOMUX_FUNC_B    = 11UL << 2,
-       GPIOMUX_FUNC_C    = 12UL << 2,
-       GPIOMUX_FUNC_D    = 13UL << 2,
-       GPIOMUX_FUNC_E    = 14UL << 2,
-       GPIOMUX_FUNC_F    = 15UL << 2,
-};
-
-enum {
-       GPIOMUX_PULL_NONE   = 0UL,
-       GPIOMUX_PULL_DOWN   = 1UL,
-       GPIOMUX_PULL_KEEPER = 2UL,
-       GPIOMUX_PULL_UP     = 3UL,
-};
-
-#endif
index 53af21abd155bba6c15f2ad281c00e03cfb05067..2b8e2d21708269bb41b4d16593d560fcb5d18e0f 100644 (file)
 #include <linux/module.h>
 #include <linux/spinlock.h>
 #include "gpiomux.h"
+#include "proc_comm.h"
 
 static DEFINE_SPINLOCK(gpiomux_lock);
 
+static void __msm_gpiomux_write(unsigned gpio, gpiomux_config_t val)
+{
+       unsigned tlmm_config  = (val & ~GPIOMUX_CTL_MASK) |
+                               ((gpio & 0x3ff) << 4);
+       unsigned tlmm_disable = 0;
+       int rc;
+
+       rc = msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX,
+                          &tlmm_config, &tlmm_disable);
+       if (rc)
+               pr_err("%s: unexpected proc_comm failure %d: %08x %08x\n",
+                      __func__, rc, tlmm_config, tlmm_disable);
+}
+
 int msm_gpiomux_write(unsigned gpio,
                      gpiomux_config_t active,
                      gpiomux_config_t suspended)
index 00459f6ee13c337ede196e8f512234128b2a391a..8e82f41a89235e4fbef3f7f2b7e0b7c26c84dbfc 100644 (file)
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <mach/msm_gpiomux.h>
-
-#if defined(CONFIG_MSM_V2_TLMM)
-#include "gpiomux-v2.h"
-#else
 #include "gpiomux-v1.h"
-#endif
 
 /**
  * struct msm_gpiomux_config: gpiomux settings for one gpio line.
index dd2eddeb1e0c43e1511edd98b5617c31b3538ce7..75cc8215f15b6347fbc4d87816b294722d337fd9 100644 (file)
@@ -29,7 +29,6 @@
 #include <linux/platform_device.h>
 #include <linux/spinlock.h>
 
-#include <mach/msm_gpiomux.h>
 #include <mach/msm_iomap.h>
 
 /* Bits of interest in the GPIO_IN_OUT register.
@@ -159,12 +158,12 @@ static int msm_gpio_direction_output(struct gpio_chip *chip,
 
 static int msm_gpio_request(struct gpio_chip *chip, unsigned offset)
 {
-       return msm_gpiomux_get(chip->base + offset);
+       return 0;
 }
 
 static void msm_gpio_free(struct gpio_chip *chip, unsigned offset)
 {
-       msm_gpiomux_put(chip->base + offset);
+       return;
 }
 
 static int msm_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
This page took 0.048634 seconds and 5 git commands to generate.