msm: add gpiomux api for gpio multiplex & configuration.
PATCH v4 1/5 msm: add gpiomux api for gpio multiplex & configuration.
Add the 'gpiomux' api, which addresses the following shortcomings of existing tlmm api:
- gpio power-collapse, which is managed by a peripheral processor on other targets, must be managed by the application processor on the 8x60.
- The enable/disable flag of the legacy gpio_tlmm_config api is not applicable on the 8x60, and causes confusion.
- The gpio 'direction' bits are meaningless for all func_sel configurations except for generic-gpio mode (func_sel 0), in which case the gpio_direction_* functions should be used. Having these bits in the tlmm api leads to confusion and misuse of the gpiolib api, and they have been removed in gpiomux.
- The functional api of the legacy system ran contrary to the typical use-case, which is a single massive configuration at boot. Rather than forcing hundreds of 'config' function calls, the new api allows data to be configured with a single table.
gpiomux_get and gpiomux_put are meant to be called automatically when gpio_request and gpio_free are called, giving automatic gpiomux/tlmm control to those drivers/lines with simple power profiles - in the simplest cases, an entry in the gpiomux table and the correct usage of gpiolib is all that is required to get proper gpio power control.
--- arch/arm/mach-msm/Kconfig | 2 + arch/arm/mach-msm/Makefile | 3 + arch/arm/mach-msm/gpiomux-7x30.c | 19 +++++ arch/arm/mach-msm/gpiomux-8x50.c | 19 +++++ arch/arm/mach-msm/gpiomux-8x60.c | 19 +++++ arch/arm/mach-msm/gpiomux-v1.c | 33 ++++++++ arch/arm/mach-msm/gpiomux-v1.h | 67 ++++++++++++++++ arch/arm/mach-msm/gpiomux-v2.c | 25 ++++++ arch/arm/mach-msm/gpiomux-v2.h | 61 ++++++++++++++ arch/arm/mach-msm/gpiomux.c | 96 +++++++++++++++++++++++ arch/arm/mach-msm/gpiomux.h | 94 ++++++++++++++++++++++ arch/arm/mach-msm/include/mach/msm_iomap-8x60.h | 42 ++++++++++ arch/arm/mach-msm/include/mach/msm_iomap.h | 2 + 13 files changed, 482 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-msm/gpiomux-7x30.c create mode 100644 arch/arm/mach-msm/gpiomux-8x50.c create mode 100644 arch/arm/mach-msm/gpiomux-8x60.c create mode 100644 arch/arm/mach-msm/gpiomux-v1.c create mode 100644 arch/arm/mach-msm/gpiomux-v1.h create mode 100644 arch/arm/mach-msm/gpiomux-v2.c create mode 100644 arch/arm/mach-msm/gpiomux-v2.h create mode 100644 arch/arm/mach-msm/gpiomux.c create mode 100644 arch/arm/mach-msm/gpiomux.h create mode 100644 arch/arm/mach-msm/include/mach/msm_iomap-8x60.h
arch/arm/mach-msm/Kconfig +2 -0
@@ -106,4 +106,6 @@ config MSM_SMD_PKG3 config MSM_SMD bool +config MSM_V2_TLMM + bool endif
arch/arm/mach-msm/Makefile +3 -0
@@ -20,3 +20,6 @@ obj-$(CONFIG_MACH_HALIBUT) += board-halibut.o devices-msm7x00.o obj-$(CONFIG_ARCH_MSM7X30) += board-msm7x30.o devices-msm7x30.o obj-$(CONFIG_ARCH_QSD8X50) += board-qsd8x50.o devices-qsd8x50.o +obj-$(CONFIG_ARCH_MSM7X30) += gpiomux-7x30.o 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
arch/arm/mach-msm/gpiomux-7x30.c new file +19 -0
@@ -0,0 +1,19 @@ +/* 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 ] = {};
arch/arm/mach-msm/gpiomux-8x50.c new file +19 -0
@@ -0,0 +1,19 @@ +/* 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 ] = {};
arch/arm/mach-msm/gpiomux-8x60.c new file +19 -0
@@ -0,0 +1,19 @@ +/* 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 ] = {};
arch/arm/mach-msm/gpiomux-v1.c new file +33 -0
@@ -0,0 +1,33 @@ +/* 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/kernel.h> +#include "gpiomux.h" +#include "proc_comm.h" + +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); +}
arch/arm/mach-msm/gpiomux-v1.h new file +67 -0
67 lines not on this page · raw message
arch/arm/mach-msm/gpiomux-v2.c new file +25 -0
@@ -0,0 +1,25 @@ +/* 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)); +}
arch/arm/mach-msm/gpiomux-v2.h new file +61 -0
61 lines not on this page · raw message
arch/arm/mach-msm/gpiomux.c new file +96 -0
96 lines not on this page · raw message
arch/arm/mach-msm/gpiomux.h new file +94 -0
94 lines not on this page · raw message
arch/arm/mach-msm/include/mach/msm_iomap-8x60.h new file +42 -0
42 lines not on this page · raw message
arch/arm/mach-msm/include/mach/msm_iomap.h +2 -0
@@ -47,6 +47,8 @@#include "msm_iomap-7x30.h" #elif defined(CONFIG_ARCH_QSD8X50 )#include "msm_iomap-8x50.h" +#elif defined(CONFIG_ARCH_MSM8X60 ) +#include "msm_iomap-8x60.h" #else #include "msm_iomap-7x00.h" #endif
Signature · 3 lines
1.7.0.4 /usr2/gbean/.signature.codeaurora.org
PATCH v4 2/5 msm: documentation: add gpiomux documentation.
--- Documentation/arm/00-INDEX | 2 + Documentation/arm/msm/gpiomux.txt | 176 +++++++++++++++++++++++++++++++++++++ 2 files changed, 178 insertions(+), 0 deletions(-) create mode 100644 Documentation/arm/msm/gpiomux.txt
Documentation/arm/00-INDEX +2 -0
@@ -6,6 +6,8 @@ Interrupts - ARM Interrupt subsystem documentation IXP2000 - Release Notes for Linux on Intel's IXP2000 Network Processor +msm + - MSM specific documentation Netwinder - Netwinder specific documentation Porting
Documentation/arm/msm/gpiomux.txt new file +176 -0
176 lines not on this page · raw message
Signature · 3 lines
1.7.0.4 /usr2/gbean/.signature.codeaurora.org
PATCH v4 3/5 msm: convert 8x50 to gpiomux.
In reply to Gregory BeanChange the gpio-init code from deprecated gpio_tlmm_config to the new gpiomux api.
--- arch/arm/mach-msm/board-qsd8x50.c | 12 ------------ arch/arm/mach-msm/gpiomux-8x50.c | 11 ++++++++++- 2 files changed, 10 insertions(+), 13 deletions(-)
arch/arm/mach-msm/board-qsd8x50.c +0 -12
@@ -35,21 +35,10 @@extern struct sys_timer msm_timer; -static struct msm_gpio uart3_config_data[] = { - {GPIO_CFG (86 ,1 ,GPIO_INPUT ,GPIO_PULL_DOWN ,GPIO_2MA ),"UART2_Rx" }, - {GPIO_CFG (87 ,1 ,GPIO_OUTPUT ,GPIO_PULL_DOWN ,GPIO_2MA ),"UART2_Tx" }, -}; -static struct platform_device *devices[]__initdata = { &msm_device_uart3, }; -static void msm8x50_init_uart3 (void ) -{ -msm_gpios_request_enable (uart3_config_data, -ARRAY_SIZE (uart3_config_data)); -} -static void __init qsd8x50_map_io (void ) {msm_map_qsd8x50_io ();
@@ -64,7 +53,6 @@ static void __init qsd8x50_init_irq(void)static void __init qsd8x50_init (void ) { -msm8x50_init_uart3 ();platform_add_devices (devices,ARRAY_SIZE (devices)); }
arch/arm/mach-msm/gpiomux-8x50.c +10 -1
@@ -16,4 +16,13 @@*/ #include "gpiomux.h" -struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS ] = {}; +struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS ] = { + [86 ] = {/* UART3 RX */ + .suspended =GPIOMUX_DRV_2MA |GPIOMUX_PULL_DOWN | +GPIOMUX_FUNC_1 |GPIOMUX_VALID , + }, + [87 ] = {/* UART3 TX */ + .suspended =GPIOMUX_DRV_2MA |GPIOMUX_PULL_DOWN | +GPIOMUX_FUNC_1 |GPIOMUX_VALID , + }, +};
Signature · 3 lines
1.7.0.4 /usr2/gbean/.signature.codeaurora.org
PATCH v4 4/5 msm: convert 7x30 to gpiomux.
In reply to Gregory BeanChange deprecated gpio_tlmm_config calls to gpiomux calls.
--- arch/arm/mach-msm/board-msm7x30.c | 20 -------------------- arch/arm/mach-msm/gpiomux-7x30.c | 21 ++++++++++++++++++++- 2 files changed, 20 insertions(+), 21 deletions(-)
arch/arm/mach-msm/board-msm7x30.c +0 -20
@@ -39,22 +39,6 @@extern struct sys_timer msm_timer; -#ifdef CONFIG_SERIAL_MSM_CONSOLE -static struct msm_gpio uart2_config_data[] = { - {GPIO_CFG (49 ,2 ,GPIO_OUTPUT ,GPIO_PULL_DOWN ,GPIO_2MA ),"UART2_RFR" }, - {GPIO_CFG (50 ,2 ,GPIO_INPUT ,GPIO_PULL_DOWN ,GPIO_2MA ),"UART2_CTS" }, - {GPIO_CFG (51 ,2 ,GPIO_INPUT ,GPIO_PULL_DOWN ,GPIO_2MA ),"UART2_Rx" }, - {GPIO_CFG (52 ,2 ,GPIO_OUTPUT ,GPIO_PULL_DOWN ,GPIO_2MA ),"UART2_Tx" }, -}; - -static void msm7x30_init_uart2 (void ) -{ -msm_gpios_request_enable (uart2_config_data, -ARRAY_SIZE (uart2_config_data)); - -} -#endif - static struct platform_device *devices[] __initdata = {#if defined(CONFIG_SERIAL_MSM ) || defined(CONFIG_MSM_SERIAL_DEBUGGER ) &msm_device_uart2,
@@ -70,10 +54,6 @@ static void __init msm7x30_init_irq(void)static void __init msm7x30_init (void ) {platform_add_devices (devices,ARRAY_SIZE (devices)); -#ifdef CONFIG_SERIAL_MSM_CONSOLE -msm7x30_init_uart2 (); -#endif - }static void __init msm7x30_map_io (void )
arch/arm/mach-msm/gpiomux-7x30.c +20 -1
@@ -16,4 +16,23 @@*/ #include "gpiomux.h" -struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS ] = {}; +struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS ] = { +#ifdef CONFIG_SERIAL_MSM_CONSOLE + [49] = { /* UART2 RFR */ + .suspended =GPIOMUX_DRV_2MA |GPIOMUX_PULL_DOWN | +GPIOMUX_FUNC_2 |GPIOMUX_VALID , + }, + [50 ] = {/* UART2 CTS */ + .suspended =GPIOMUX_DRV_2MA |GPIOMUX_PULL_DOWN | +GPIOMUX_FUNC_2 |GPIOMUX_VALID , + }, + [51 ] = {/* UART2 RX */ + .suspended =GPIOMUX_DRV_2MA |GPIOMUX_PULL_DOWN | +GPIOMUX_FUNC_2 |GPIOMUX_VALID , + }, + [52 ] = {/* UART2 TX */ + .suspended =GPIOMUX_DRV_2MA |GPIOMUX_PULL_DOWN | +GPIOMUX_FUNC_2 |GPIOMUX_VALID , + }, +#endif +};
Signature · 3 lines
1.7.0.4 /usr2/gbean/.signature.codeaurora.org
Re: [PATCH 4/5 v4] msm: convert 7x30 to gpiomux.
Greg,
Just rebased on top of 2.6.37 and this patch is totally the wrong way to go about this.
I should have commented at the appropriate time, so sorry for the late reply.
Having this msm_gpiomux_configs be always compiled in for all msm7x30 devices makes this entire system completely inflexible since you have to modify common code to provide board specific initialization. The definition of "msm_gpiomux_configs" belongs in the board file, not in gpiomux-7x30.c. I think we need to delete this new file and move the definition back into board-msm7x30.c, but just use the new gpiomux APIs.
I can provide a patch if you like.
--Dima
Quoted 85 lines · Gregory Bean
Change deprecated
gpio_tlmm_configcalls to gpiomux calls.Signed-off-by Gregory Bean <[email protected]>---
?arch/arm/mach-msm/board-msm7x30.c | ? 20 -------------------- ?arch/arm/mach-msm/gpiomux-7x30.c ?| ? 21 ++++++++++++++++++++- ?2 files changed, 20 insertions(+), 21 deletions(-)arch/arm/mach-msm/board-msm7x30.c +0
-20@@ -39,22 +39,6 @@ ?extern struct sys_timer msm_timer; -#ifdef CONFIG_SERIAL_MSM_CONSOLE -static struct msm_gpio uart2_config_data[] = { - ? ? ? { GPIO_CFG(49, 2, GPIO_OUTPUT, ?GPIO_PULL_DOWN, GPIO_2MA), "UART2_RFR"}, - ? ? ? { GPIO_CFG(50, 2, GPIO_INPUT, ? GPIO_PULL_DOWN, GPIO_2MA), "UART2_CTS"}, - ? ? ? { GPIO_CFG(51, 2, GPIO_INPUT, ? GPIO_PULL_DOWN, GPIO_2MA), "UART2_Rx"}, - ? ? ? { GPIO_CFG(52, 2, GPIO_OUTPUT, ?GPIO_PULL_DOWN, GPIO_2MA), "UART2_Tx"}, -}; - -static void msm7x30_init_uart2 (void ) -{ - ? ? ? msm_gpios_request_enable(uart2_config_data, - ? ? ? ? ? ? ? ? ? ? ? ARRAY_SIZE(uart2_config_data)); - -} -#endif - ?static struct platform_device *devices[] __initdata = { ?#if defined(CONFIG_SERIAL_MSM) || defined(CONFIG_MSM_SERIAL_DEBUGGER) ? ? ? ? &msm_device_uart2,@@ -70,10 +54,6 @@ static void __init msm7x30_init_irq(void) ?static void __init msm7x30_init(void) ?{ ? ? ? ?platform_add_devices(devices, ARRAY_SIZE(devices)); -#ifdef CONFIG_SERIAL_MSM_CONSOLE - ? ? ? msm7x30_init_uart2(); -#endif - ?} ?static void __init msm7x30_map_io(void)arch/arm/mach-msm/gpiomux-7x30.c +0
-0@@ -16,4 +16,23 @@?*/
?#include "gpiomux.h"arch/arm/mach-msm/gpiomux-7x30.c +20
-2-struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS ] = {}; +struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS ] = { +#ifdef CONFIG_SERIAL_MSM_CONSOLE + ? ? ? [49] = { /* UART2 RFR */ + ? ? ? ? ? ? ? .suspended = GPIOMUX_DRV_2MA | GPIOMUX_PULL_DOWN | + ? ? ? ? ? ? ? ? ? ? ? ? ? ?GPIOMUX_FUNC_2 | GPIOMUX_VALID, + ? ? ? }, + ? ? ? [50] = { /* UART2 CTS */ + ? ? ? ? ? ? ? .suspended = GPIOMUX_DRV_2MA | GPIOMUX_PULL_DOWN | + ? ? ? ? ? ? ? ? ? ? ? ? ? ?GPIOMUX_FUNC_2 | GPIOMUX_VALID, + ? ? ? }, + ? ? ? [51] = { /* UART2 RX */ + ? ? ? ? ? ? ? .suspended = GPIOMUX_DRV_2MA | GPIOMUX_PULL_DOWN | + ? ? ? ? ? ? ? ? ? ? ? ? ? ?GPIOMUX_FUNC_2 | GPIOMUX_VALID, + ? ? ? }, + ? ? ? [52] = { /* UART2 TX */ + ? ? ? ? ? ? ? .suspended = GPIOMUX_DRV_2MA | GPIOMUX_PULL_DOWN | + ? ? ? ? ? ? ? ? ? ? ? ? ? ?GPIOMUX_FUNC_2 | GPIOMUX_VALID, + ? ? ? }, +#endif +}; --1.7.0.4
/usr2/gbean/.signature.codeaurora.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo at vger.kernel.org
More majordomo info at ?http://vger.kernel.org/majordomo-info.html Please read the FAQ at ?http://www.tux.org/lkml/
Re: [PATCH 4/5 v4] msm: convert 7x30 to gpiomux.
Quoted 15 lines · Dima Zavin
Greg,
Just rebased on top of 2.6.37 and this patch is totally the wrong way to go about this.
I should have commented at the appropriate time, so sorry for the late reply.
Having this
msm_gpiomux_configsbe always compiled in for all msm7x30 devices makes this entire system completely inflexible since you have to modify common code to provide board specific initialization. The definition of "msm_gpiomux_configs" belongs in the board file, not ingpiomux-7x30.c. I think we need to delete this new file and move the definition back intoboard-msm7x30.c, but just use the new gpiomux APIs.
Quoted 1 line
I can provide a patch if you like.
I would just provide the patch .. It would be easier to understand what your talking about.
Daniel
Signature · 2 lines
Sent by a consultant of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
PATCH 1/1 ARM: msm: 7x30: don't force a gpiomux table for the whole arch
This is completely board specific and therefore must be provided on a per-board basis.
--- arch/arm/mach-msm/Makefile | 2 +- arch/arm/mach-msm/board-msm7x30.c | 22 +++++++++++++++++++++ arch/arm/mach-msm/gpiomux-7x30.c | 38 ------------------------------------- 3 files changed, 23 insertions(+), 39 deletions(-) delete mode 100644 arch/arm/mach-msm/gpiomux-7x30.c
arch/arm/mach-msm/Makefile +1 -1
@@ -25,7 +25,7 @@ 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-msm8x60.o -obj-$(CONFIG_ARCH_MSM7X30) += gpiomux-7x30.o gpiomux-v1.o gpiomux.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 ifndef CONFIG_MSM_V2_TLMM
arch/arm/mach-msm/board-msm7x30.c +22 -0
@@ -35,10 +35,32 @@#include <mach/vreg.h> #include "devices.h" +#include "gpiomux.h" #include "proc_comm.h" extern struct sys_timer msm_timer; +struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS ] = { +#ifdef CONFIG_SERIAL_MSM_CONSOLE + [49] = { /* UART2 RFR */ + .suspended =GPIOMUX_DRV_2MA |GPIOMUX_PULL_DOWN | +GPIOMUX_FUNC_2 |GPIOMUX_VALID , + }, + [50 ] = {/* UART2 CTS */ + .suspended =GPIOMUX_DRV_2MA |GPIOMUX_PULL_DOWN | +GPIOMUX_FUNC_2 |GPIOMUX_VALID , + }, + [51 ] = {/* UART2 RX */ + .suspended =GPIOMUX_DRV_2MA |GPIOMUX_PULL_DOWN | +GPIOMUX_FUNC_2 |GPIOMUX_VALID , + }, + [52 ] = {/* UART2 TX */ + .suspended =GPIOMUX_DRV_2MA |GPIOMUX_PULL_DOWN | +GPIOMUX_FUNC_2 |GPIOMUX_VALID , + }, +#endif +}; + static struct platform_device *devices[] __initdata = {#if defined(CONFIG_SERIAL_MSM ) || defined(CONFIG_MSM_SERIAL_DEBUGGER ) &msm_device_uart2,
arch/arm/mach-msm/gpiomux-7x30.c deleted +0 -38
@@ -1,38 +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 ] = { -#ifdef CONFIG_SERIAL_MSM_CONSOLE - [49] = { /* UART2 RFR */ - .suspended =GPIOMUX_DRV_2MA |GPIOMUX_PULL_DOWN | -GPIOMUX_FUNC_2 |GPIOMUX_VALID , - }, - [50 ] = {/* UART2 CTS */ - .suspended =GPIOMUX_DRV_2MA |GPIOMUX_PULL_DOWN | -GPIOMUX_FUNC_2 |GPIOMUX_VALID , - }, - [51 ] = {/* UART2 RX */ - .suspended =GPIOMUX_DRV_2MA |GPIOMUX_PULL_DOWN | -GPIOMUX_FUNC_2 |GPIOMUX_VALID , - }, - [52 ] = {/* UART2 TX */ - .suspended =GPIOMUX_DRV_2MA |GPIOMUX_PULL_DOWN | -GPIOMUX_FUNC_2 |GPIOMUX_VALID , - }, -#endif -};
Signature · 1 line
1.7.3.1
Re: [PATCH] ARM: msm: 7x30: don't force a gpiomux table for the whole arch
Quoted 6 lines · Dima Zavin
This is completely board specific and therefore must be provided on a per-board basis.
Change-Id I96f922ad9bb9cbce7874c5ae6ac0d7479b7a2124Signed-off-by Dima Zavin<[email protected]>
Thanks,
Rohit Vaswani
Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
Re: [PATCH] ARM: msm: 7x30: don't force a gpiomux table for the whole arch
Quoted 8 lines · Rohit Vaswani
Quoted 6 lines · Dima Zavin
This is completely board specific and therefore must be provided on a per-board basis.
Change-Id I96f922ad9bb9cbce7874c5ae6ac0d7479b7a2124Signed-off-by Dima Zavin<[email protected]>Tested-by Rohit Vaswani <[email protected]>
Rohit, do you have patches to do this for all the SoCs?
Daniel
Signature · 3 lines
Sent by an consultant of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
Re: [PATCH] ARM: msm: 7x30: don't force a gpiomux table for the whole arch
In reply to Dima ZavinQuoted 5 lines · Dima Zavin
This is completely board specific and therefore must be provided on a per-board basis.
Change-Id I96f922ad9bb9cbce7874c5ae6ac0d7479b7a2124Signed-off-by Dima Zavin <[email protected]>
I'll pull this into msm-next once rc8-rc1 comes out.
I'll take out the Change-Id line, though.
David
Re: [PATCH] ARM: msm: 7x30: don't force a gpiomux table for the whole arch
Thanks!
--Dima
Quoted 14 lines · David Brown
Quoted 5 lines · Dima Zavin
This is completely board specific and therefore must be provided on a per-board basis.
Change-Id I96f922ad9bb9cbce7874c5ae6ac0d7479b7a2124Signed-off-by Dima Zavin <[email protected]>I'll pull this into msm-next once rc8-rc1 comes out.
I'll take out the Change-Id line, though.
David
Re: [PATCH 4/5 v4] msm: convert 7x30 to gpiomux.
In reply to Daniel WalkerSend under different title:
[PATCH] ARM: msm: 7x30: don't force a gpiomux table for the whole arch
Quoted 35 lines · Daniel Walker
Quoted 15 lines · Dima Zavin
Greg,
Just rebased on top of 2.6.37 and this patch is totally the wrong way to go about this.
I should have commented at the appropriate time, so sorry for the late reply.
Having this ?msm_gpiomux_configs be always compiled in for all msm7x30 devices makes this entire system completely inflexible since you have to modify common code to provide board specific initialization. The definition of "
msm_gpiomux_configs" belongs in the board file, not ingpiomux-7x30.c. I think we need to delete this new file and move the definition back intoboard-msm7x30.c, but just use the new gpiomux APIs.Quoted 1 line
I can provide a patch if you like.
I would just provide the patch .. It would be easier to understand what your talking about.
Daniel
--
Sent by a consultant of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo at vger.kernel.org
More majordomo info at ?http://vger.kernel.org/majordomo-info.html Please read the FAQ at ?http://www.tux.org/lkml/
PATCH v4 5/5 msm: gpio: Remove tlmm routines obsoleted by gpiomux.
In reply to Gregory BeanNow that all supported gpio_tlmm_config-using boards are using gpiomux, remove the deprecated code.
--- arch/arm/mach-msm/Makefile | 1 - arch/arm/mach-msm/gpio.c | 85 ----------------------- arch/arm/mach-msm/include/mach/gpio.h | 123 --------------------------------- 3 files changed, 0 insertions(+), 209 deletions(-) delete mode 100644 arch/arm/mach-msm/gpio.c
arch/arm/mach-msm/Makefile +0 -1
@@ -3,7 +3,6 @@ obj-y += io.o idle.o timer.o dma.o obj-y += vreg.o obj-y += acpuclock-arm11.o obj-y += clock.o clock-pcom.o -obj-y += gpio.o ifdef CONFIG_MSM_VIC obj-y += irq-vic.o
arch/arm/mach-msm/gpio.c deleted +0 -85
85 lines not on this page · raw message
arch/arm/mach-msm/include/mach/gpio.h +0 -123
127 lines not on this page · raw message
Signature · 3 lines
1.7.0.4 /usr2/gbean/.signature.codeaurora.org