8078e900d1
Found using: diff <(git grep -l '#include <console/console.h>' -- src/) <(git grep -l 'console_time_report\|console_time_get_and_reset\|do_putchar\|vprintk\|printk\|console_log_level\|console_init\|get_log_level\|CONSOLE_ENABLE\|get_console_loglevel\|die_notify\|die_with_post_code\|die\|arch_post_code\|mainboard_post\|post_code\|RAM_SPEW\|RAM_DEBUG\|BIOS_EMERG\|BIOS_ALERT\|BIOS_CRIT\|BIOS_ERR\|BIOS_WARNING\|BIOS_NOTICE\|BIOS_INFO\|BIOS_DEBUG\|BIOS_SPEW\|BIOS_NEVER' -- src/) |grep "<" Change-Id: Ifc85ed8b5660eca11be50fddda0cf32aa1dd611c Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/60917 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org>
35 lines
865 B
C
35 lines
865 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
|
|
#include <stdint.h>
|
|
#include <soc/dramc_common.h>
|
|
#include <soc/dramc_param.h>
|
|
#include <soc/emi.h>
|
|
|
|
struct dramc_param *dramc_params;
|
|
|
|
bool is_dvfs_enabled(void)
|
|
{
|
|
dramc_info("dram_init: config_dvfs: %d\n",
|
|
dramc_params->dramc_datas.ddr_info.config_dvfs);
|
|
return !!(dramc_params->dramc_datas.ddr_info.config_dvfs);
|
|
}
|
|
|
|
u32 get_ddr_geometry(void)
|
|
{
|
|
dramc_info("dram_init: ddr_geometry: %d\n",
|
|
dramc_params->dramc_datas.ddr_info.sdram.ddr_geometry);
|
|
return dramc_params->dramc_datas.ddr_info.sdram.ddr_geometry;
|
|
}
|
|
|
|
u32 get_ddr_type(void)
|
|
{
|
|
dramc_info("dram_init: ddr_type: %d\n",
|
|
dramc_params->dramc_datas.ddr_info.sdram.ddr_type);
|
|
return dramc_params->dramc_datas.ddr_info.sdram.ddr_type;
|
|
}
|
|
|
|
void init_dram_by_params(struct dramc_param *dparam)
|
|
{
|
|
dramc_params = dparam;
|
|
mt_set_emi(dramc_params);
|
|
}
|