All of lore.kernel.org
 help / color / mirror / Atom feed
* gpio_wp pin not set correctly
@ 2011-09-05 21:01 Thomas Weber
  2011-09-06  8:08   ` Thomas Weber
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Weber @ 2011-09-05 21:01 UTC (permalink / raw)
  To: tony@atomide.com, silesh, linux-omap@vger.kernel.org

Hello,

I bisected commit 5e4698fc4406b8603913a2eff44b7c44c5924ea4 for the
following boot error message.

[    0.361694] _omap_mux_init_gpio: Could not set gpio192

When I revert the commit with actual linux-omap, the message is away.

Can you please check this?

I use a Devkit8000, but the beagleboard should have the same problem.


Thomas


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] OMAP: hsmmc: Fix mux for non-OMAP pins
  2011-09-05 21:01 gpio_wp pin not set correctly Thomas Weber
  2011-09-06  8:08   ` Thomas Weber
@ 2011-09-06  8:08   ` Thomas Weber
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Weber @ 2011-09-06  8:08 UTC (permalink / raw)
  To: silesh
  Cc: Thomas Weber, Tony Lindgren, Russell King, open list:OMAP SUPPORT,
	open list:ARM PORT, open list

The Devkit8000 uses a TWL4030 pin for card detection.
Thats why the error:
_omap_mux_init_gpio: Could not set gpio192
occurs.

This patch checks that the pin is on OMAP before
calling omap_mux_init_gpio.

Signed-off-by: Thomas Weber <weber@corscience.de>
---
 arch/arm/mach-omap2/hsmmc.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index a9b45c7..783d0f1 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -214,10 +214,12 @@ static int nop_mmc_set_power(struct device *dev, int slot, int power_on,
 static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller,
 			int controller_nr)
 {
-	if (gpio_is_valid(mmc_controller->slots[0].switch_pin))
+	if (gpio_is_valid(mmc_controller->slots[0].switch_pin) && \
+		(mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES))
 		omap_mux_init_gpio(mmc_controller->slots[0].switch_pin,
 					OMAP_PIN_INPUT_PULLUP);
-	if (gpio_is_valid(mmc_controller->slots[0].gpio_wp))
+	if (gpio_is_valid(mmc_controller->slots[0].gpio_wp) && \
+		(mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES))
 		omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp,
 					OMAP_PIN_INPUT_PULLUP);
 	if (cpu_is_omap34xx()) {
-- 
1.7.6.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] OMAP: hsmmc: Fix mux for non-OMAP pins
@ 2011-09-06  8:08   ` Thomas Weber
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Weber @ 2011-09-06  8:08 UTC (permalink / raw)
  To: linux-arm-kernel

The Devkit8000 uses a TWL4030 pin for card detection.
Thats why the error:
_omap_mux_init_gpio: Could not set gpio192
occurs.

This patch checks that the pin is on OMAP before
calling omap_mux_init_gpio.

Signed-off-by: Thomas Weber <weber@corscience.de>
---
 arch/arm/mach-omap2/hsmmc.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index a9b45c7..783d0f1 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -214,10 +214,12 @@ static int nop_mmc_set_power(struct device *dev, int slot, int power_on,
 static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller,
 			int controller_nr)
 {
-	if (gpio_is_valid(mmc_controller->slots[0].switch_pin))
+	if (gpio_is_valid(mmc_controller->slots[0].switch_pin) && \
+		(mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES))
 		omap_mux_init_gpio(mmc_controller->slots[0].switch_pin,
 					OMAP_PIN_INPUT_PULLUP);
-	if (gpio_is_valid(mmc_controller->slots[0].gpio_wp))
+	if (gpio_is_valid(mmc_controller->slots[0].gpio_wp) && \
+		(mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES))
 		omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp,
 					OMAP_PIN_INPUT_PULLUP);
 	if (cpu_is_omap34xx()) {
-- 
1.7.6.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] OMAP: hsmmc: Fix mux for non-OMAP pins
@ 2011-09-06  8:08   ` Thomas Weber
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Weber @ 2011-09-06  8:08 UTC (permalink / raw)
  To: silesh
  Cc: Thomas Weber, Tony Lindgren, Russell King, open list:OMAP SUPPORT,
	open list:ARM PORT, open list

The Devkit8000 uses a TWL4030 pin for card detection.
Thats why the error:
_omap_mux_init_gpio: Could not set gpio192
occurs.

This patch checks that the pin is on OMAP before
calling omap_mux_init_gpio.

Signed-off-by: Thomas Weber <weber@corscience.de>
---
 arch/arm/mach-omap2/hsmmc.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index a9b45c7..783d0f1 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -214,10 +214,12 @@ static int nop_mmc_set_power(struct device *dev, int slot, int power_on,
 static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller,
 			int controller_nr)
 {
-	if (gpio_is_valid(mmc_controller->slots[0].switch_pin))
+	if (gpio_is_valid(mmc_controller->slots[0].switch_pin) && \
+		(mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES))
 		omap_mux_init_gpio(mmc_controller->slots[0].switch_pin,
 					OMAP_PIN_INPUT_PULLUP);
-	if (gpio_is_valid(mmc_controller->slots[0].gpio_wp))
+	if (gpio_is_valid(mmc_controller->slots[0].gpio_wp) && \
+		(mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES))
 		omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp,
 					OMAP_PIN_INPUT_PULLUP);
 	if (cpu_is_omap34xx()) {
-- 
1.7.6.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] OMAP: hsmmc: Fix mux for non-OMAP pins
  2011-09-06  8:08   ` Thomas Weber
  (?)
@ 2011-09-06  8:14     ` Uwe Kleine-König
  -1 siblings, 0 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2011-09-06  8:14 UTC (permalink / raw)
  To: Thomas Weber
  Cc: Russell King, silesh, Tony Lindgren, open list,
	open list:OMAP SUPPORT, open list:ARM PORT

Hello Thomas,

On Tue, Sep 06, 2011 at 10:08:03AM +0200, Thomas Weber wrote:
> The Devkit8000 uses a TWL4030 pin for card detection.
> Thats why the error:
> _omap_mux_init_gpio: Could not set gpio192
> occurs.
> 
> This patch checks that the pin is on OMAP before
> calling omap_mux_init_gpio.
> 
> Signed-off-by: Thomas Weber <weber@corscience.de>
> ---
>  arch/arm/mach-omap2/hsmmc.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
> index a9b45c7..783d0f1 100644
> --- a/arch/arm/mach-omap2/hsmmc.c
> +++ b/arch/arm/mach-omap2/hsmmc.c
> @@ -214,10 +214,12 @@ static int nop_mmc_set_power(struct device *dev, int slot, int power_on,
>  static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller,
>  			int controller_nr)
>  {
> -	if (gpio_is_valid(mmc_controller->slots[0].switch_pin))
> +	if (gpio_is_valid(mmc_controller->slots[0].switch_pin) && \
That backslash at the line end is not needed and looks ugly.

> +		(mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES))
>  		omap_mux_init_gpio(mmc_controller->slots[0].switch_pin,
>  					OMAP_PIN_INPUT_PULLUP);
> -	if (gpio_is_valid(mmc_controller->slots[0].gpio_wp))
> +	if (gpio_is_valid(mmc_controller->slots[0].gpio_wp) && \
> +		(mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES))
>  		omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp,
>  					OMAP_PIN_INPUT_PULLUP);
>  	if (cpu_is_omap34xx()) {

Best regards
Uwe


-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] OMAP: hsmmc: Fix mux for non-OMAP pins
@ 2011-09-06  8:14     ` Uwe Kleine-König
  0 siblings, 0 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2011-09-06  8:14 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Thomas,

On Tue, Sep 06, 2011 at 10:08:03AM +0200, Thomas Weber wrote:
> The Devkit8000 uses a TWL4030 pin for card detection.
> Thats why the error:
> _omap_mux_init_gpio: Could not set gpio192
> occurs.
> 
> This patch checks that the pin is on OMAP before
> calling omap_mux_init_gpio.
> 
> Signed-off-by: Thomas Weber <weber@corscience.de>
> ---
>  arch/arm/mach-omap2/hsmmc.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
> index a9b45c7..783d0f1 100644
> --- a/arch/arm/mach-omap2/hsmmc.c
> +++ b/arch/arm/mach-omap2/hsmmc.c
> @@ -214,10 +214,12 @@ static int nop_mmc_set_power(struct device *dev, int slot, int power_on,
>  static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller,
>  			int controller_nr)
>  {
> -	if (gpio_is_valid(mmc_controller->slots[0].switch_pin))
> +	if (gpio_is_valid(mmc_controller->slots[0].switch_pin) && \
That backslash at the line end is not needed and looks ugly.

> +		(mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES))
>  		omap_mux_init_gpio(mmc_controller->slots[0].switch_pin,
>  					OMAP_PIN_INPUT_PULLUP);
> -	if (gpio_is_valid(mmc_controller->slots[0].gpio_wp))
> +	if (gpio_is_valid(mmc_controller->slots[0].gpio_wp) && \
> +		(mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES))
>  		omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp,
>  					OMAP_PIN_INPUT_PULLUP);
>  	if (cpu_is_omap34xx()) {

Best regards
Uwe


-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] OMAP: hsmmc: Fix mux for non-OMAP pins
@ 2011-09-06  8:14     ` Uwe Kleine-König
  0 siblings, 0 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2011-09-06  8:14 UTC (permalink / raw)
  To: Thomas Weber
  Cc: silesh, Russell King, Tony Lindgren, open list,
	open list:OMAP SUPPORT, open list:ARM PORT

Hello Thomas,

On Tue, Sep 06, 2011 at 10:08:03AM +0200, Thomas Weber wrote:
> The Devkit8000 uses a TWL4030 pin for card detection.
> Thats why the error:
> _omap_mux_init_gpio: Could not set gpio192
> occurs.
> 
> This patch checks that the pin is on OMAP before
> calling omap_mux_init_gpio.
> 
> Signed-off-by: Thomas Weber <weber@corscience.de>
> ---
>  arch/arm/mach-omap2/hsmmc.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
> index a9b45c7..783d0f1 100644
> --- a/arch/arm/mach-omap2/hsmmc.c
> +++ b/arch/arm/mach-omap2/hsmmc.c
> @@ -214,10 +214,12 @@ static int nop_mmc_set_power(struct device *dev, int slot, int power_on,
>  static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller,
>  			int controller_nr)
>  {
> -	if (gpio_is_valid(mmc_controller->slots[0].switch_pin))
> +	if (gpio_is_valid(mmc_controller->slots[0].switch_pin) && \
That backslash at the line end is not needed and looks ugly.

> +		(mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES))
>  		omap_mux_init_gpio(mmc_controller->slots[0].switch_pin,
>  					OMAP_PIN_INPUT_PULLUP);
> -	if (gpio_is_valid(mmc_controller->slots[0].gpio_wp))
> +	if (gpio_is_valid(mmc_controller->slots[0].gpio_wp) && \
> +		(mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES))
>  		omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp,
>  					OMAP_PIN_INPUT_PULLUP);
>  	if (cpu_is_omap34xx()) {

Best regards
Uwe


-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-09-06  8:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-05 21:01 gpio_wp pin not set correctly Thomas Weber
2011-09-06  8:08 ` [PATCH] OMAP: hsmmc: Fix mux for non-OMAP pins Thomas Weber
2011-09-06  8:08   ` Thomas Weber
2011-09-06  8:08   ` Thomas Weber
2011-09-06  8:14   ` Uwe Kleine-König
2011-09-06  8:14     ` Uwe Kleine-König
2011-09-06  8:14     ` Uwe Kleine-König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.