I flashed u-boot and linux in my custom board based on ARM9 based SoC(KSZ9692PBI from micrel). Board has 8MB NOR flash,64MB DDR. I am facing the following issues
Even though we don't know for sure that this is the OP's problem, I've decided to elevate my comments to an answer to better preserve it.
I've worked on a custom board with an ARM9 SOC and DDR3 chips. It was laid out from the manufacturer's reference board schematic and I was initially running it with the same memory controller configuration as the reference board. Most boards worked correctly but some showed similar symptoms to what you are seeing.
During debug, we noted that even though the DDR chips were not warm to the touch, cooling them with freeze spray would make the board work correctly. As long as the DDR was kept cool, the board would run
mtest indefinitely, and even boot into Linux and continue running. If we allowed the chips to warm back up, the board would hang.
Our hardware guys decided that it must be timing and the cooling was changing the chip timing enough to make the memory controller configuration work. We contacted our vendor (Marvell) and they provided a tool which ran through the JTAG pod to center the timing and provide the proper controller configuration.
This solved the problem on all failing boards.