
On 23/11/2011 15:18, Igor Grinberg wrote:
Sorry, missed the below in the first reply
It does not matter...
+int board_init(void) +{
- gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
- /* boot param addr */
- gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
- writel(0x00000000, &gpmc_cfg->cs[1].config1);
- writel(0x001e1e01, &gpmc_cfg->cs[1].config2);
- writel(0x00080300, &gpmc_cfg->cs[1].config3);
- writel(0x1c091c09, &gpmc_cfg->cs[1].config4);
- writel(0x04181f1f, &gpmc_cfg->cs[1].config5);
- writel(0x00000FCF, &gpmc_cfg->cs[1].config6);
- writel(0x00000f61, &gpmc_cfg->cs[1].config7);
- writel(0x00000000, &gpmc_cfg->cs[3].config1);
- writel(0x001e1e01, &gpmc_cfg->cs[3].config2);
- writel(0x00080300, &gpmc_cfg->cs[3].config3);
- writel(0x1c091c09, &gpmc_cfg->cs[3].config4);
- writel(0x04181f1f, &gpmc_cfg->cs[3].config5);
- writel(0x00000FCF, &gpmc_cfg->cs[3].config6);
- writel(0x00000f63, &gpmc_cfg->cs[3].config7);
Can there be an explanation of what's that and why is it needed?
They are for a UART Controller (XR16L2751) and for the seconfd ethernet controller (SMC911X). I will explain this.
Also, it looks like you are writing the same values to both chip selects.
Why not ? The setup sets some relaxing time for both of them
Can enable_gpmc_cs_config() function be used here as well and the values documented (e.g. NET_GPMC_CONFIGx)?
Sure...the name NET_GPMC_CONFIG is quite misleading, the setup for a chip select has nothing to do with the NET. I see that on other boards this defines are always used to set the chipselect for an ethernet controller, but it is not a rule..
Best regards, Stefano Babic