soc/qualcomm/x1p42100: Add mainboard hook for QcLib override
Introduce a weak function qclib_mainboard_override to allow mainboards to customize QcLib policies or global attributes. This hook is called from the SoC-specific QcLib initialization path. BUG=b:457566143 TEST=Configure QcLib policy for Google/Quenbi. Change-Id: I0397b7138db260973ea86852cfa9f408e14d195d Signed-off-by: Kapil Porwal <kapilporwal@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/90510 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Subrata Banik <subratabanik@google.com>
This commit is contained in:
parent
8ece648c30
commit
eb79807bec
2 changed files with 9 additions and 0 deletions
|
|
@ -86,6 +86,7 @@ void qclib_add_if_table_entry(const char *name, void *base,
|
|||
void qclib_load_and_run(void);
|
||||
void qclib_rerun(void);
|
||||
int qclib_soc_override(struct qclib_cb_if_table *table);
|
||||
int qclib_mainboard_override(struct qclib_cb_if_table *table);
|
||||
bool qclib_check_dload_mode(void);
|
||||
|
||||
const char *qclib_file_default(enum qclib_cbfs_file file);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
#include <soc/symbols_common.h>
|
||||
#include <soc/addressmap.h>
|
||||
|
||||
__weak int qclib_mainboard_override(struct qclib_cb_if_table *table) { return 0; }
|
||||
|
||||
bool qclib_check_dload_mode(void)
|
||||
{
|
||||
if (!CONFIG(QC_RAMDUMP_ENABLE))
|
||||
|
|
@ -55,5 +57,11 @@ int qclib_soc_override(struct qclib_cb_if_table *table)
|
|||
|
||||
qclib_add_if_table_entry(QCLIB_TE_SHRM_META_SETTINGS, _qc_blob_meta, data_size, 0);
|
||||
|
||||
/* hook for platform specific policy configuration */
|
||||
if (qclib_mainboard_override(table)) {
|
||||
printk(BIOS_ERR, "qclib_mainboard_override failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue