tree: Remove unused <assert.h>
[coreboot.git] / src / soc / mediatek / common / dram_init.c
blobd94c3fc539c0047ae851bce14b770944b5faaca8
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <stdint.h>
4 #include <soc/dramc_common.h>
5 #include <soc/dramc_param.h>
6 #include <soc/emi.h>
8 struct dramc_param *dramc_params;
10 bool is_dvfs_enabled(void)
12 dramc_info("dram_init: config_dvfs: %d\n",
13 dramc_params->dramc_datas.ddr_info.config_dvfs);
14 return !!(dramc_params->dramc_datas.ddr_info.config_dvfs);
17 u32 get_ddr_geometry(void)
19 dramc_info("dram_init: ddr_geometry: %d\n",
20 dramc_params->dramc_datas.ddr_info.sdram.ddr_geometry);
21 return dramc_params->dramc_datas.ddr_info.sdram.ddr_geometry;
24 u32 get_ddr_type(void)
26 dramc_info("dram_init: ddr_type: %d\n",
27 dramc_params->dramc_datas.ddr_info.sdram.ddr_type);
28 return dramc_params->dramc_datas.ddr_info.sdram.ddr_type;
31 void init_dram_by_params(struct dramc_param *dparam)
33 dramc_params = dparam;
34 mt_set_emi(dramc_params);