drivers/remoteproc/qcom_q6v5_adsp.c
Source file repositories/reference/linux-study-clean/drivers/remoteproc/qcom_q6v5_adsp.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/remoteproc/qcom_q6v5_adsp.c- Extension
.c- Size
- 20484 bytes
- Lines
- 850
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/clk.hlinux/delay.hlinux/firmware.hlinux/interrupt.hlinux/io.hlinux/iommu.hlinux/iopoll.hlinux/kernel.hlinux/mfd/syscon.hlinux/module.hlinux/of.hlinux/of_reserved_mem.hlinux/platform_device.hlinux/pm_domain.hlinux/pm_runtime.hlinux/regmap.hlinux/remoteproc.hlinux/reset.hlinux/soc/qcom/mdt_loader.hlinux/soc/qcom/smem.hlinux/soc/qcom/smem_state.hqcom_common.hqcom_pil_info.hqcom_q6v5.hremoteproc_internal.h
Detected Declarations
struct adsp_pil_datastruct qcom_adspfunction qcom_rproc_pds_attachfunction qcom_rproc_pds_detachfunction qcom_rproc_pds_enablefunction qcom_rproc_pds_disablefunction qcom_wpss_shutdownfunction qcom_adsp_shutdownfunction adsp_loadfunction adsp_unmap_carveoutfunction adsp_map_carveoutfunction adsp_startfunction qcom_adsp_pil_handoverfunction adsp_stopfunction adsp_parse_firmwarefunction adsp_panicfunction adsp_init_clockfunction adsp_init_resetfunction adsp_init_mmiofunction adsp_alloc_memory_regionfunction adsp_probefunction adsp_remove
Annotated Snippet
struct adsp_pil_data {
int crash_reason_smem;
const char *firmware_name;
const char *ssr_name;
const char *sysmon_name;
int ssctl_id;
bool is_wpss;
bool has_iommu;
bool auto_boot;
const char **clk_ids;
int num_clks;
const char **pd_names;
unsigned int num_pds;
const char *load_state;
};
struct qcom_adsp {
struct device *dev;
struct rproc *rproc;
struct qcom_q6v5 q6v5;
struct clk *xo;
int num_clks;
struct clk_bulk_data *clks;
void __iomem *qdsp6ss_base;
void __iomem *lpass_efuse;
struct reset_control *pdc_sync_reset;
struct reset_control *restart;
struct regmap *halt_map;
unsigned int halt_lpass;
int crash_reason_smem;
const char *info_name;
struct completion start_done;
struct completion stop_done;
phys_addr_t mem_phys;
phys_addr_t mem_reloc;
void *mem_region;
size_t mem_size;
bool has_iommu;
struct dev_pm_domain_list *pd_list;
struct qcom_rproc_glink glink_subdev;
struct qcom_rproc_pdm pdm_subdev;
struct qcom_rproc_ssr ssr_subdev;
struct qcom_sysmon *sysmon;
int (*shutdown)(struct qcom_adsp *adsp);
};
static int qcom_rproc_pds_attach(struct qcom_adsp *adsp, const char **pd_names,
unsigned int num_pds)
{
struct device *dev = adsp->dev;
struct dev_pm_domain_attach_data pd_data = {
.pd_names = pd_names,
.num_pd_names = num_pds,
};
int ret;
/* Handle single power domain */
if (dev->pm_domain)
goto out;
if (!pd_names)
return 0;
ret = dev_pm_domain_attach_list(dev, &pd_data, &adsp->pd_list);
if (ret < 0)
return ret;
out:
pm_runtime_enable(dev);
return 0;
}
static void qcom_rproc_pds_detach(struct qcom_adsp *adsp)
{
struct device *dev = adsp->dev;
struct dev_pm_domain_list *pds = adsp->pd_list;
Annotation
- Immediate include surface: `linux/clk.h`, `linux/delay.h`, `linux/firmware.h`, `linux/interrupt.h`, `linux/io.h`, `linux/iommu.h`, `linux/iopoll.h`, `linux/kernel.h`.
- Detected declarations: `struct adsp_pil_data`, `struct qcom_adsp`, `function qcom_rproc_pds_attach`, `function qcom_rproc_pds_detach`, `function qcom_rproc_pds_enable`, `function qcom_rproc_pds_disable`, `function qcom_wpss_shutdown`, `function qcom_adsp_shutdown`, `function adsp_load`, `function adsp_unmap_carveout`.
- 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.