const struct rk3399_sdram_params *get_sdram_config() { if (cbfs_boot_load_struct(sdram_configs[get_sdram_index()], ¶ms, sizeof(params)) != sizeof(params)) die("Cannot load SDRAM parameter file!"); return ¶ms; }
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], ¶ms, sizeof(params)) != sizeof(params))) die("Cannot load SDRAM parameter file!"); return ¶ms; }