smsm              106 drivers/soc/qcom/smsm.c 	struct qcom_smsm *smsm;
smsm              141 drivers/soc/qcom/smsm.c 	struct qcom_smsm *smsm = data;
smsm              149 drivers/soc/qcom/smsm.c 	spin_lock_irqsave(&smsm->lock, flags);
smsm              152 drivers/soc/qcom/smsm.c 	val = orig = readl(smsm->local_state);
smsm              159 drivers/soc/qcom/smsm.c 		spin_unlock_irqrestore(&smsm->lock, flags);
smsm              164 drivers/soc/qcom/smsm.c 	writel(val, smsm->local_state);
smsm              165 drivers/soc/qcom/smsm.c 	spin_unlock_irqrestore(&smsm->lock, flags);
smsm              171 drivers/soc/qcom/smsm.c 	for (host = 0; host < smsm->num_hosts; host++) {
smsm              172 drivers/soc/qcom/smsm.c 		hostp = &smsm->hosts[host];
smsm              174 drivers/soc/qcom/smsm.c 		val = readl(smsm->subscription + host);
smsm              241 drivers/soc/qcom/smsm.c 	struct qcom_smsm *smsm = entry->smsm;
smsm              245 drivers/soc/qcom/smsm.c 		val = readl(entry->subscription + smsm->local_host);
smsm              247 drivers/soc/qcom/smsm.c 		writel(val, entry->subscription + smsm->local_host);
smsm              266 drivers/soc/qcom/smsm.c 	struct qcom_smsm *smsm = entry->smsm;
smsm              272 drivers/soc/qcom/smsm.c 		val = readl(entry->subscription + smsm->local_host);
smsm              274 drivers/soc/qcom/smsm.c 		writel(val, entry->subscription + smsm->local_host);
smsm              343 drivers/soc/qcom/smsm.c static int smsm_parse_ipc(struct qcom_smsm *smsm, unsigned host_id)
smsm              346 drivers/soc/qcom/smsm.c 	struct device_node *node = smsm->dev->of_node;
smsm              347 drivers/soc/qcom/smsm.c 	struct smsm_host *host = &smsm->hosts[host_id];
smsm              362 drivers/soc/qcom/smsm.c 		dev_err(smsm->dev, "no offset in %s\n", key);
smsm              368 drivers/soc/qcom/smsm.c 		dev_err(smsm->dev, "no bit in %s\n", key);
smsm              381 drivers/soc/qcom/smsm.c static int smsm_inbound_entry(struct qcom_smsm *smsm,
smsm              390 drivers/soc/qcom/smsm.c 		dev_err(smsm->dev, "failed to parse smsm interrupt\n");
smsm              394 drivers/soc/qcom/smsm.c 	ret = devm_request_threaded_irq(smsm->dev, irq,
smsm              399 drivers/soc/qcom/smsm.c 		dev_err(smsm->dev, "failed to request interrupt\n");
smsm              405 drivers/soc/qcom/smsm.c 		dev_err(smsm->dev, "failed to add irq_domain\n");
smsm              423 drivers/soc/qcom/smsm.c static int smsm_get_size_info(struct qcom_smsm *smsm)
smsm              436 drivers/soc/qcom/smsm.c 			dev_err(smsm->dev, "unable to retrieve smsm size info\n");
smsm              439 drivers/soc/qcom/smsm.c 		dev_warn(smsm->dev, "no smsm size info, using defaults\n");
smsm              440 drivers/soc/qcom/smsm.c 		smsm->num_entries = SMSM_DEFAULT_NUM_ENTRIES;
smsm              441 drivers/soc/qcom/smsm.c 		smsm->num_hosts = SMSM_DEFAULT_NUM_HOSTS;
smsm              445 drivers/soc/qcom/smsm.c 	smsm->num_entries = info->num_entries;
smsm              446 drivers/soc/qcom/smsm.c 	smsm->num_hosts = info->num_hosts;
smsm              448 drivers/soc/qcom/smsm.c 	dev_dbg(smsm->dev,
smsm              450 drivers/soc/qcom/smsm.c 		smsm->num_entries, smsm->num_hosts);
smsm              460 drivers/soc/qcom/smsm.c 	struct qcom_smsm *smsm;
smsm              467 drivers/soc/qcom/smsm.c 	smsm = devm_kzalloc(&pdev->dev, sizeof(*smsm), GFP_KERNEL);
smsm              468 drivers/soc/qcom/smsm.c 	if (!smsm)
smsm              470 drivers/soc/qcom/smsm.c 	smsm->dev = &pdev->dev;
smsm              471 drivers/soc/qcom/smsm.c 	spin_lock_init(&smsm->lock);
smsm              473 drivers/soc/qcom/smsm.c 	ret = smsm_get_size_info(smsm);
smsm              477 drivers/soc/qcom/smsm.c 	smsm->entries = devm_kcalloc(&pdev->dev,
smsm              478 drivers/soc/qcom/smsm.c 				     smsm->num_entries,
smsm              481 drivers/soc/qcom/smsm.c 	if (!smsm->entries)
smsm              484 drivers/soc/qcom/smsm.c 	smsm->hosts = devm_kcalloc(&pdev->dev,
smsm              485 drivers/soc/qcom/smsm.c 				   smsm->num_hosts,
smsm              488 drivers/soc/qcom/smsm.c 	if (!smsm->hosts)
smsm              502 drivers/soc/qcom/smsm.c 			     &smsm->local_host);
smsm              505 drivers/soc/qcom/smsm.c 	for (id = 0; id < smsm->num_hosts; id++) {
smsm              506 drivers/soc/qcom/smsm.c 		ret = smsm_parse_ipc(smsm, id);
smsm              513 drivers/soc/qcom/smsm.c 			      smsm->num_entries * sizeof(u32));
smsm              526 drivers/soc/qcom/smsm.c 	size = smsm->num_entries * smsm->num_hosts * sizeof(u32);
smsm              540 drivers/soc/qcom/smsm.c 	smsm->local_state = states + smsm->local_host;
smsm              541 drivers/soc/qcom/smsm.c 	smsm->subscription = intr_mask + smsm->local_host * smsm->num_hosts;
smsm              544 drivers/soc/qcom/smsm.c 	smsm->state = qcom_smem_state_register(local_node, &smsm_state_ops, smsm);
smsm              545 drivers/soc/qcom/smsm.c 	if (IS_ERR(smsm->state)) {
smsm              546 drivers/soc/qcom/smsm.c 		dev_err(smsm->dev, "failed to register qcom_smem_state\n");
smsm              547 drivers/soc/qcom/smsm.c 		return PTR_ERR(smsm->state);
smsm              556 drivers/soc/qcom/smsm.c 		if (ret || id >= smsm->num_entries) {
smsm              562 drivers/soc/qcom/smsm.c 		entry = &smsm->entries[id];
smsm              564 drivers/soc/qcom/smsm.c 		entry->smsm = smsm;
smsm              568 drivers/soc/qcom/smsm.c 		entry->subscription = intr_mask + id * smsm->num_hosts;
smsm              569 drivers/soc/qcom/smsm.c 		writel(0, entry->subscription + smsm->local_host);
smsm              571 drivers/soc/qcom/smsm.c 		ret = smsm_inbound_entry(smsm, entry, node);
smsm              576 drivers/soc/qcom/smsm.c 	platform_set_drvdata(pdev, smsm);
smsm              581 drivers/soc/qcom/smsm.c 	for (id = 0; id < smsm->num_entries; id++)
smsm              582 drivers/soc/qcom/smsm.c 		if (smsm->entries[id].domain)
smsm              583 drivers/soc/qcom/smsm.c 			irq_domain_remove(smsm->entries[id].domain);
smsm              585 drivers/soc/qcom/smsm.c 	qcom_smem_state_unregister(smsm->state);
smsm              592 drivers/soc/qcom/smsm.c 	struct qcom_smsm *smsm = platform_get_drvdata(pdev);
smsm              595 drivers/soc/qcom/smsm.c 	for (id = 0; id < smsm->num_entries; id++)
smsm              596 drivers/soc/qcom/smsm.c 		if (smsm->entries[id].domain)
smsm              597 drivers/soc/qcom/smsm.c 			irq_domain_remove(smsm->entries[id].domain);
smsm              599 drivers/soc/qcom/smsm.c 	qcom_smem_state_unregister(smsm->state);