Lines Matching defs:mdev
263 struct milbeaut_xdmac_device *mdev,
267 struct milbeaut_xdmac_chan *mc = &mdev->channels[chan_id];
285 mc->reg_ch_base = mdev->reg_base + chan_id * 0x30;
288 vchan_init(&mc->vc, &mdev->ddev);
293 static void enable_xdmac(struct milbeaut_xdmac_device *mdev)
297 val = readl(mdev->reg_base + M10V_XDACS);
299 writel(val, mdev->reg_base + M10V_XDACS);
302 static void disable_xdmac(struct milbeaut_xdmac_device *mdev)
306 val = readl(mdev->reg_base + M10V_XDACS);
308 writel(val, mdev->reg_base + M10V_XDACS);
314 struct milbeaut_xdmac_device *mdev;
322 mdev = devm_kzalloc(dev, struct_size(mdev, channels, nr_chans),
324 if (!mdev)
327 mdev->reg_base = devm_platform_ioremap_resource(pdev, 0);
328 if (IS_ERR(mdev->reg_base))
329 return PTR_ERR(mdev->reg_base);
331 ddev = &mdev->ddev;
345 ret = milbeaut_xdmac_chan_init(pdev, mdev, i);
350 enable_xdmac(mdev);
357 of_dma_simple_xlate, mdev);
361 platform_set_drvdata(pdev, mdev);
368 disable_xdmac(mdev);
374 struct milbeaut_xdmac_device *mdev = platform_get_drvdata(pdev);
385 list_for_each_entry(chan, &mdev->ddev.channels, device_node) {
393 dma_async_device_unregister(&mdev->ddev);
395 disable_xdmac(mdev);