drivers/remoteproc/omap_remoteproc.c
Source file repositories/reference/linux-study-clean/drivers/remoteproc/omap_remoteproc.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/remoteproc/omap_remoteproc.c- Extension
.c- Size
- 37616 bytes
- Lines
- 1400
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- 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/kernel.hlinux/module.hlinux/clk.hlinux/clk/ti.hlinux/err.hlinux/io.hlinux/of.hlinux/of_platform.hlinux/of_reserved_mem.hlinux/platform_device.hlinux/pm_runtime.hlinux/dma-mapping.hlinux/interrupt.hlinux/remoteproc.hlinux/mailbox_client.hlinux/omap-iommu.hlinux/omap-mailbox.hlinux/regmap.hlinux/mfd/syscon.hlinux/reset.hclocksource/timer-ti-dm.hlinux/platform_data/dmtimer-omap.hasm/dma-iommu.homap_remoteproc.hremoteproc_internal.h
Detected Declarations
struct omap_rproc_boot_datastruct omap_rproc_memstruct omap_rproc_timerstruct omap_rprocstruct omap_rproc_mem_datastruct omap_rproc_dev_datafunction omap_rproc_request_timerfunction omap_rproc_start_timerfunction omap_rproc_stop_timerfunction omap_rproc_release_timerfunction omap_rproc_get_timer_irqfunction omap_rproc_ack_timer_irqfunction omap_rproc_watchdog_isrfunction omap_rproc_enable_timersfunction omap_rproc_disable_timersfunction omap_rproc_mbox_callbackfunction omap_rproc_kickfunction omap_rproc_write_dsp_boot_addrfunction omap_rproc_startfunction omap_rproc_stopfunction omap_rproc_da_to_vafunction _is_rproc_in_standbyfunction _omap_rproc_suspendfunction statefunction _omap_rproc_resumefunction omap_rproc_suspendfunction omap_rproc_resumefunction omap_rproc_runtime_suspendfunction omap_rproc_runtime_resumefunction omap_rproc_get_boot_datafunction omap_rproc_of_get_internal_memoriesfunction omap_rproc_count_wdog_timersfunction omap_rproc_count_wdog_timersfunction omap_rproc_of_get_timersfunction omap_rproc_mem_releasefunction omap_rproc_probe
Annotated Snippet
struct omap_rproc_boot_data {
struct regmap *syscon;
unsigned int boot_reg;
unsigned int boot_reg_shift;
};
/**
* struct omap_rproc_mem - internal memory structure
* @cpu_addr: MPU virtual address of the memory region
* @bus_addr: bus address used to access the memory region
* @dev_addr: device address of the memory region from DSP view
* @size: size of the memory region
*/
struct omap_rproc_mem {
void __iomem *cpu_addr;
phys_addr_t bus_addr;
u32 dev_addr;
size_t size;
};
/**
* struct omap_rproc_timer - data structure for a timer used by a omap rproc
* @odt: timer pointer
* @timer_ops: OMAP dmtimer ops for @odt timer
* @irq: timer irq
*/
struct omap_rproc_timer {
struct omap_dm_timer *odt;
const struct omap_dm_timer_ops *timer_ops;
int irq;
};
/**
* struct omap_rproc - omap remote processor state
* @mbox: mailbox channel handle
* @client: mailbox client to request the mailbox channel
* @boot_data: boot data structure for setting processor boot address
* @mem: internal memory regions data
* @num_mems: number of internal memory regions
* @num_timers: number of rproc timer(s)
* @num_wd_timers: number of rproc watchdog timers
* @timers: timer(s) info used by rproc
* @autosuspend_delay: auto-suspend delay value to be used for runtime pm
* @need_resume: if true a resume is needed in the system resume callback
* @rproc: rproc handle
* @reset: reset handle
* @pm_comp: completion primitive to sync for suspend response
* @fck: functional clock for the remoteproc
* @suspend_acked: state machine flag to store the suspend request ack
*/
struct omap_rproc {
struct mbox_chan *mbox;
struct mbox_client client;
struct omap_rproc_boot_data *boot_data;
struct omap_rproc_mem *mem;
int num_mems;
int num_timers;
int num_wd_timers;
struct omap_rproc_timer *timers;
int autosuspend_delay;
bool need_resume;
struct rproc *rproc;
struct reset_control *reset;
struct completion pm_comp;
struct clk *fck;
bool suspend_acked;
};
/**
* struct omap_rproc_mem_data - memory definitions for an omap remote processor
* @name: name for this memory entry
* @dev_addr: device address for the memory entry
*/
struct omap_rproc_mem_data {
const char *name;
const u32 dev_addr;
};
/**
* struct omap_rproc_dev_data - device data for the omap remote processor
* @device_name: device name of the remote processor
* @mems: memory definitions for this remote processor
*/
struct omap_rproc_dev_data {
const char *device_name;
const struct omap_rproc_mem_data *mems;
};
/**
* omap_rproc_request_timer() - request a timer for a remoteproc
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/clk.h`, `linux/clk/ti.h`, `linux/err.h`, `linux/io.h`, `linux/of.h`, `linux/of_platform.h`.
- Detected declarations: `struct omap_rproc_boot_data`, `struct omap_rproc_mem`, `struct omap_rproc_timer`, `struct omap_rproc`, `struct omap_rproc_mem_data`, `struct omap_rproc_dev_data`, `function omap_rproc_request_timer`, `function omap_rproc_start_timer`, `function omap_rproc_stop_timer`, `function omap_rproc_release_timer`.
- Atlas domain: Driver Families / drivers/remoteproc.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.