drivers/remoteproc/qcom_wcnss.c
Source file repositories/reference/linux-study-clean/drivers/remoteproc/qcom_wcnss.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/remoteproc/qcom_wcnss.c- Extension
.c- Size
- 16823 bytes
- Lines
- 711
- 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.
- 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/kernel.hlinux/module.hlinux/io.hlinux/of.hlinux/of_reserved_mem.hlinux/platform_device.hlinux/pm_domain.hlinux/pm_runtime.hlinux/firmware/qcom/qcom_scm.hlinux/regulator/consumer.hlinux/remoteproc.hlinux/soc/qcom/mdt_loader.hlinux/soc/qcom/smem.hlinux/soc/qcom/smem_state.hqcom_common.hremoteproc_internal.hqcom_pil_info.hqcom_wcnss.h
Detected Declarations
struct wcnss_datastruct qcom_wcnssfunction wcnss_loadfunction wcnss_indicate_nv_downloadfunction wcnss_configure_irisfunction wcnss_startfunction wcnss_stopfunction wcnss_wdog_interruptfunction wcnss_fatal_interruptfunction wcnss_ready_interruptfunction wcnss_handover_interruptfunction wcnss_stop_ack_interruptfunction wcnss_init_pdsfunction wcnss_release_pdsfunction wcnss_init_regulatorsfunction wcnss_request_irqfunction wcnss_alloc_memory_regionfunction wcnss_probefunction wcnss_remove
Annotated Snippet
struct wcnss_data {
size_t pmu_offset;
size_t spare_offset;
const char *pd_names[WCNSS_MAX_PDS];
const struct wcnss_vreg_info *vregs;
size_t num_vregs, num_pd_vregs;
};
struct qcom_wcnss {
struct device *dev;
struct rproc *rproc;
void __iomem *pmu_cfg;
void __iomem *spare_out;
bool use_48mhz_xo;
int wdog_irq;
int fatal_irq;
int ready_irq;
int handover_irq;
int stop_ack_irq;
struct qcom_smem_state *state;
unsigned stop_bit;
struct mutex iris_lock;
struct qcom_iris *iris;
struct device *pds[WCNSS_MAX_PDS];
size_t num_pds;
struct regulator_bulk_data *vregs;
size_t num_vregs;
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;
struct qcom_rproc_subdev smd_subdev;
struct qcom_sysmon *sysmon;
};
static const struct wcnss_data riva_data = {
.pmu_offset = 0x28,
.spare_offset = 0xb4,
.vregs = (struct wcnss_vreg_info[]) {
{ "vddmx", 1050000, 1150000, 0 },
{ "vddcx", 1050000, 1150000, 0 },
{ "vddpx", 1800000, 1800000, 0 },
},
.num_vregs = 3,
};
static const struct wcnss_data pronto_v1_data = {
.pmu_offset = 0x1004,
.spare_offset = 0x1088,
.pd_names = { "cx", "mx" },
.vregs = (struct wcnss_vreg_info[]) {
{ "vddcx", .super_turbo = true},
{ "vddmx", 950000, 1150000, 0 },
{ "vddpx", 1800000, 1800000, 0 },
},
.num_pd_vregs = 2,
.num_vregs = 1,
};
static const struct wcnss_data pronto_v2_data = {
.pmu_offset = 0x1004,
.spare_offset = 0x1088,
.pd_names = { "cx", "mx" },
.vregs = (struct wcnss_vreg_info[]) {
{ "vddcx", .super_turbo = true },
{ "vddmx", 1287500, 1287500, 0 },
{ "vddpx", 1800000, 1800000, 0 },
},
.num_pd_vregs = 2,
.num_vregs = 1,
};
static const struct wcnss_data pronto_v3_data = {
.pmu_offset = 0x1004,
.spare_offset = 0x1088,
Annotation
- Immediate include surface: `linux/clk.h`, `linux/delay.h`, `linux/firmware.h`, `linux/interrupt.h`, `linux/kernel.h`, `linux/module.h`, `linux/io.h`, `linux/of.h`.
- Detected declarations: `struct wcnss_data`, `struct qcom_wcnss`, `function wcnss_load`, `function wcnss_indicate_nv_download`, `function wcnss_configure_iris`, `function wcnss_start`, `function wcnss_stop`, `function wcnss_wdog_interrupt`, `function wcnss_fatal_interrupt`, `function wcnss_ready_interrupt`.
- 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.