Lines Matching refs:fdev

1001 	struct fsldma_device *fdev = data;
1007 gsr = (fdev->feature & FSL_DMA_BIG_ENDIAN) ? in_be32(fdev->regs)
1008 : in_le32(fdev->regs);
1010 dev_dbg(fdev->dev, "IRQ: gsr 0x%.8x\n", gsr);
1013 chan = fdev->chan[i];
1018 dev_dbg(fdev->dev, "IRQ: chan %d\n", chan->id);
1030 static void fsldma_free_irqs(struct fsldma_device *fdev)
1035 if (fdev->irq) {
1036 dev_dbg(fdev->dev, "free per-controller IRQ\n");
1037 free_irq(fdev->irq, fdev);
1042 chan = fdev->chan[i];
1050 static int fsldma_request_irqs(struct fsldma_device *fdev)
1057 if (fdev->irq) {
1058 dev_dbg(fdev->dev, "request per-controller IRQ\n");
1059 ret = request_irq(fdev->irq, fsldma_ctrl_irq, IRQF_SHARED,
1060 "fsldma-controller", fdev);
1066 chan = fdev->chan[i];
1089 chan = fdev->chan[i];
1106 static int fsl_dma_chan_probe(struct fsldma_device *fdev,
1123 dev_err(fdev->dev, "unable to ioremap registers\n");
1130 dev_err(fdev->dev, "unable to find 'reg' property\n");
1135 if (!fdev->feature)
1136 fdev->feature = chan->feature;
1142 WARN_ON(fdev->feature != chan->feature);
1144 chan->dev = fdev->dev;
1149 dev_err(fdev->dev, "too many channels for device\n");
1154 fdev->chan[chan->id] = chan;
1184 chan->common.device = &fdev->common;
1191 list_add_tail(&chan->common.device_node, &fdev->common.channels);
1193 dev_info(fdev->dev, "#%d (%s), irq %d\n", chan->id, compatible,
1194 chan->irq ? chan->irq : fdev->irq);
1216 struct fsldma_device *fdev;
1221 fdev = kzalloc(sizeof(*fdev), GFP_KERNEL);
1222 if (!fdev) {
1227 fdev->dev = &op->dev;
1228 INIT_LIST_HEAD(&fdev->common.channels);
1231 fdev->regs = of_iomap(op->dev.of_node, 0);
1232 if (!fdev->regs) {
1239 fdev->irq = irq_of_parse_and_map(op->dev.of_node, 0);
1241 dma_cap_set(DMA_MEMCPY, fdev->common.cap_mask);
1242 dma_cap_set(DMA_SLAVE, fdev->common.cap_mask);
1243 fdev->common.device_alloc_chan_resources = fsl_dma_alloc_chan_resources;
1244 fdev->common.device_free_chan_resources = fsl_dma_free_chan_resources;
1245 fdev->common.device_prep_dma_memcpy = fsl_dma_prep_memcpy;
1246 fdev->common.device_tx_status = fsl_tx_status;
1247 fdev->common.device_issue_pending = fsl_dma_memcpy_issue_pending;
1248 fdev->common.device_config = fsl_dma_device_config;
1249 fdev->common.device_terminate_all = fsl_dma_device_terminate_all;
1250 fdev->common.dev = &op->dev;
1252 fdev->common.src_addr_widths = FSL_DMA_BUSWIDTHS;
1253 fdev->common.dst_addr_widths = FSL_DMA_BUSWIDTHS;
1254 fdev->common.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
1255 fdev->common.residue_granularity = DMA_RESIDUE_GRANULARITY_DESCRIPTOR;
1259 platform_set_drvdata(op, fdev);
1268 fsl_dma_chan_probe(fdev, child,
1274 fsl_dma_chan_probe(fdev, child,
1287 err = fsldma_request_irqs(fdev);
1289 dev_err(fdev->dev, "unable to request IRQs\n");
1293 dma_async_device_register(&fdev->common);
1298 if (fdev->chan[i])
1299 fsl_dma_chan_remove(fdev->chan[i]);
1301 irq_dispose_mapping(fdev->irq);
1302 iounmap(fdev->regs);
1304 kfree(fdev);
1311 struct fsldma_device *fdev;
1314 fdev = platform_get_drvdata(op);
1315 dma_async_device_unregister(&fdev->common);
1317 fsldma_free_irqs(fdev);
1320 if (fdev->chan[i])
1321 fsl_dma_chan_remove(fdev->chan[i]);
1323 irq_dispose_mapping(fdev->irq);
1325 iounmap(fdev->regs);
1326 kfree(fdev);
1334 struct fsldma_device *fdev = dev_get_drvdata(dev);
1339 chan = fdev->chan[i];
1354 chan = fdev->chan[i];
1365 struct fsldma_device *fdev = dev_get_drvdata(dev);
1371 chan = fdev->chan[i];