Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * Copyright(C) 2020 Linaro Limited. All rights reserved.
0004  * Author: Mike Leach <mike.leach@linaro.org>
0005  */
0006 
0007 #include "coresight-cfg-preload.h"
0008 #include "coresight-config.h"
0009 #include "coresight-syscfg.h"
0010 
0011 /* Basic features and configurations pre-loaded on initialisation */
0012 
0013 static struct cscfg_feature_desc *preload_feats[] = {
0014 #if IS_ENABLED(CONFIG_CORESIGHT_SOURCE_ETM4X)
0015     &strobe_etm4x,
0016 #endif
0017     NULL
0018 };
0019 
0020 static struct cscfg_config_desc *preload_cfgs[] = {
0021 #if IS_ENABLED(CONFIG_CORESIGHT_SOURCE_ETM4X)
0022     &afdo_etm4x,
0023 #endif
0024     NULL
0025 };
0026 
0027 static struct cscfg_load_owner_info preload_owner = {
0028     .type = CSCFG_OWNER_PRELOAD,
0029 };
0030 
0031 /* preload called on initialisation */
0032 int cscfg_preload(void *owner_handle)
0033 {
0034     preload_owner.owner_handle = owner_handle;
0035     return cscfg_load_config_sets(preload_cfgs, preload_feats, &preload_owner);
0036 }