blob: 561713949aa7c3a727d8b0293756b3c7b0518dfa [file] [log] [blame]
Patrick Georgiac959032020-05-05 22:49:26 +02001/* SPDX-License-Identifier: GPL-2.0-only */
T Michael Turneybd0b51c2019-03-21 14:20:52 -07002
3#include <cbfs.h>
4#include <fmap.h>
T Michael Turneybd0b51c2019-03-21 14:20:52 -07005#include <soc/symbols.h>
6#include <soc/qclib_common.h>
7
8int qclib_soc_blob_load(void)
9{
10 size_t size;
11 ssize_t ssize;
12
13 /* Attempt to load PMICCFG Blob */
14 size = cbfs_boot_load_file(CONFIG_CBFS_PREFIX "/pmiccfg",
15 _pmic, REGION_SIZE(pmic), CBFS_TYPE_RAW);
16 if (!size)
17 return -1;
18 qclib_add_if_table_entry(QCLIB_TE_PMIC_SETTINGS, _pmic, size, 0);
19
20 /* Attempt to load DCB Blob */
21 size = cbfs_boot_load_file(CONFIG_CBFS_PREFIX "/dcb",
22 _dcb, REGION_SIZE(dcb), CBFS_TYPE_RAW);
23 if (!size)
24 return -1;
25 qclib_add_if_table_entry(QCLIB_TE_DCB_SETTINGS, _dcb, size, 0);
26
27 /* Attempt to load Limits Config Blob */
28 ssize = fmap_read_area(QCLIB_FR_LIMITS_CFG_DATA, _limits_cfg,
29 REGION_SIZE(limits_cfg));
30 if (ssize < 0)
31 return -1;
32 qclib_add_if_table_entry(QCLIB_TE_LIMITS_CFG_DATA,
33 _limits_cfg, ssize, 0);
34
35 return 0;
36}