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.

Earlyprintk causes boot hang for am335x.

In the 3.12 kernel, I turned on earlyprintk so that I could troubleshoot another issue with kexec.

But whenever I enabled earlyprink with the kernel command line option, the boot would hang.

So after a long time of hacking around, inserting printk statements and other hacks, I had some partial success getting earlyprink output.

The first hang occurred when timer2 was disabled, 

So I added the flags line in the following structure in omap_hwmod_33xx_data.c:

static struct omap_hwmod am33xx_timer2_hwmod = {
	.name		= "timer2",
	.class		= &am33xx_timer_hwmod_class,
	.clkdm_name	= "l4ls_clkdm",
	.flags          = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET ),
	.prcm		= {
		.omap4	= {
			.modulemode	= MODULEMODE_SWCTRL,
		},
	},
};

That got me much further in the bootup process.

The next hang occurred when the console uart was reset, so I did an incredibly evil hack in omap_hwmod.c: _ocp_softreset(...);

if (strcmp(oh->name, "uart2") == 0)
return -EINVAL;

That got me much further to the point where I get another error:

5.399159] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 88, base_baud = 3000000) is a OMAP UART0
[ 5.409321] of_get_named_gpio_flags: can't parse gpios property of node '/ocp/serial@48022000[0]'
[ 5.418780] omap_hwmod: uart2: enabling
[ 5.422813] ------------[ cut here ]------------
[ 5.427670] WARNING: CPU: 0 PID: 1 at arch/arm/mach-omap2/omap_hwmod.c:2264 _enable+0x2a0/0x2c8()
[ 5.436879] omap_hwmod: uart2: enabled state can only be entered from initialized, idle, or disabled state
[ 5.446891] Modules linked in:
[ 5.450

Can someone shed some light on this and help me figure out what the right fix should be?

Thanks,

Brian