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.

Dependency Surface

Detected Declarations

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

Implementation Notes