problems with am335x_sdram_size()

Giorgio Dal Molin giorgio.nicole at arcor.de
Thu Mar 1 06:23:33 PST 2018


Hi,

working with the TI AM335x Evaluation Module I noticed that the function
am335x_sdram_size() always returns 0 instead of the computed sdram size.

I could trace back the problem to the fact that the function does its 
computation based on the value of the register CM_EMIF_SDRAM_CONFIG
(addr. 0x44e10110), but this register is not written to by the function
am33xx_config_sdram() and just returns its initial value (0).
The datasheet says CM_EMIF_SDRAM_CONFIG should have the same value as
AM33XX_EMIF4_0_REG(SDRAM_CONFIG) (addr. 0x4c000008)

To conclude, to fix the problem with am335x_sdram_size() you can either
use AM33XX_EMIF4_0_REG(SDRAM_CONFIG) instead of CM_EMIF_SDRAM_CONFIG
in am335x_sdram_size()

 or

initialize CM_EMIF_SDRAM_CONFIG in am33xx_config_sdram() with the same value
as AM33XX_EMIF4_0_REG(SDRAM_CONFIG) (regs->sdram_config)

giorgio



More information about the barebox mailing list