
Dear anupbehare@gmail.com,
In message 001636ed6c7e8c9189047d1cab86@google.com you wrote:
We bypass the trap_init call, control enters into the flash_init() in cfi_flash.c
...
to more debug we bypass the hang call for time being and we obtain u-boot prompt.
This is random hacking and will not take you anywhere.
The Golden Rule (TM) is to stop at the very first error, and analyze and _fix_ it before continuing.
I bet a case of beer that your RAM initialization is broken, and all your changes are just hushing up the problems, which will bite you later, harder.
Follow Stefan's advice and get your RAM setup working reliably and stable, before doing anything else.
Feel free to ignore the advice if you like wasting your time, but then please stop asking here so you not also waste our time, too.
Best regards,
Wolfgang Denk