Hi hardware guys.
How do you debug the kernel code executed before the machine is initialized : before init_machine() is called?
The case:
I see on my board that one of the GPIO's state change. (this is GPIO0_6, to be specific).
To my understanding, this is strange : I expect all the periferal devices' state is preserved from the U-boot set values.
I added a LED blinking code, to the init_machine() /alias of am335x_evm_init() from the SK support code/ , and using oscilloscope found that GPIO state changes some ~40 milliseconds *BEFORE* the init_machine() is entered.
I want to find out why is it happening but no LED blinking (GPIO conrol) code works there, in the code above init_machine() /maybe pinmuxing is destroyed?/, nor a printk() helps because it is asynchronous: printout goes to the memory, not to the UART, and therefore I cannot trace that 40ms interval. Not even a mdelay()/udelay() methods seem to be functional in certain places of the kernel init code.
So, please kindly share your ideas/knowledge on how to get a bit of information, synchronously (anything better than memory printing with the printk), for hardware debug, from the code executed in the main.c at kernel_init() and around, before the board is initialized, and after the decompress_kernel() / kernel start.
Thanks.