drivers/remoteproc/ti_sci_proc.h
Source file repositories/reference/linux-study-clean/drivers/remoteproc/ti_sci_proc.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/remoteproc/ti_sci_proc.h- Extension
.h- Size
- 3089 bytes
- Lines
- 131
- 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/soc/ti/ti_sci_protocol.h
Detected Declarations
struct ti_sci_procfunction ti_sci_proc_requestfunction ti_sci_proc_releasefunction ti_sci_proc_handoverfunction ti_sci_proc_set_configfunction ti_sci_proc_set_controlfunction ti_sci_proc_get_status
Annotated Snippet
struct ti_sci_proc {
const struct ti_sci_handle *sci;
const struct ti_sci_proc_ops *ops;
struct device *dev;
u8 proc_id;
u8 host_id;
};
static inline
struct ti_sci_proc *ti_sci_proc_of_get_tsp(struct device *dev,
const struct ti_sci_handle *sci)
{
struct ti_sci_proc *tsp;
u32 temp[2];
int ret;
ret = of_property_read_u32_array(dev_of_node(dev), "ti,sci-proc-ids",
temp, 2);
if (ret < 0)
return ERR_PTR(ret);
tsp = devm_kzalloc(dev, sizeof(*tsp), GFP_KERNEL);
if (!tsp)
return ERR_PTR(-ENOMEM);
tsp->dev = dev;
tsp->sci = sci;
tsp->ops = &sci->ops.proc_ops;
tsp->proc_id = temp[0];
tsp->host_id = temp[1];
return tsp;
}
static inline int ti_sci_proc_request(struct ti_sci_proc *tsp)
{
int ret;
ret = tsp->ops->request(tsp->sci, tsp->proc_id);
if (ret)
dev_err(tsp->dev, "ti-sci processor request failed: %d\n",
ret);
return ret;
}
static inline int ti_sci_proc_release(struct ti_sci_proc *tsp)
{
int ret;
ret = tsp->ops->release(tsp->sci, tsp->proc_id);
if (ret)
dev_err(tsp->dev, "ti-sci processor release failed: %d\n",
ret);
return ret;
}
static inline int ti_sci_proc_handover(struct ti_sci_proc *tsp)
{
int ret;
ret = tsp->ops->handover(tsp->sci, tsp->proc_id, tsp->host_id);
if (ret)
dev_err(tsp->dev, "ti-sci processor handover of %d to %d failed: %d\n",
tsp->proc_id, tsp->host_id, ret);
return ret;
}
static inline int ti_sci_proc_set_config(struct ti_sci_proc *tsp,
u64 boot_vector,
u32 cfg_set, u32 cfg_clr)
{
int ret;
ret = tsp->ops->set_config(tsp->sci, tsp->proc_id, boot_vector,
cfg_set, cfg_clr);
if (ret)
dev_err(tsp->dev, "ti-sci processor set_config failed: %d\n",
ret);
return ret;
}
static inline int ti_sci_proc_set_control(struct ti_sci_proc *tsp,
u32 ctrl_set, u32 ctrl_clr)
{
int ret;
ret = tsp->ops->set_control(tsp->sci, tsp->proc_id, ctrl_set, ctrl_clr);
if (ret)
dev_err(tsp->dev, "ti-sci processor set_control failed: %d\n",
ret);
Annotation
- Immediate include surface: `linux/soc/ti/ti_sci_protocol.h`.
- Detected declarations: `struct ti_sci_proc`, `function ti_sci_proc_request`, `function ti_sci_proc_release`, `function ti_sci_proc_handover`, `function ti_sci_proc_set_config`, `function ti_sci_proc_set_control`, `function ti_sci_proc_get_status`.
- 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.