Lines Matching full:od
697 struct bcm2835_dmadev *od = to_bcm2835_dma_dev(chan->device); in bcm2835_dma_prep_dma_cyclic() local
750 if (buf_addr == od->zero_page && !c->is_lite_channel) in bcm2835_dma_prep_dma_cyclic()
842 static void bcm2835_dma_free(struct bcm2835_dmadev *od) in bcm2835_dma_free() argument
846 list_for_each_entry_safe(c, next, &od->ddev.channels, in bcm2835_dma_free()
852 dma_unmap_page_attrs(od->ddev.dev, od->zero_page, PAGE_SIZE, in bcm2835_dma_free()
880 struct bcm2835_dmadev *od; in bcm2835_dma_probe() local
898 od = devm_kzalloc(&pdev->dev, sizeof(*od), GFP_KERNEL); in bcm2835_dma_probe()
899 if (!od) in bcm2835_dma_probe()
908 od->base = base; in bcm2835_dma_probe()
910 dma_cap_set(DMA_SLAVE, od->ddev.cap_mask); in bcm2835_dma_probe()
911 dma_cap_set(DMA_PRIVATE, od->ddev.cap_mask); in bcm2835_dma_probe()
912 dma_cap_set(DMA_CYCLIC, od->ddev.cap_mask); in bcm2835_dma_probe()
913 dma_cap_set(DMA_MEMCPY, od->ddev.cap_mask); in bcm2835_dma_probe()
914 od->ddev.device_alloc_chan_resources = bcm2835_dma_alloc_chan_resources; in bcm2835_dma_probe()
915 od->ddev.device_free_chan_resources = bcm2835_dma_free_chan_resources; in bcm2835_dma_probe()
916 od->ddev.device_tx_status = bcm2835_dma_tx_status; in bcm2835_dma_probe()
917 od->ddev.device_issue_pending = bcm2835_dma_issue_pending; in bcm2835_dma_probe()
918 od->ddev.device_prep_dma_cyclic = bcm2835_dma_prep_dma_cyclic; in bcm2835_dma_probe()
919 od->ddev.device_prep_slave_sg = bcm2835_dma_prep_slave_sg; in bcm2835_dma_probe()
920 od->ddev.device_prep_dma_memcpy = bcm2835_dma_prep_dma_memcpy; in bcm2835_dma_probe()
921 od->ddev.device_config = bcm2835_dma_slave_config; in bcm2835_dma_probe()
922 od->ddev.device_terminate_all = bcm2835_dma_terminate_all; in bcm2835_dma_probe()
923 od->ddev.device_synchronize = bcm2835_dma_synchronize; in bcm2835_dma_probe()
924 od->ddev.src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES); in bcm2835_dma_probe()
925 od->ddev.dst_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES); in bcm2835_dma_probe()
926 od->ddev.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV) | in bcm2835_dma_probe()
928 od->ddev.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST; in bcm2835_dma_probe()
929 od->ddev.descriptor_reuse = true; in bcm2835_dma_probe()
930 od->ddev.dev = &pdev->dev; in bcm2835_dma_probe()
931 INIT_LIST_HEAD(&od->ddev.channels); in bcm2835_dma_probe()
933 platform_set_drvdata(pdev, od); in bcm2835_dma_probe()
935 od->zero_page = dma_map_page_attrs(od->ddev.dev, ZERO_PAGE(0), 0, in bcm2835_dma_probe()
938 if (dma_mapping_error(od->ddev.dev, od->zero_page)) { in bcm2835_dma_probe()
991 rc = bcm2835_dma_chan_init(od, i, irq[i], irq_flags); in bcm2835_dma_probe()
1000 bcm2835_dma_xlate, od); in bcm2835_dma_probe()
1006 rc = dma_async_device_register(&od->ddev); in bcm2835_dma_probe()
1018 bcm2835_dma_free(od); in bcm2835_dma_probe()
1024 struct bcm2835_dmadev *od = platform_get_drvdata(pdev); in bcm2835_dma_remove() local
1026 dma_async_device_unregister(&od->ddev); in bcm2835_dma_remove()
1027 bcm2835_dma_free(od); in bcm2835_dma_remove()