drivers/remoteproc/ti_k3_r5_remoteproc.c
Source file repositories/reference/linux-study-clean/drivers/remoteproc/ti_k3_r5_remoteproc.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/remoteproc/ti_k3_r5_remoteproc.c- Extension
.c- Size
- 46099 bytes
- Lines
- 1490
- Domain
- Driver Families
- Bucket
- drivers/remoteproc
- 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/dma-mapping.hlinux/err.hlinux/interrupt.hlinux/kernel.hlinux/mailbox_client.hlinux/module.hlinux/of.hlinux/of_address.hlinux/of_reserved_mem.hlinux/of_platform.hlinux/omap-mailbox.hlinux/platform_device.hlinux/pm_runtime.hlinux/remoteproc.hlinux/reset.hlinux/slab.homap_remoteproc.hremoteproc_internal.hti_sci_proc.hti_k3_common.h
Detected Declarations
struct k3_r5_soc_datastruct k3_r5_clusterstruct k3_r5_coreenum cluster_modefunction k3_r5_split_resetfunction k3_r5_split_releasefunction k3_r5_lockstep_resetfunction k3_r5_lockstep_releasefunction k3_r5_core_haltfunction k3_r5_core_runfunction thisfunction devicefunction Core1function list_for_each_entry_reversefunction Core1function list_for_each_entryfunction translationfunction k3_r5_cluster_rproc_initfunction unusablefunction k3_r5_rproc_configure_modefunction assertedfunction k3_r5_core_of_get_internal_memoriesfunction k3_rproc_of_get_memoriesfunction k3_r5_core_of_get_sram_memoriesfunction k3_r5_cluster_rproc_initfunction list_for_each_entryfunction k3_r5_cluster_rproc_exitfunction list_for_each_entry_from_reversefunction k3_r5_core_of_initfunction k3_r5_core_of_exitfunction k3_r5_cluster_of_exitfunction list_for_each_entry_safe_reversefunction k3_r5_cluster_of_initfunction for_each_available_child_of_node_scopedfunction k3_r5_probe
Annotated Snippet
struct k3_r5_soc_data {
bool tcm_is_double;
bool tcm_ecc_autoinit;
bool single_cpu_mode;
bool is_single_core;
const struct k3_rproc_dev_data *core_data;
};
/**
* struct k3_r5_cluster - K3 R5F Cluster structure
* @dev: cached device pointer
* @mode: Mode to configure the Cluster - Split or LockStep
* @cores: list of R5 cores within the cluster
* @core_transition: wait queue to sync core state changes
* @soc_data: SoC-specific feature data for a R5FSS
*/
struct k3_r5_cluster {
struct device *dev;
enum cluster_mode mode;
struct list_head cores;
wait_queue_head_t core_transition;
const struct k3_r5_soc_data *soc_data;
};
/**
* struct k3_r5_core - K3 R5 core structure
* @elem: linked list item
* @dev: cached device pointer
* @kproc: K3 rproc handle representing this core
* @cluster: cached pointer to parent cluster structure
* @sram: on-chip SRAM memory regions data
* @num_sram: number of on-chip SRAM memory regions
* @atcm_enable: flag to control ATCM enablement
* @btcm_enable: flag to control BTCM enablement
* @loczrama: flag to dictate which TCM is at device address 0x0
* @released_from_reset: flag to signal when core is out of reset
*/
struct k3_r5_core {
struct list_head elem;
struct device *dev;
struct k3_rproc *kproc;
struct k3_r5_cluster *cluster;
struct k3_rproc_mem *sram;
int num_sram;
u32 atcm_enable;
u32 btcm_enable;
u32 loczrama;
bool released_from_reset;
};
static int k3_r5_split_reset(struct k3_rproc *kproc)
{
int ret;
ret = reset_control_assert(kproc->reset);
if (ret) {
dev_err(kproc->dev, "local-reset assert failed, ret = %d\n",
ret);
return ret;
}
ret = kproc->ti_sci->ops.dev_ops.put_device(kproc->ti_sci,
kproc->ti_sci_id);
if (ret) {
dev_err(kproc->dev, "module-reset assert failed, ret = %d\n",
ret);
if (reset_control_deassert(kproc->reset))
dev_warn(kproc->dev, "local-reset deassert back failed\n");
}
return ret;
}
static int k3_r5_split_release(struct k3_rproc *kproc)
{
int ret;
ret = kproc->ti_sci->ops.dev_ops.get_device(kproc->ti_sci,
kproc->ti_sci_id);
if (ret) {
dev_err(kproc->dev, "module-reset deassert failed, ret = %d\n",
ret);
return ret;
}
ret = reset_control_deassert(kproc->reset);
if (ret) {
dev_err(kproc->dev, "local-reset deassert failed, ret = %d\n",
ret);
if (kproc->ti_sci->ops.dev_ops.put_device(kproc->ti_sci,
Annotation
- Immediate include surface: `linux/dma-mapping.h`, `linux/err.h`, `linux/interrupt.h`, `linux/kernel.h`, `linux/mailbox_client.h`, `linux/module.h`, `linux/of.h`, `linux/of_address.h`.
- Detected declarations: `struct k3_r5_soc_data`, `struct k3_r5_cluster`, `struct k3_r5_core`, `enum cluster_mode`, `function k3_r5_split_reset`, `function k3_r5_split_release`, `function k3_r5_lockstep_reset`, `function k3_r5_lockstep_release`, `function k3_r5_core_halt`, `function k3_r5_core_run`.
- Atlas domain: Driver Families / drivers/remoteproc.
- 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.