reset handling in am335x hwmod data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux