mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
powerpc: move device_to_mask() to dma-mapping.h
Move device_to_mask() to dma-mapping.h because we need to use it from outside dma_64.c in a later patch. Signed-off-by: Mark Nelson <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
This commit is contained in:
parent
7e5f810503
commit
3a4c6f0b15
2 changed files with 9 additions and 9 deletions
|
|
@ -45,6 +45,15 @@ extern void __dma_sync_page(struct page *page, unsigned long offset,
|
|||
#endif /* ! CONFIG_NOT_COHERENT_CACHE */
|
||||
|
||||
#ifdef CONFIG_PPC64
|
||||
|
||||
static inline unsigned long device_to_mask(struct device *dev)
|
||||
{
|
||||
if (dev->dma_mask && *dev->dma_mask)
|
||||
return *dev->dma_mask;
|
||||
/* Assume devices without mask can take 32 bit addresses */
|
||||
return 0xfffffffful;
|
||||
}
|
||||
|
||||
/*
|
||||
* DMA operations are abstracted for G5 vs. i/pSeries, PCI vs. VIO
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue