linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@roeck-us.net (Guenter Roeck)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: sa1100: Initialize gpio after gpio subsystem has been initialized
Date: Fri, 1 Apr 2016 07:02:18 -0700	[thread overview]
Message-ID: <20160401140218.GA14502@roeck-us.net> (raw)
In-Reply-To: <CACRpkdYg3-XBBCmrKHK5EukEwxU3J4h_4BAKnoVHEiZbFkU5QA@mail.gmail.com>

On Fri, Apr 01, 2016 at 10:04:57AM +0200, Linus Walleij wrote:
> On Thu, Mar 31, 2016 at 6:21 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> > On Tue, Mar 29, 2016 at 11:15:49AM -0700, Guenter Roeck wrote:
> >> The sa1100 gpio driver was initialized from interrupt initialization code,
> >> which is earlier than the gpio subsystem is initialized. Since commit
> >> ff2b13592299 ("gpio: make the gpiochip a real device"), this is fatal
> >> and causes the system to crash.
> >>
> >> The sa1100 gpio driver must be initialized prior to arch_initcall, since
> >> its gpio pins are used in arch_initcall code, but after the gpio subsystem
> >> is initialized (core_initcall). Initialize it with postcore_initcall.
> >>
> >> Fixes: ff2b13592299 ("gpio: make the gpiochip a real device")
> >> Cc: Linus Walleij <linus.walleij@linaro.org>
> >> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> >
> > Please ignore/drop this patch - a better (cleaner) fix is in the works
> > for gpiolib.
> 
> This delivers though. I tested it on my also regressing iPAQ.
> 
I am a bit concerned that the gpio initialization was that early on purpose,
and that by moving it we might miss some use cases. I did not find any, but that
doesn't mean that there are none. Without knowing _why_ the initialization was
that early, I would prefer not to touch the code if it can be avoided.

Thanks,
Guenter

  reply	other threads:[~2016-04-01 14:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-29 18:15 [PATCH] ARM: sa1100: Initialize gpio after gpio subsystem has been initialized Guenter Roeck
2016-03-31 16:21 ` Guenter Roeck
2016-04-01  8:04   ` Linus Walleij
2016-04-01 14:02     ` Guenter Roeck [this message]
2016-04-03 16:35       ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160401140218.GA14502@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).