linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* reset handling in am335x hwmod data
@ 2012-12-21 15:32 Peter Korsgaard
  2012-12-23 20:58 ` Paul Walmsley
  0 siblings, 1 reply; 19+ messages in thread
From: Peter Korsgaard @ 2012-12-21 15:32 UTC (permalink / raw)
  To: linux-omap

Hi,

On a custom am335x board I was surprised to see the kernel resetting
gpio pins not mentioned anywhere in the dts.

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? I don't have any
experience with omap hwmod, but on other (non-TI) boards I haven't
experienced similar issues. Should E.G. the gpio controllers be changed
to not reset or should it be configurable in the dts?

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2013-07-02 13:57 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).