Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / drivers / hwtracing / coresight / coresight-cfg-preload.c
blobe237a4edfa0972b61e8d8aef12a0a1d0658e53db
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * Copyright(C) 2020 Linaro Limited. All rights reserved.
4 * Author: Mike Leach <mike.leach@linaro.org>
5 */
7 #include "coresight-cfg-preload.h"
8 #include "coresight-config.h"
9 #include "coresight-syscfg.h"
11 /* Basic features and configurations pre-loaded on initialisation */
13 static struct cscfg_feature_desc *preload_feats[] = {
14 #if IS_ENABLED(CONFIG_CORESIGHT_SOURCE_ETM4X)
15 &strobe_etm4x,
16 #endif
17 NULL
20 static struct cscfg_config_desc *preload_cfgs[] = {
21 #if IS_ENABLED(CONFIG_CORESIGHT_SOURCE_ETM4X)
22 &afdo_etm4x,
23 #endif
24 NULL
27 static struct cscfg_load_owner_info preload_owner = {
28 .type = CSCFG_OWNER_PRELOAD,
31 /* preload called on initialisation */
32 int cscfg_preload(void *owner_handle)
34 preload_owner.owner_handle = owner_handle;
35 return cscfg_load_config_sets(preload_cfgs, preload_feats, &preload_owner);