コード例 #1
0
ファイル: sdram.c プロジェクト: Astralix/hardware_drivers
/*
 * Autodetect onboard DDR SDRAM on 85xx platforms
 *
 * NOTE: Some of the hardcoded values are hardware dependant,
 *       so this should be extended for other future boards
 *       using this routine!
 */
phys_size_t fixed_sdram(void)
{
	int casl = 0;
	phys_size_t dram_size = 0;

	casl = cas_latency();
	dram_size = sdram_setup(casl);
	if ((dram_size == 0) && (casl != CONFIG_DDR_DEFAULT_CL)) {
		/*
		 * Try again with default CAS latency
		 */
		printf("Problem with CAS lantency, using default CL %d/10!\n",
		       CONFIG_DDR_DEFAULT_CL);
		dram_size = sdram_setup(CONFIG_DDR_DEFAULT_CL);
		puts("       ");
	}
	return dram_size;
}
コード例 #2
0
ファイル: sdram.c プロジェクト: xhnae86/uboot_tiny4412
phys_size_t initdram (int board_type)
{
    long dram_size = 0;
#if defined(CONFIG_SPD_EEPROM)
    dram_size = fsl_ddr_sdram();
    dram_size = setup_ddr_tlbs(dram_size / 0x100000);
    dram_size *= 0x100000;
#else
    dram_size = sdram_setup(CONFIG_DDR_DEFAULT_CL);
#endif
    return dram_size;
}