Skip to content

Commit

Permalink
ARM: msm: Remove gpiomux-v2 and re-organize MSM_GPIOMUX configs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rohit Vaswani authored and David Brown committed Jun 12, 2013
1 parent 1a56e4b commit eda9dcf
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 125 deletions.
13 changes: 5 additions & 8 deletions arch/arm/mach-msm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,16 @@ 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
bool "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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions arch/arm/mach-msm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
19 changes: 0 additions & 19 deletions arch/arm/mach-msm/gpiomux-8x60.c

This file was deleted.

25 changes: 0 additions & 25 deletions arch/arm/mach-msm/gpiomux-v2.c

This file was deleted.

61 changes: 0 additions & 61 deletions arch/arm/mach-msm/gpiomux-v2.h

This file was deleted.

15 changes: 15 additions & 0 deletions arch/arm/mach-msm/gpiomux.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,24 @@
#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)
Expand Down
5 changes: 0 additions & 5 deletions arch/arm/mach-msm/gpiomux.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@
#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.
Expand Down
5 changes: 2 additions & 3 deletions drivers/gpio/gpio-msm-v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit eda9dcf

Please sign in to comment.