
Dear "Martijn de Gouw",
In message 4CD35CD1F8085945B597F80EEC8942130192DEC8@exc01.bk.prodrive.nl you wrote:
+#ifdef CFG_SDR_CONFIG mov r1, #CFG_SDR_CONFIG
- mov r9, #0xff
+#else
- mov r1, #0x1d /* 256 MB, two banks of 128 MB */
- mov r9, #0
+#endif
I don't want such $ifdef's in global code. Why do you thinkthat 2 x 128 MB would be a default configuration for all IXP based boards?
When CFG_SDR_CONFIG is defined, it holds the memory size, which is set in the config.h When this value is not set, autodetection is assumed. Setting up the board as 2 x 128Mb is used for the autodetection.
You could set CFG_SDR_CONFIG to that value in your board config file and avoid the #ifdef ?
get_ram_size will nog set the memory controller to the correct size.
No, it does not set the size, it auto-detects the size that can be seen for a specific configuration of the memory controller.
The ixp can not run C code when memory is not initialized.
Has it not enough on-chip memory or caches for that like other processors?
Best regards,
Wolfgang Denk