drivers/net/ipa/ipa_reg.c
Source file repositories/reference/linux-study-clean/drivers/net/ipa/ipa_reg.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ipa/ipa_reg.c- Extension
.c- Size
- 3898 bytes
- Lines
- 171
- Domain
- Driver Families
- Bucket
- drivers/net
- 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
linux/io.hlinux/platform_device.hipa.hipa_reg.h
Detected Declarations
function Copyrightfunction ipa_reg_initfunction ipa_reg_exit
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
* Copyright (C) 2019-2024 Linaro Ltd.
*/
#include <linux/io.h>
#include <linux/platform_device.h>
#include "ipa.h"
#include "ipa_reg.h"
/* Is this register ID valid for the current IPA version? */
static bool ipa_reg_id_valid(struct ipa *ipa, enum ipa_reg_id reg_id)
{
enum ipa_version version = ipa->version;
switch (reg_id) {
case FILT_ROUT_HASH_EN:
return version == IPA_VERSION_4_2;
case FILT_ROUT_HASH_FLUSH:
return version < IPA_VERSION_5_0 && version != IPA_VERSION_4_2;
case FILT_ROUT_CACHE_FLUSH:
case ENDP_FILTER_CACHE_CFG:
case ENDP_ROUTER_CACHE_CFG:
return version >= IPA_VERSION_5_0;
case IPA_BCR:
case COUNTER_CFG:
return version < IPA_VERSION_4_5;
case IPA_TX_CFG:
case FLAVOR_0:
case IDLE_INDICATION_CFG:
return version >= IPA_VERSION_3_5;
case QTIME_TIMESTAMP_CFG:
case TIMERS_XO_CLK_DIV_CFG:
case TIMERS_PULSE_GRAN_CFG:
return version >= IPA_VERSION_4_5;
case SRC_RSRC_GRP_45_RSRC_TYPE:
case DST_RSRC_GRP_45_RSRC_TYPE:
return version <= IPA_VERSION_3_1 ||
version == IPA_VERSION_4_5 ||
version >= IPA_VERSION_5_0;
case SRC_RSRC_GRP_67_RSRC_TYPE:
case DST_RSRC_GRP_67_RSRC_TYPE:
return version <= IPA_VERSION_3_1 ||
version >= IPA_VERSION_5_0;
case ENDP_FILTER_ROUTER_HSH_CFG:
return version < IPA_VERSION_5_0 &&
version != IPA_VERSION_4_2;
case IRQ_SUSPEND_EN:
case IRQ_SUSPEND_CLR:
return version >= IPA_VERSION_3_1;
case COMP_CFG:
case CLKON_CFG:
case ROUTE:
case SHARED_MEM_SIZE:
case QSB_MAX_WRITES:
case QSB_MAX_READS:
case STATE_AGGR_ACTIVE:
case LOCAL_PKT_PROC_CNTXT:
case AGGR_FORCE_CLOSE:
case SRC_RSRC_GRP_01_RSRC_TYPE:
case SRC_RSRC_GRP_23_RSRC_TYPE:
case DST_RSRC_GRP_01_RSRC_TYPE:
case DST_RSRC_GRP_23_RSRC_TYPE:
case ENDP_INIT_CTRL:
case ENDP_INIT_CFG:
case ENDP_INIT_NAT:
case ENDP_INIT_HDR:
case ENDP_INIT_HDR_EXT:
case ENDP_INIT_HDR_METADATA_MASK:
case ENDP_INIT_MODE:
case ENDP_INIT_AGGR:
case ENDP_INIT_HOL_BLOCK_EN:
case ENDP_INIT_HOL_BLOCK_TIMER:
case ENDP_INIT_DEAGGR:
case ENDP_INIT_RSRC_GRP:
case ENDP_INIT_SEQ:
case ENDP_STATUS:
case IPA_IRQ_STTS:
Annotation
- Immediate include surface: `linux/io.h`, `linux/platform_device.h`, `ipa.h`, `ipa_reg.h`.
- Detected declarations: `function Copyright`, `function ipa_reg_init`, `function ipa_reg_exit`.
- Atlas domain: Driver Families / drivers/net.
- 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.