This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

uboot设置的gpio被Linux内核复位,求锁定方法。



是这样的,我们的系统的ddr3内存供电是由外部电源芯片提供,它有自己的使能脚。类似startkit。
在uboot的阶段,我们用uboot使能ddr3的电源,工作良好。
但是一旦跳转进入内核,内核就把设置的所有使能管脚都复位了。内核就卡住了。
 
后来我们把ddr3的电源强制拉高,终于能成功启动,确认这个问题。
 
 在内核插入调试信息后,几乎就绝望了。
 强制拉高ddr3电源的时候应该是这样的。
但是,实际操作结果说明,当内核的boot代码运行之后,运行权交由内核之前(start_kernel()),gpio被置零了。
启动在解压完毕后就停止了。
 
  • 也有可能,因为kernel起来会重新配置PLL,所以可能会导致GPIO的重置。

    那么请问不用gpio直接使能DDR3.

  • 最新的sdk好像解决了这个问题。

    5.6版的可以修改代码

    ./arch/arm/mach-omap2/omap_hwmod_33xx_data.c 

    static struct omap_hwmod am33xx_gpio2_hwmod = {
            .name           = "gpio3",
            .class          = &am33xx_gpio_hwmod_class,
            .clkdm_name     = "l4ls_clkdm",
            .mpu_irqs       = am33xx_gpio2_irqs,
            .main_clk       = "gpio2_ick",
            .flags          = HWMOD_INIT_NO_RESET | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
            .prcm           = {
                    .omap4  = {
                            .clkctrl_offs   = AM33XX_CM_PER_GPIO2_CLKCTRL_OFFSET,
                            .modulemode     = MODULEMODE_SWCTRL,
                    },
            },
            .opt_clks       = gpio2_opt_clks,
            .opt_clks_cnt   = ARRAY_SIZE(gpio2_opt_clks),
            .dev_attr       = &gpio_dev_attr,
            .slaves         = am33xx_gpio2_slaves,
            .slaves_cnt     = ARRAY_SIZE(am33xx_gpio2_slaves),
    };

    上面是我从一个技术支持的邮件里拷的。