drivers/hwtracing/coresight/coresight-cfg-afdo.c
Source file repositories/reference/linux-study-clean/drivers/hwtracing/coresight/coresight-cfg-afdo.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/hwtracing/coresight/coresight-cfg-afdo.c- Extension
.c- Size
- 3785 bytes
- Lines
- 155
- Domain
- Driver Families
- Bucket
- drivers/hwtracing
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
coresight-config.hcoresight-etm4x-cfg.hcoresight-cfg-preload.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright(C) 2020 Linaro Limited. All rights reserved.
* Author: Mike Leach <mike.leach@linaro.org>
*/
#include "coresight-config.h"
/* ETMv4 includes and features */
#if IS_ENABLED(CONFIG_CORESIGHT_SOURCE_ETM4X)
#include "coresight-etm4x-cfg.h"
#include "coresight-cfg-preload.h"
/* preload configurations and features */
/* preload in features for ETMv4 */
/* strobe feature */
static struct cscfg_parameter_desc strobe_params[] = {
{
.name = "window",
.value = 5000,
},
{
.name = "period",
.value = 10000,
},
};
static struct cscfg_regval_desc strobe_regs[] = {
/* resource selectors */
{
.type = CS_CFG_REG_TYPE_RESOURCE,
.offset = TRCRSCTLRn(2),
.hw_info = ETM4_CFG_RES_SEL,
.val32 = 0x20001,
},
{
.type = CS_CFG_REG_TYPE_RESOURCE,
.offset = TRCRSCTLRn(3),
.hw_info = ETM4_CFG_RES_SEQ,
.val32 = 0x20002,
},
/* strobe window counter 0 - reload from param 0 */
{
.type = CS_CFG_REG_TYPE_RESOURCE | CS_CFG_REG_TYPE_VAL_SAVE,
.offset = TRCCNTVRn(0),
.hw_info = ETM4_CFG_RES_CTR,
},
{
.type = CS_CFG_REG_TYPE_RESOURCE | CS_CFG_REG_TYPE_VAL_PARAM,
.offset = TRCCNTRLDVRn(0),
.hw_info = ETM4_CFG_RES_CTR,
.val32 = 0,
},
{
.type = CS_CFG_REG_TYPE_RESOURCE,
.offset = TRCCNTCTLRn(0),
.hw_info = ETM4_CFG_RES_CTR,
.val32 = 0x10001,
},
/* strobe period counter 1 - reload from param 1 */
{
.type = CS_CFG_REG_TYPE_RESOURCE | CS_CFG_REG_TYPE_VAL_SAVE,
.offset = TRCCNTVRn(1),
.hw_info = ETM4_CFG_RES_CTR,
},
{
.type = CS_CFG_REG_TYPE_RESOURCE | CS_CFG_REG_TYPE_VAL_PARAM,
.offset = TRCCNTRLDVRn(1),
.hw_info = ETM4_CFG_RES_CTR,
.val32 = 1,
},
{
.type = CS_CFG_REG_TYPE_RESOURCE,
.offset = TRCCNTCTLRn(1),
.hw_info = ETM4_CFG_RES_CTR,
.val32 = 0x8102,
},
/* sequencer */
{
.type = CS_CFG_REG_TYPE_RESOURCE,
.offset = TRCSEQEVRn(0),
.hw_info = ETM4_CFG_RES_SEQ,
.val32 = 0x0081,
},
{
.type = CS_CFG_REG_TYPE_RESOURCE,
.offset = TRCSEQEVRn(1),
.hw_info = ETM4_CFG_RES_SEQ,
Annotation
- Immediate include surface: `coresight-config.h`, `coresight-etm4x-cfg.h`, `coresight-cfg-preload.h`.
- Atlas domain: Driver Families / drivers/hwtracing.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.