Lines Matching refs:fsl_ifc_ctrl_dev

25 struct fsl_ifc_ctrl *fsl_ifc_ctrl_dev;  variable
26 EXPORT_SYMBOL(fsl_ifc_ctrl_dev);
51 if (!fsl_ifc_ctrl_dev || !fsl_ifc_ctrl_dev->gregs) in fsl_ifc_find()
54 for (i = 0; i < fsl_ifc_ctrl_dev->banks; i++) { in fsl_ifc_find()
55 u32 cspr = ifc_in32(&fsl_ifc_ctrl_dev->gregs->cspr_cs[i].cspr); in fsl_ifc_find()
212 fsl_ifc_ctrl_dev = devm_kzalloc(&dev->dev, sizeof(*fsl_ifc_ctrl_dev), in fsl_ifc_ctrl_probe()
214 if (!fsl_ifc_ctrl_dev) in fsl_ifc_ctrl_probe()
217 dev_set_drvdata(&dev->dev, fsl_ifc_ctrl_dev); in fsl_ifc_ctrl_probe()
220 fsl_ifc_ctrl_dev->gregs = of_iomap(dev->dev.of_node, 0); in fsl_ifc_ctrl_probe()
221 if (!fsl_ifc_ctrl_dev->gregs) { in fsl_ifc_ctrl_probe()
227 fsl_ifc_ctrl_dev->little_endian = true; in fsl_ifc_ctrl_probe()
230 fsl_ifc_ctrl_dev->little_endian = false; in fsl_ifc_ctrl_probe()
234 version = ifc_in32(&fsl_ifc_ctrl_dev->gregs->ifc_rev) & in fsl_ifc_ctrl_probe()
241 fsl_ifc_ctrl_dev->version = version; in fsl_ifc_ctrl_probe()
242 fsl_ifc_ctrl_dev->banks = banks; in fsl_ifc_ctrl_probe()
244 addr = fsl_ifc_ctrl_dev->gregs; in fsl_ifc_ctrl_probe()
249 fsl_ifc_ctrl_dev->rregs = addr; in fsl_ifc_ctrl_probe()
252 fsl_ifc_ctrl_dev->irq = irq_of_parse_and_map(dev->dev.of_node, 0); in fsl_ifc_ctrl_probe()
253 if (fsl_ifc_ctrl_dev->irq == 0) { in fsl_ifc_ctrl_probe()
260 fsl_ifc_ctrl_dev->nand_irq = in fsl_ifc_ctrl_probe()
263 fsl_ifc_ctrl_dev->dev = &dev->dev; in fsl_ifc_ctrl_probe()
265 ret = fsl_ifc_ctrl_init(fsl_ifc_ctrl_dev); in fsl_ifc_ctrl_probe()
269 init_waitqueue_head(&fsl_ifc_ctrl_dev->nand_wait); in fsl_ifc_ctrl_probe()
271 ret = request_irq(fsl_ifc_ctrl_dev->irq, fsl_ifc_ctrl_irq, IRQF_SHARED, in fsl_ifc_ctrl_probe()
272 "fsl-ifc", fsl_ifc_ctrl_dev); in fsl_ifc_ctrl_probe()
275 fsl_ifc_ctrl_dev->irq); in fsl_ifc_ctrl_probe()
279 if (fsl_ifc_ctrl_dev->nand_irq) { in fsl_ifc_ctrl_probe()
280 ret = request_irq(fsl_ifc_ctrl_dev->nand_irq, fsl_ifc_nand_irq, in fsl_ifc_ctrl_probe()
281 0, "fsl-ifc-nand", fsl_ifc_ctrl_dev); in fsl_ifc_ctrl_probe()
284 fsl_ifc_ctrl_dev->nand_irq); in fsl_ifc_ctrl_probe()
297 free_irq(fsl_ifc_ctrl_dev->nand_irq, fsl_ifc_ctrl_dev); in fsl_ifc_ctrl_probe()
299 free_irq(fsl_ifc_ctrl_dev->irq, fsl_ifc_ctrl_dev); in fsl_ifc_ctrl_probe()
301 irq_dispose_mapping(fsl_ifc_ctrl_dev->nand_irq); in fsl_ifc_ctrl_probe()
302 irq_dispose_mapping(fsl_ifc_ctrl_dev->irq); in fsl_ifc_ctrl_probe()
304 iounmap(fsl_ifc_ctrl_dev->gregs); in fsl_ifc_ctrl_probe()