Lines Matching refs:fsl_lbc_ctrl_dev

31 struct fsl_lbc_ctrl *fsl_lbc_ctrl_dev;  variable
32 EXPORT_SYMBOL(fsl_lbc_ctrl_dev);
45 struct device_node *np = fsl_lbc_ctrl_dev->dev->of_node; in fsl_lbc_addr()
69 if (!fsl_lbc_ctrl_dev || !fsl_lbc_ctrl_dev->regs) in fsl_lbc_find()
72 lbc = fsl_lbc_ctrl_dev->regs; in fsl_lbc_find()
104 if (!fsl_lbc_ctrl_dev || !fsl_lbc_ctrl_dev->regs) in fsl_upm_find()
107 lbc = fsl_lbc_ctrl_dev->regs; in fsl_upm_find()
157 if (!fsl_lbc_ctrl_dev || !fsl_lbc_ctrl_dev->regs) in fsl_upm_run_pattern()
162 out_be32(&fsl_lbc_ctrl_dev->regs->mar, mar); in fsl_upm_run_pattern()
285 fsl_lbc_ctrl_dev = kzalloc(sizeof(*fsl_lbc_ctrl_dev), GFP_KERNEL); in fsl_lbc_ctrl_probe()
286 if (!fsl_lbc_ctrl_dev) in fsl_lbc_ctrl_probe()
289 dev_set_drvdata(&dev->dev, fsl_lbc_ctrl_dev); in fsl_lbc_ctrl_probe()
291 spin_lock_init(&fsl_lbc_ctrl_dev->lock); in fsl_lbc_ctrl_probe()
292 init_waitqueue_head(&fsl_lbc_ctrl_dev->irq_wait); in fsl_lbc_ctrl_probe()
294 fsl_lbc_ctrl_dev->regs = of_iomap(dev->dev.of_node, 0); in fsl_lbc_ctrl_probe()
295 if (!fsl_lbc_ctrl_dev->regs) { in fsl_lbc_ctrl_probe()
301 fsl_lbc_ctrl_dev->irq[0] = irq_of_parse_and_map(dev->dev.of_node, 0); in fsl_lbc_ctrl_probe()
302 if (!fsl_lbc_ctrl_dev->irq[0]) { in fsl_lbc_ctrl_probe()
308 fsl_lbc_ctrl_dev->dev = &dev->dev; in fsl_lbc_ctrl_probe()
310 ret = fsl_lbc_ctrl_init(fsl_lbc_ctrl_dev, dev->dev.of_node); in fsl_lbc_ctrl_probe()
314 ret = request_irq(fsl_lbc_ctrl_dev->irq[0], fsl_lbc_ctrl_irq, 0, in fsl_lbc_ctrl_probe()
315 "fsl-lbc", fsl_lbc_ctrl_dev); in fsl_lbc_ctrl_probe()
318 fsl_lbc_ctrl_dev->irq[0]); in fsl_lbc_ctrl_probe()
319 ret = fsl_lbc_ctrl_dev->irq[0]; in fsl_lbc_ctrl_probe()
323 fsl_lbc_ctrl_dev->irq[1] = irq_of_parse_and_map(dev->dev.of_node, 1); in fsl_lbc_ctrl_probe()
324 if (fsl_lbc_ctrl_dev->irq[1]) { in fsl_lbc_ctrl_probe()
325 ret = request_irq(fsl_lbc_ctrl_dev->irq[1], fsl_lbc_ctrl_irq, in fsl_lbc_ctrl_probe()
326 IRQF_SHARED, "fsl-lbc-err", fsl_lbc_ctrl_dev); in fsl_lbc_ctrl_probe()
329 fsl_lbc_ctrl_dev->irq[1]); in fsl_lbc_ctrl_probe()
330 ret = fsl_lbc_ctrl_dev->irq[1]; in fsl_lbc_ctrl_probe()
336 out_be32(&fsl_lbc_ctrl_dev->regs->lteir, LTEIR_ENABLE); in fsl_lbc_ctrl_probe()
341 free_irq(fsl_lbc_ctrl_dev->irq[0], fsl_lbc_ctrl_dev); in fsl_lbc_ctrl_probe()
343 iounmap(fsl_lbc_ctrl_dev->regs); in fsl_lbc_ctrl_probe()
344 kfree(fsl_lbc_ctrl_dev); in fsl_lbc_ctrl_probe()
345 fsl_lbc_ctrl_dev = NULL; in fsl_lbc_ctrl_probe()
357 ctrl = fsl_lbc_ctrl_dev; in fsl_lbc_syscore_suspend()
381 ctrl = fsl_lbc_ctrl_dev; in fsl_lbc_syscore_resume()