We need to implement SDRAM autodetection in U-Boot. Assuming a list of supported memory configurations is available, the algorithm should look like this:
1. reset all the DDR3 subsystem (EMIF controller, DDR3 memory etc.)
2. initialize EMIF controller, DDR3 memory, PHY
3. test memory
4. if test passed exit else move to next configuration in the list
5. go to step 1
It is not clear how to perform step 1. Is it availbale a code snippet showing this?
Thank you.