Lines Matching +full:uniphier +full:- +full:pro4 +full:- +full:aidet
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Driver for UniPhier AIDET (ARM Interrupt Detector)
36 spin_lock_irqsave(&priv->lock, flags); in uniphier_aidet_reg_update()
37 tmp = readl_relaxed(priv->reg_base + reg); in uniphier_aidet_reg_update()
40 writel_relaxed(tmp, priv->reg_base + reg); in uniphier_aidet_reg_update()
41 spin_unlock_irqrestore(&priv->lock, flags); in uniphier_aidet_reg_update()
58 struct uniphier_aidet_priv *priv = data->chip_data; in uniphier_aidet_irq_set_type()
76 return -EINVAL; in uniphier_aidet_irq_set_type()
79 uniphier_aidet_detconf_update(priv, data->hwirq, val); in uniphier_aidet_irq_set_type()
85 .name = "AIDET",
98 if (WARN_ON(fwspec->param_count < 2)) in uniphier_aidet_domain_translate()
99 return -EINVAL; in uniphier_aidet_domain_translate()
101 *out_hwirq = fwspec->param[0]; in uniphier_aidet_domain_translate()
102 *out_type = fwspec->param[1] & IRQ_TYPE_SENSE_MASK; in uniphier_aidet_domain_translate()
117 return -EINVAL; in uniphier_aidet_domain_alloc()
134 return -EINVAL; in uniphier_aidet_domain_alloc()
138 return -ENXIO; in uniphier_aidet_domain_alloc()
142 domain->host_data); in uniphier_aidet_domain_alloc()
147 parent_fwspec.fwnode = domain->parent->fwnode; in uniphier_aidet_domain_alloc()
164 struct device *dev = &pdev->dev; in uniphier_aidet_probe()
169 parent_np = of_irq_find_parent(dev->of_node); in uniphier_aidet_probe()
171 return -ENXIO; in uniphier_aidet_probe()
176 return -EPROBE_DEFER; in uniphier_aidet_probe()
180 return -ENOMEM; in uniphier_aidet_probe()
182 priv->reg_base = devm_platform_ioremap_resource(pdev, 0); in uniphier_aidet_probe()
183 if (IS_ERR(priv->reg_base)) in uniphier_aidet_probe()
184 return PTR_ERR(priv->reg_base); in uniphier_aidet_probe()
186 spin_lock_init(&priv->lock); in uniphier_aidet_probe()
188 priv->domain = irq_domain_create_hierarchy( in uniphier_aidet_probe()
191 of_node_to_fwnode(dev->of_node), in uniphier_aidet_probe()
193 if (!priv->domain) in uniphier_aidet_probe()
194 return -ENOMEM; in uniphier_aidet_probe()
206 for (i = 0; i < ARRAY_SIZE(priv->saved_vals); i++) in uniphier_aidet_suspend()
207 priv->saved_vals[i] = readl_relaxed( in uniphier_aidet_suspend()
208 priv->reg_base + UNIPHIER_AIDET_DETCONF + i * 4); in uniphier_aidet_suspend()
218 for (i = 0; i < ARRAY_SIZE(priv->saved_vals); i++) in uniphier_aidet_resume()
219 writel_relaxed(priv->saved_vals[i], in uniphier_aidet_resume()
220 priv->reg_base + UNIPHIER_AIDET_DETCONF + i * 4); in uniphier_aidet_resume()
231 { .compatible = "socionext,uniphier-ld4-aidet" },
232 { .compatible = "socionext,uniphier-pro4-aidet" },
233 { .compatible = "socionext,uniphier-sld8-aidet" },
234 { .compatible = "socionext,uniphier-pro5-aidet" },
235 { .compatible = "socionext,uniphier-pxs2-aidet" },
236 { .compatible = "socionext,uniphier-ld11-aidet" },
237 { .compatible = "socionext,uniphier-ld20-aidet" },
238 { .compatible = "socionext,uniphier-pxs3-aidet" },
239 { .compatible = "socionext,uniphier-nx1-aidet" },
246 .name = "uniphier-aidet",