Lines Matching refs:fsl_lbc_ctrl_dev
32 struct fsl_lbc_ctrl *fsl_lbc_ctrl_dev; variable
33 EXPORT_SYMBOL(fsl_lbc_ctrl_dev);
46 struct device_node *np = fsl_lbc_ctrl_dev->dev->of_node; in fsl_lbc_addr()
70 if (!fsl_lbc_ctrl_dev || !fsl_lbc_ctrl_dev->regs) in fsl_lbc_find()
73 lbc = fsl_lbc_ctrl_dev->regs; in fsl_lbc_find()
105 if (!fsl_lbc_ctrl_dev || !fsl_lbc_ctrl_dev->regs) in fsl_upm_find()
108 lbc = fsl_lbc_ctrl_dev->regs; in fsl_upm_find()
158 if (!fsl_lbc_ctrl_dev || !fsl_lbc_ctrl_dev->regs) in fsl_upm_run_pattern()
163 out_be32(&fsl_lbc_ctrl_dev->regs->mar, mar); in fsl_upm_run_pattern()
286 fsl_lbc_ctrl_dev = kzalloc(sizeof(*fsl_lbc_ctrl_dev), GFP_KERNEL); in fsl_lbc_ctrl_probe()
287 if (!fsl_lbc_ctrl_dev) in fsl_lbc_ctrl_probe()
290 dev_set_drvdata(&dev->dev, fsl_lbc_ctrl_dev); in fsl_lbc_ctrl_probe()
292 spin_lock_init(&fsl_lbc_ctrl_dev->lock); in fsl_lbc_ctrl_probe()
293 init_waitqueue_head(&fsl_lbc_ctrl_dev->irq_wait); in fsl_lbc_ctrl_probe()
295 fsl_lbc_ctrl_dev->regs = of_iomap(dev->dev.of_node, 0); in fsl_lbc_ctrl_probe()
296 if (!fsl_lbc_ctrl_dev->regs) { in fsl_lbc_ctrl_probe()
302 fsl_lbc_ctrl_dev->irq[0] = irq_of_parse_and_map(dev->dev.of_node, 0); in fsl_lbc_ctrl_probe()
303 if (!fsl_lbc_ctrl_dev->irq[0]) { in fsl_lbc_ctrl_probe()
309 fsl_lbc_ctrl_dev->dev = &dev->dev; in fsl_lbc_ctrl_probe()
311 ret = fsl_lbc_ctrl_init(fsl_lbc_ctrl_dev, dev->dev.of_node); in fsl_lbc_ctrl_probe()
315 ret = request_irq(fsl_lbc_ctrl_dev->irq[0], fsl_lbc_ctrl_irq, 0, in fsl_lbc_ctrl_probe()
316 "fsl-lbc", fsl_lbc_ctrl_dev); in fsl_lbc_ctrl_probe()
319 fsl_lbc_ctrl_dev->irq[0]); in fsl_lbc_ctrl_probe()
320 ret = fsl_lbc_ctrl_dev->irq[0]; in fsl_lbc_ctrl_probe()
324 fsl_lbc_ctrl_dev->irq[1] = irq_of_parse_and_map(dev->dev.of_node, 1); in fsl_lbc_ctrl_probe()
325 if (fsl_lbc_ctrl_dev->irq[1]) { in fsl_lbc_ctrl_probe()
326 ret = request_irq(fsl_lbc_ctrl_dev->irq[1], fsl_lbc_ctrl_irq, in fsl_lbc_ctrl_probe()
327 IRQF_SHARED, "fsl-lbc-err", fsl_lbc_ctrl_dev); in fsl_lbc_ctrl_probe()
330 fsl_lbc_ctrl_dev->irq[1]); in fsl_lbc_ctrl_probe()
331 ret = fsl_lbc_ctrl_dev->irq[1]; in fsl_lbc_ctrl_probe()
337 out_be32(&fsl_lbc_ctrl_dev->regs->lteir, LTEIR_ENABLE); in fsl_lbc_ctrl_probe()
342 free_irq(fsl_lbc_ctrl_dev->irq[0], fsl_lbc_ctrl_dev); in fsl_lbc_ctrl_probe()
344 iounmap(fsl_lbc_ctrl_dev->regs); in fsl_lbc_ctrl_probe()
345 kfree(fsl_lbc_ctrl_dev); in fsl_lbc_ctrl_probe()
346 fsl_lbc_ctrl_dev = NULL; in fsl_lbc_ctrl_probe()
358 ctrl = fsl_lbc_ctrl_dev; in fsl_lbc_syscore_suspend()
382 ctrl = fsl_lbc_ctrl_dev; in fsl_lbc_syscore_resume()