17fdc9bb2SMike Leach // SPDX-License-Identifier: GPL-2.0 27fdc9bb2SMike Leach /* 37fdc9bb2SMike Leach * Copyright(C) 2020 Linaro Limited. All rights reserved. 47fdc9bb2SMike Leach * Author: Mike Leach <mike.leach@linaro.org> 57fdc9bb2SMike Leach */ 67fdc9bb2SMike Leach 77fdc9bb2SMike Leach #include "coresight-cfg-preload.h" 87fdc9bb2SMike Leach #include "coresight-config.h" 97fdc9bb2SMike Leach #include "coresight-syscfg.h" 107fdc9bb2SMike Leach 117fdc9bb2SMike Leach /* Basic features and configurations pre-loaded on initialisation */ 127fdc9bb2SMike Leach 137fdc9bb2SMike Leach static struct cscfg_feature_desc *preload_feats[] = { 147fdc9bb2SMike Leach #if IS_ENABLED(CONFIG_CORESIGHT_SOURCE_ETM4X) 157fdc9bb2SMike Leach &strobe_etm4x, 167fdc9bb2SMike Leach #endif 177fdc9bb2SMike Leach NULL 187fdc9bb2SMike Leach }; 197fdc9bb2SMike Leach 207fdc9bb2SMike Leach static struct cscfg_config_desc *preload_cfgs[] = { 217fdc9bb2SMike Leach #if IS_ENABLED(CONFIG_CORESIGHT_SOURCE_ETM4X) 227fdc9bb2SMike Leach &afdo_etm4x, 237fdc9bb2SMike Leach #endif 247fdc9bb2SMike Leach NULL 257fdc9bb2SMike Leach }; 267fdc9bb2SMike Leach 27*da7000e8SMike Leach static struct cscfg_load_owner_info preload_owner = { 28*da7000e8SMike Leach .type = CSCFG_OWNER_PRELOAD, 29*da7000e8SMike Leach }; 30*da7000e8SMike Leach 317fdc9bb2SMike Leach /* preload called on initialisation */ cscfg_preload(void * owner_handle)32*da7000e8SMike Leachint cscfg_preload(void *owner_handle) 337fdc9bb2SMike Leach { 34*da7000e8SMike Leach preload_owner.owner_handle = owner_handle; 35*da7000e8SMike Leach return cscfg_load_config_sets(preload_cfgs, preload_feats, &preload_owner); 367fdc9bb2SMike Leach } 37