Lines Matching defs:fdev

1000 	struct fsldma_device *fdev = data;
1006 gsr = (fdev->feature & FSL_DMA_BIG_ENDIAN) ? in_be32(fdev->regs)
1007 : in_le32(fdev->regs);
1009 dev_dbg(fdev->dev, "IRQ: gsr 0x%.8x\n", gsr);
1012 chan = fdev->chan[i];
1017 dev_dbg(fdev->dev, "IRQ: chan %d\n", chan->id);
1029 static void fsldma_free_irqs(struct fsldma_device *fdev)
1034 if (fdev->irq) {
1035 dev_dbg(fdev->dev, "free per-controller IRQ\n");
1036 free_irq(fdev->irq, fdev);
1041 chan = fdev->chan[i];
1049 static int fsldma_request_irqs(struct fsldma_device *fdev)
1056 if (fdev->irq) {
1057 dev_dbg(fdev->dev, "request per-controller IRQ\n");
1058 ret = request_irq(fdev->irq, fsldma_ctrl_irq, IRQF_SHARED,
1059 "fsldma-controller", fdev);
1065 chan = fdev->chan[i];
1088 chan = fdev->chan[i];
1105 static int fsl_dma_chan_probe(struct fsldma_device *fdev,
1122 dev_err(fdev->dev, "unable to ioremap registers\n");
1129 dev_err(fdev->dev, "unable to find 'reg' property\n");
1134 if (!fdev->feature)
1135 fdev->feature = chan->feature;
1141 WARN_ON(fdev->feature != chan->feature);
1143 chan->dev = fdev->dev;
1148 dev_err(fdev->dev, "too many channels for device\n");
1153 fdev->chan[chan->id] = chan;
1183 chan->common.device = &fdev->common;
1190 list_add_tail(&chan->common.device_node, &fdev->common.channels);
1192 dev_info(fdev->dev, "#%d (%s), irq %d\n", chan->id, compatible,
1193 chan->irq ? chan->irq : fdev->irq);
1215 struct fsldma_device *fdev;
1220 fdev = kzalloc(sizeof(*fdev), GFP_KERNEL);
1221 if (!fdev) {
1226 fdev->dev = &op->dev;
1227 INIT_LIST_HEAD(&fdev->common.channels);
1230 fdev->regs = of_iomap(op->dev.of_node, 0);
1231 if (!fdev->regs) {
1238 fdev->irq = irq_of_parse_and_map(op->dev.of_node, 0);
1240 dma_cap_set(DMA_MEMCPY, fdev->common.cap_mask);
1241 dma_cap_set(DMA_SLAVE, fdev->common.cap_mask);
1242 fdev->common.device_alloc_chan_resources = fsl_dma_alloc_chan_resources;
1243 fdev->common.device_free_chan_resources = fsl_dma_free_chan_resources;
1244 fdev->common.device_prep_dma_memcpy = fsl_dma_prep_memcpy;
1245 fdev->common.device_tx_status = fsl_tx_status;
1246 fdev->common.device_issue_pending = fsl_dma_memcpy_issue_pending;
1247 fdev->common.device_config = fsl_dma_device_config;
1248 fdev->common.device_terminate_all = fsl_dma_device_terminate_all;
1249 fdev->common.dev = &op->dev;
1251 fdev->common.src_addr_widths = FSL_DMA_BUSWIDTHS;
1252 fdev->common.dst_addr_widths = FSL_DMA_BUSWIDTHS;
1253 fdev->common.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
1254 fdev->common.residue_granularity = DMA_RESIDUE_GRANULARITY_DESCRIPTOR;
1258 platform_set_drvdata(op, fdev);
1267 fsl_dma_chan_probe(fdev, child,
1273 fsl_dma_chan_probe(fdev, child,
1286 err = fsldma_request_irqs(fdev);
1288 dev_err(fdev->dev, "unable to request IRQs\n");
1292 dma_async_device_register(&fdev->common);
1297 if (fdev->chan[i])
1298 fsl_dma_chan_remove(fdev->chan[i]);
1300 irq_dispose_mapping(fdev->irq);
1301 iounmap(fdev->regs);
1303 kfree(fdev);
1310 struct fsldma_device *fdev;
1313 fdev = platform_get_drvdata(op);
1314 dma_async_device_unregister(&fdev->common);
1316 fsldma_free_irqs(fdev);
1319 if (fdev->chan[i])
1320 fsl_dma_chan_remove(fdev->chan[i]);
1322 irq_dispose_mapping(fdev->irq);
1324 iounmap(fdev->regs);
1325 kfree(fdev);
1333 struct fsldma_device *fdev = dev_get_drvdata(dev);
1338 chan = fdev->chan[i];
1353 chan = fdev->chan[i];
1364 struct fsldma_device *fdev = dev_get_drvdata(dev);
1370 chan = fdev->chan[i];