From: Kevin Hilman <khilman@linaro.org>
To: balbi@ti.com
Cc: Paul Walmsley <paul@pwsan.com>,
Peter Korsgaard <jacmet@sunsite.dk>,
linux-omap@vger.kernel.org, Tony Lindgren <tony@atomide.com>
Subject: Re: reset handling in am335x hwmod data
Date: Fri, 17 May 2013 10:08:40 -0700 [thread overview]
Message-ID: <877gixsfdz.fsf@linaro.org> (raw)
In-Reply-To: <20130517135022.GH14133@arwen.pp.htv.fi> (Felipe Balbi's message of "Fri, 17 May 2013 16:50:22 +0300")
Felipe Balbi <balbi@ti.com> writes:
> Hi,
>
> On Sun, Dec 23, 2012 at 08:58:13PM +0000, Paul Walmsley wrote:
>> > In this specific case the pin is connected to nCONFIG of a FPGA. The
>> > FPGA is commanded to start configuration from a SPI flash in the
>> > bootloader, so it can happen in parallel with kernel
>> > load/uncompress/startup, but as the kernel resets the gpio during
>> > initialization this doesn't work.
>> >
>> > Digging a bit into it, I see the hwmod of the gpio controller is
>> > configured to reset at startup, and it works correctly (E.G. the pin is
>> > left asserted) if I change it to HWMOD_INIT_NO_RESET:
>> >
>> > --- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
>> > +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
>> > @@ -992,7 +992,7 @@ static struct omap_hwmod am33xx_gpio1_hwmod = {
>> > .name = "gpio2",
>> > .class = &am33xx_gpio_hwmod_class,
>> > .clkdm_name = "l4ls_clkdm",
>> > - .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
>> > + .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
>> > .mpu_irqs = am33xx_gpio1_irqs,
>> > .main_clk = "l4ls_gclk",
>> > .prcm = {
>> >
>> > Now the question is why is this configured like this?
>>
>> This behavior is intended to decouple the kernel from the bootloader, or
>> previously-booted operating system (e.g., the kexec case). The original
>> goal was to place the system in an known safe state as soon as possible
>> after the kernel starts. This is to prevent misconfigured or
>
> there is one "issue" with this. At least on AM335x starter kit, GPIO0_7
> is used as DDR power pin. If we reset that GPIO bank, DDR looses power
> and "for obscure reasons" (:-)) the board doesn't boot.
>
> In this case, we cannot reset that bank, otherwise Starter Kit will
> never boot in mainline. Bad PCB design, I know, but it's not something
> we can change now :-)
FWIW, we've seen this before (GPIO connected to PMIC reset is a fun
one), and this is why we have omap_hwmod_no_setup_reset().
Kevin
next prev parent reply other threads:[~2013-05-17 17:08 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-21 15:32 reset handling in am335x hwmod data Peter Korsgaard
2012-12-23 20:58 ` Paul Walmsley
2013-01-10 7:50 ` Peter Korsgaard
2013-01-18 14:18 ` Peter Korsgaard
2013-01-22 2:53 ` Paul Walmsley
2013-05-17 13:50 ` Felipe Balbi
2013-05-17 13:53 ` Peter Korsgaard
2013-05-17 17:08 ` Kevin Hilman [this message]
2013-05-17 18:10 ` Peter Korsgaard
2013-05-17 18:19 ` Nishanth Menon
2013-05-20 6:38 ` Hiremath, Vaibhav
2013-05-20 6:55 ` Hiremath, Vaibhav
2013-05-20 15:06 ` Nishanth Menon
2013-05-20 17:47 ` Hiremath, Vaibhav
2013-05-20 18:03 ` Nishanth Menon
2013-05-20 18:20 ` Hiremath, Vaibhav
2013-06-28 10:54 ` Felipe Balbi
2013-07-02 4:37 ` Hiremath, Vaibhav
2013-07-02 13:57 ` Nishanth Menon
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=877gixsfdz.fsf@linaro.org \
--to=khilman@linaro.org \
--cc=balbi@ti.com \
--cc=jacmet@sunsite.dk \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.com \
--cc=tony@atomide.com \
/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 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.