SDRAM initialization
This is mostly dependant on the SDRAM you are using. For example, take a look at the 
Application Note TN-46-08: Initialization Sequence for DDR SDRAM.

Also, I have found that the initialization sequence is not so strict. Usually you will stick with whatever is provided already and modify it according to your specific needs. If it doesn't work already, you might want to go into details and check with your SDRAM manufacturer's datasheet

ARM gives an example initialization sequence as well for various architectures, but considers them a "starting point".