Beispiel #1
0
const struct rk3399_sdram_params *get_sdram_config()
{
	if (cbfs_boot_load_struct(sdram_configs[get_sdram_index()],
				  &params, sizeof(params)) != sizeof(params))
		die("Cannot load SDRAM parameter file!");
	return &params;
}
Beispiel #2
0
const struct rk3399_sdram_params *get_sdram_config()
{
	uint32_t ramcode;

	ramcode = ram_code();
	if (ramcode >= ARRAY_SIZE(sdram_configs) || !sdram_configs[ramcode] ||
	    (cbfs_boot_load_struct(sdram_configs[ramcode],
				   &params, sizeof(params)) != sizeof(params)))
		die("Cannot load SDRAM parameter file!");
	return &params;
}