diff options
Diffstat (limited to 'arch/sparc/kernel/ioport.c')
-rw-r--r-- | arch/sparc/kernel/ioport.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index 1eb604389655..edbea232c617 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c | |||
@@ -654,6 +654,33 @@ EXPORT_SYMBOL(pci32_dma_ops); | |||
654 | 654 | ||
655 | #endif /* CONFIG_PCI */ | 655 | #endif /* CONFIG_PCI */ |
656 | 656 | ||
657 | /* | ||
658 | * Return whether the given PCI device DMA address mask can be | ||
659 | * supported properly. For example, if your device can only drive the | ||
660 | * low 24-bits during PCI bus mastering, then you would pass | ||
661 | * 0x00ffffff as the mask to this function. | ||
662 | */ | ||
663 | int dma_supported(struct device *dev, u64 mask) | ||
664 | { | ||
665 | #ifdef CONFIG_PCI | ||
666 | if (dev->bus == &pci_bus_type) | ||
667 | return 1; | ||
668 | #endif | ||
669 | return 0; | ||
670 | } | ||
671 | EXPORT_SYMBOL(dma_supported); | ||
672 | |||
673 | int dma_set_mask(struct device *dev, u64 dma_mask) | ||
674 | { | ||
675 | #ifdef CONFIG_PCI | ||
676 | if (dev->bus == &pci_bus_type) | ||
677 | return pci_set_dma_mask(to_pci_dev(dev), dma_mask); | ||
678 | #endif | ||
679 | return -EOPNOTSUPP; | ||
680 | } | ||
681 | EXPORT_SYMBOL(dma_set_mask); | ||
682 | |||
683 | |||
657 | #ifdef CONFIG_PROC_FS | 684 | #ifdef CONFIG_PROC_FS |
658 | 685 | ||
659 | static int | 686 | static int |