drivers/memory/tegra/tegra30.c
Source file repositories/reference/linux-study-clean/drivers/memory/tegra/tegra30.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/memory/tegra/tegra30.c- Extension
.c- Size
- 25729 bytes
- Lines
- 1416
- Domain
- Driver Families
- Bucket
- drivers/memory
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/of.hlinux/slab.hdt-bindings/memory/tegra30-mc.hmc.h
Detected Declarations
function tegra30_mc_tune_client_latencyfunction tegra30_mc_icc_setfunction tegra30_mc_icc_aggreatefunction tegra30_mc_of_icc_xlate_extendedfunction list_for_each_entry
Annotated Snippet
switch (client->swgroup) {
case TEGRA_SWGROUP_DC:
case TEGRA_SWGROUP_DCB:
case TEGRA_SWGROUP_PTC:
case TEGRA_SWGROUP_VI:
/* these clients are isochronous by default */
ndata->tag = TEGRA_MC_ICC_TAG_ISO;
break;
default:
ndata->tag = TEGRA_MC_ICC_TAG_DEFAULT;
break;
}
return ndata;
}
for (i = 0; i < mc->soc->num_clients; i++) {
if (mc->soc->clients[i].id == idx)
return ERR_PTR(-EPROBE_DEFER);
}
dev_err(mc->dev, "invalid ICC client ID %u\n", idx);
return ERR_PTR(-EINVAL);
}
static const struct tegra_mc_icc_ops tegra30_mc_icc_ops = {
.xlate_extended = tegra30_mc_of_icc_xlate_extended,
.aggregate = tegra30_mc_icc_aggreate,
.set = tegra30_mc_icc_set,
};
static const struct tegra_mc_intmask tegra30_mc_intmasks[] = {
{
.reg = MC_INTMASK,
.mask = MC_INT_INVALID_SMMU_PAGE | MC_INT_SECURITY_VIOLATION |
MC_INT_DECERR_EMEM,
},
};
const struct tegra_mc_soc tegra30_mc_soc = {
.clients = tegra30_mc_clients,
.num_clients = ARRAY_SIZE(tegra30_mc_clients),
.num_address_bits = 32,
.atom_size = 16,
.client_id_mask = 0x7f,
.smmu = &tegra30_smmu_soc,
.emem_regs = tegra30_mc_emem_regs,
.num_emem_regs = ARRAY_SIZE(tegra30_mc_emem_regs),
.intmasks = tegra30_mc_intmasks,
.num_intmasks = ARRAY_SIZE(tegra30_mc_intmasks),
.reset_ops = &tegra_mc_reset_ops_common,
.resets = tegra30_mc_resets,
.num_resets = ARRAY_SIZE(tegra30_mc_resets),
.icc_ops = &tegra30_mc_icc_ops,
.ops = &tegra30_mc_ops,
.regs = &tegra20_mc_regs,
.handle_irq = tegra30_mc_irq_handlers,
.num_interrupts = ARRAY_SIZE(tegra30_mc_irq_handlers),
.mc_err_status_type_mask = (0x7 << 28),
};
Annotation
- Immediate include surface: `linux/device.h`, `linux/of.h`, `linux/slab.h`, `dt-bindings/memory/tegra30-mc.h`, `mc.h`.
- Detected declarations: `function tegra30_mc_tune_client_latency`, `function tegra30_mc_icc_set`, `function tegra30_mc_icc_aggreate`, `function tegra30_mc_of_icc_xlate_extended`, `function list_for_each_entry`.
- Atlas domain: Driver Families / drivers/memory.
- 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.