coherent_dma_mask :用来分配连续一致性dma。 dma_mask:在dma_map_single->dma_map_page,dma_capable用。 先看默认设置。后续可以通过pci_set_dma_mask/pci_set_consistent_dma_mask分别设置 设置: int pci_setup_device(struct pci_dev *dev) { u32 class; u16 cmd; u8 hdr_type; int pos = 0; stru...
staticintetnaviv_pdev_probe(struct platform_device *pdev){structdevice*dev= &pdev->dev;structdevice_node*node=dev->of_node;structcomponent_match*match=NULL;dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));if(node) {structdevice_node*core_node;inti;for(i =0; ; i++) { core_nod...
* Set both the DMA mask and the coherent DMA mask to the same thing. * Note that we don't check the return value from dma_set_coherent_mask() * as the DMA API guarantees that the coherent DMA mask can be set to * the same or smaller than the streaming DMA mask. */ static inli...
s390/ism: Set DMA coherent mask Browse files A future change will convert the DMA API implementation from the architecture specific arch/s390/pci/pci_dma.c to using the common code drivers/iommu/dma-iommu.c which the utilizes the same IOMMU hardware through the s390-iommu driver. Unlike ...
dma_mask = DMA_BIT_MASK(8 * sizeof(dma_addr_t)); if (dma_set_coherent_mask(dev->device, dma_mask)) { axidma_err("Unable to set the DMA coherent mask.\n"); goto device_cleanup; } Then the character device would be created. ...