All of lore.kernel.org
 help / color / mirror / Atom feed
* Regression in next with gpiolib
@ 2017-08-30 21:41 ` Tony Lindgren
  0 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2017-08-30 21:41 UTC (permalink / raw)
  To: Timur Tabi, Linus Walleij, Grygorii Strashko
  Cc: linux-gpio, linux-kernel, linux-arm-kernel, linux-omap

Hi Timur, Linus & Grygorii,

Looks like commit 108d23e322a2 ("gpiolib: request the gpio before
querying its direction") caused a regression on at least pandaboard
es with booting hanging shortly after gpio init.

It seems to be that we're now calling request and free on all gpios
before they are properly configured?

I narrowed the hang down to gpio bank1 lines 7 and possibly 8 where
not calling omap_gpio_free() on them makes the system boot again.

These lines are used for the leds in omap4-panda-common.dtsi, and
omap_gpio_free() will by default set the unused lines for input
and bad things happen. I guess hardware failure could also happen
although I have not seen it here.

It seems a similar issue can exist on other platforms too,
so it's probably a good idea to revert this for now.

Any ideas on how we should fix this?

Regards,

Tony




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

* Regression in next with gpiolib
@ 2017-08-30 21:41 ` Tony Lindgren
  0 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2017-08-30 21:41 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Timur, Linus & Grygorii,

Looks like commit 108d23e322a2 ("gpiolib: request the gpio before
querying its direction") caused a regression on at least pandaboard
es with booting hanging shortly after gpio init.

It seems to be that we're now calling request and free on all gpios
before they are properly configured?

I narrowed the hang down to gpio bank1 lines 7 and possibly 8 where
not calling omap_gpio_free() on them makes the system boot again.

These lines are used for the leds in omap4-panda-common.dtsi, and
omap_gpio_free() will by default set the unused lines for input
and bad things happen. I guess hardware failure could also happen
although I have not seen it here.

It seems a similar issue can exist on other platforms too,
so it's probably a good idea to revert this for now.

Any ideas on how we should fix this?

Regards,

Tony

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

* Re: Regression in next with gpiolib
  2017-08-30 21:41 ` Tony Lindgren
@ 2017-08-30 21:49   ` Timur Tabi
  -1 siblings, 0 replies; 10+ messages in thread
From: Timur Tabi @ 2017-08-30 21:49 UTC (permalink / raw)
  To: Tony Lindgren, Linus Walleij, Grygorii Strashko
  Cc: linux-gpio, linux-kernel, linux-arm-kernel, linux-omap

On 08/30/2017 04:41 PM, Tony Lindgren wrote:
> It seems to be that we're now calling request and free on all gpios
> before they are properly configured?

Yes, that's what my patch does.  At the time, it seemed like a good idea 
-- request the GPIO before touching its hardware.  But it appears that 
the 'request' function of some drivers also re-muxes the GPIO in order 
to honor the request.

The question is whether that's correct behavior.  I don't know.

-- 
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc.  Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.

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

* Regression in next with gpiolib
@ 2017-08-30 21:49   ` Timur Tabi
  0 siblings, 0 replies; 10+ messages in thread
From: Timur Tabi @ 2017-08-30 21:49 UTC (permalink / raw)
  To: linux-arm-kernel

On 08/30/2017 04:41 PM, Tony Lindgren wrote:
> It seems to be that we're now calling request and free on all gpios
> before they are properly configured?

Yes, that's what my patch does.  At the time, it seemed like a good idea 
-- request the GPIO before touching its hardware.  But it appears that 
the 'request' function of some drivers also re-muxes the GPIO in order 
to honor the request.

The question is whether that's correct behavior.  I don't know.

-- 
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc.  Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.

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

* Re: Regression in next with gpiolib
  2017-08-30 21:41 ` Tony Lindgren
  (?)
@ 2017-08-31  5:59   ` Linus Walleij
  -1 siblings, 0 replies; 10+ messages in thread
From: Linus Walleij @ 2017-08-31  5:59 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Timur Tabi, Grygorii Strashko, linux-gpio, linux-kernel,
	linux-arm-kernel, Linux-OMAP

On Wed, Aug 30, 2017 at 11:41 PM, Tony Lindgren <tony@atomide.com> wrote:

> Hi Timur, Linus & Grygorii,
>
> Looks like commit 108d23e322a2 ("gpiolib: request the gpio before
> querying its direction") caused a regression on at least pandaboard
> es with booting hanging shortly after gpio init.
>
> It seems to be that we're now calling request and free on all gpios
> before they are properly configured?
>
> I narrowed the hang down to gpio bank1 lines 7 and possibly 8 where
> not calling omap_gpio_free() on them makes the system boot again.
>
> These lines are used for the leds in omap4-panda-common.dtsi, and
> omap_gpio_free() will by default set the unused lines for input
> and bad things happen. I guess hardware failure could also happen
> although I have not seen it here.
>
> It seems a similar issue can exist on other platforms too,
> so it's probably a good idea to revert this for now.

I reverted it for now.

Yours,
Linus Walleij

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

* Re: Regression in next with gpiolib
@ 2017-08-31  5:59   ` Linus Walleij
  0 siblings, 0 replies; 10+ messages in thread
From: Linus Walleij @ 2017-08-31  5:59 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Timur Tabi, Grygorii Strashko, linux-gpio, linux-kernel,
	linux-arm-kernel, Linux-OMAP

On Wed, Aug 30, 2017 at 11:41 PM, Tony Lindgren <tony@atomide.com> wrote:

> Hi Timur, Linus & Grygorii,
>
> Looks like commit 108d23e322a2 ("gpiolib: request the gpio before
> querying its direction") caused a regression on at least pandaboard
> es with booting hanging shortly after gpio init.
>
> It seems to be that we're now calling request and free on all gpios
> before they are properly configured?
>
> I narrowed the hang down to gpio bank1 lines 7 and possibly 8 where
> not calling omap_gpio_free() on them makes the system boot again.
>
> These lines are used for the leds in omap4-panda-common.dtsi, and
> omap_gpio_free() will by default set the unused lines for input
> and bad things happen. I guess hardware failure could also happen
> although I have not seen it here.
>
> It seems a similar issue can exist on other platforms too,
> so it's probably a good idea to revert this for now.

I reverted it for now.

Yours,
Linus Walleij

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

* Regression in next with gpiolib
@ 2017-08-31  5:59   ` Linus Walleij
  0 siblings, 0 replies; 10+ messages in thread
From: Linus Walleij @ 2017-08-31  5:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Aug 30, 2017 at 11:41 PM, Tony Lindgren <tony@atomide.com> wrote:

> Hi Timur, Linus & Grygorii,
>
> Looks like commit 108d23e322a2 ("gpiolib: request the gpio before
> querying its direction") caused a regression on at least pandaboard
> es with booting hanging shortly after gpio init.
>
> It seems to be that we're now calling request and free on all gpios
> before they are properly configured?
>
> I narrowed the hang down to gpio bank1 lines 7 and possibly 8 where
> not calling omap_gpio_free() on them makes the system boot again.
>
> These lines are used for the leds in omap4-panda-common.dtsi, and
> omap_gpio_free() will by default set the unused lines for input
> and bad things happen. I guess hardware failure could also happen
> although I have not seen it here.
>
> It seems a similar issue can exist on other platforms too,
> so it's probably a good idea to revert this for now.

I reverted it for now.

Yours,
Linus Walleij

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

* Re: Regression in next with gpiolib
  2017-08-31  5:59   ` Linus Walleij
  (?)
@ 2017-08-31 14:02     ` Tony Lindgren
  -1 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2017-08-31 14:02 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Timur Tabi, Grygorii Strashko, linux-gpio, linux-kernel,
	linux-arm-kernel, Linux-OMAP

* Linus Walleij <linus.walleij@linaro.org> [170830 22:59]:
> On Wed, Aug 30, 2017 at 11:41 PM, Tony Lindgren <tony@atomide.com> wrote:
> 
> > Hi Timur, Linus & Grygorii,
> >
> > Looks like commit 108d23e322a2 ("gpiolib: request the gpio before
> > querying its direction") caused a regression on at least pandaboard
> > es with booting hanging shortly after gpio init.
> >
> > It seems to be that we're now calling request and free on all gpios
> > before they are properly configured?
> >
> > I narrowed the hang down to gpio bank1 lines 7 and possibly 8 where
> > not calling omap_gpio_free() on them makes the system boot again.
> >
> > These lines are used for the leds in omap4-panda-common.dtsi, and
> > omap_gpio_free() will by default set the unused lines for input
> > and bad things happen. I guess hardware failure could also happen
> > although I have not seen it here.
> >
> > It seems a similar issue can exist on other platforms too,
> > so it's probably a good idea to revert this for now.
> 
> I reverted it for now.

OK thanks!

Tony

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

* Re: Regression in next with gpiolib
@ 2017-08-31 14:02     ` Tony Lindgren
  0 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2017-08-31 14:02 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Timur Tabi, Grygorii Strashko, linux-gpio, linux-kernel,
	linux-arm-kernel, Linux-OMAP

* Linus Walleij <linus.walleij@linaro.org> [170830 22:59]:
> On Wed, Aug 30, 2017 at 11:41 PM, Tony Lindgren <tony@atomide.com> wrote:
> 
> > Hi Timur, Linus & Grygorii,
> >
> > Looks like commit 108d23e322a2 ("gpiolib: request the gpio before
> > querying its direction") caused a regression on at least pandaboard
> > es with booting hanging shortly after gpio init.
> >
> > It seems to be that we're now calling request and free on all gpios
> > before they are properly configured?
> >
> > I narrowed the hang down to gpio bank1 lines 7 and possibly 8 where
> > not calling omap_gpio_free() on them makes the system boot again.
> >
> > These lines are used for the leds in omap4-panda-common.dtsi, and
> > omap_gpio_free() will by default set the unused lines for input
> > and bad things happen. I guess hardware failure could also happen
> > although I have not seen it here.
> >
> > It seems a similar issue can exist on other platforms too,
> > so it's probably a good idea to revert this for now.
> 
> I reverted it for now.

OK thanks!

Tony

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

* Regression in next with gpiolib
@ 2017-08-31 14:02     ` Tony Lindgren
  0 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2017-08-31 14:02 UTC (permalink / raw)
  To: linux-arm-kernel

* Linus Walleij <linus.walleij@linaro.org> [170830 22:59]:
> On Wed, Aug 30, 2017 at 11:41 PM, Tony Lindgren <tony@atomide.com> wrote:
> 
> > Hi Timur, Linus & Grygorii,
> >
> > Looks like commit 108d23e322a2 ("gpiolib: request the gpio before
> > querying its direction") caused a regression on at least pandaboard
> > es with booting hanging shortly after gpio init.
> >
> > It seems to be that we're now calling request and free on all gpios
> > before they are properly configured?
> >
> > I narrowed the hang down to gpio bank1 lines 7 and possibly 8 where
> > not calling omap_gpio_free() on them makes the system boot again.
> >
> > These lines are used for the leds in omap4-panda-common.dtsi, and
> > omap_gpio_free() will by default set the unused lines for input
> > and bad things happen. I guess hardware failure could also happen
> > although I have not seen it here.
> >
> > It seems a similar issue can exist on other platforms too,
> > so it's probably a good idea to revert this for now.
> 
> I reverted it for now.

OK thanks!

Tony

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

end of thread, other threads:[~2017-08-31 14:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-30 21:41 Regression in next with gpiolib Tony Lindgren
2017-08-30 21:41 ` Tony Lindgren
2017-08-30 21:49 ` Timur Tabi
2017-08-30 21:49   ` Timur Tabi
2017-08-31  5:59 ` Linus Walleij
2017-08-31  5:59   ` Linus Walleij
2017-08-31  5:59   ` Linus Walleij
2017-08-31 14:02   ` Tony Lindgren
2017-08-31 14:02     ` Tony Lindgren
2017-08-31 14:02     ` Tony Lindgren

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.