diff options
author | Ravi Kumar Bokka <rbokka@codeaurora.org> | 2021-03-31 08:05:24 +0530 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-04-08 06:49:27 +0000 |
commit | 1faaa16a0831ba0926f2a0b59cde19a95c72d5b2 (patch) | |
tree | 12933bc9408e1d388e8059bd61afdd5d2707de98 /src/soc/qualcomm/common | |
parent | 6fce9cd97d13641f8724811ec7b6470fbcba2fdf (diff) | |
download | coreboot-1faaa16a0831ba0926f2a0b59cde19a95c72d5b2.tar.xz |
soc/qualcomm: move code to common
This commit includes makefile cleanup to exclude common source file
compilation in each stage by using all-y flag.
BUG=b:182963902
TEST=trogdor validated on limozeen
Change-Id: I48464567974a0729c1c6b6157bcce4fac39a8b38
Signed-off-by: T Michael Turney <mturney@codeaurora.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51758
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shelley Chen <shchen@google.com>
Diffstat (limited to 'src/soc/qualcomm/common')
-rw-r--r-- | src/soc/qualcomm/common/include/soc/symbols_common.h | 6 | ||||
-rw-r--r-- | src/soc/qualcomm/common/qclib.c | 18 | ||||
-rw-r--r-- | src/soc/qualcomm/common/timer.c | 10 |
3 files changed, 29 insertions, 5 deletions
diff --git a/src/soc/qualcomm/common/include/soc/symbols_common.h b/src/soc/qualcomm/common/include/soc/symbols_common.h index 3a316c41e7..5180da219f 100644 --- a/src/soc/qualcomm/common/include/soc/symbols_common.h +++ b/src/soc/qualcomm/common/include/soc/symbols_common.h @@ -16,14 +16,10 @@ DECLARE_REGION(dcb) DECLARE_REGION(pmic) DECLARE_REGION(limits_cfg) DECLARE_REGION(aop) -DECLARE_REGION(shrm) -DECLARE_REGION(dram_cpucp) +DECLARE_REGION(modem_id) DECLARE_REGION(aop_code_ram) DECLARE_REGION(aop_data_ram) -DECLARE_REGION(dram_wlan) -DECLARE_REGION(dram_wpss) DECLARE_REGION(dram_modem_wifi_only) DECLARE_REGION(dram_modem_extra) -DECLARE_REGION(modem_id) #endif // _SOC_QUALCOMM_SYMBOLS_COMMON_H_ diff --git a/src/soc/qualcomm/common/qclib.c b/src/soc/qualcomm/common/qclib.c index 6f2a6f1b61..e016f25740 100644 --- a/src/soc/qualcomm/common/qclib.c +++ b/src/soc/qualcomm/common/qclib.c @@ -139,6 +139,24 @@ void qclib_load_and_run(void) qclib_add_if_table_entry(QCLIB_TE_DDR_TRAINING_DATA, _ddr_training, REGION_SIZE(ddr_training), 0); + /* Attempt to load PMICCFG Blob */ + data_size = cbfs_load(CONFIG_CBFS_PREFIX "/pmiccfg", + _pmic, REGION_SIZE(pmic)); + if (!data_size) { + printk(BIOS_ERR, "[%s] /pmiccfg failed\n", __func__); + goto fail; + } + qclib_add_if_table_entry(QCLIB_TE_PMIC_SETTINGS, _pmic, data_size, 0); + + /* Attempt to load DCB Blob */ + data_size = cbfs_load(CONFIG_CBFS_PREFIX "/dcb", + _dcb, REGION_SIZE(dcb)); + if (!data_size) { + printk(BIOS_ERR, "[%s] /dcb failed\n", __func__); + goto fail; + } + qclib_add_if_table_entry(QCLIB_TE_DCB_SETTINGS, _dcb, data_size, 0); + /* hook for SoC specific binary blob loads */ if (qclib_soc_blob_load()) { printk(BIOS_ERR, "qclib_soc_blob_load failed\n"); diff --git a/src/soc/qualcomm/common/timer.c b/src/soc/qualcomm/common/timer.c new file mode 100644 index 0000000000..19e466aa17 --- /dev/null +++ b/src/soc/qualcomm/common/timer.c @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <delay.h> +#include <arch/lib_helpers.h> +#include <commonlib/helpers.h> + +void init_timer(void) +{ + raw_write_cntfrq_el0(19200*KHz); +} |