forked from Minki/linux
[PATCH] Move valid_dma_direction() from x86_64 to generic code
As suggested by Muli Ben-Yehuda this function is moved to generic code as may be useful for all archs. [akpm@osdl.org: fix] Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de> Cc: Muli Ben-Yehuda <muli@il.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
d09d7ddf30
commit
d6bd3a39f7
@ -3,7 +3,8 @@
|
||||
#include <linux/pci.h>
|
||||
#include <linux/cache.h>
|
||||
#include <linux/module.h>
|
||||
#include <asm/dma-mapping.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
#include <asm/proto.h>
|
||||
#include <asm/swiotlb.h>
|
||||
#include <asm/dma.h>
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include <linux/mii.h>
|
||||
#include <linux/ethtool.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
#include <asm/8xx_immap.h>
|
||||
#include <asm/pgtable.h>
|
||||
@ -37,7 +38,6 @@
|
||||
#include <asm/irq.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/commproc.h>
|
||||
#include <asm/dma-mapping.h>
|
||||
|
||||
#include "fec_8xx.h"
|
||||
|
||||
|
@ -6,11 +6,10 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/phy.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
#include <linux/fs_enet_pd.h>
|
||||
|
||||
#include <asm/dma-mapping.h>
|
||||
|
||||
#ifdef CONFIG_CPM1
|
||||
#include <asm/commproc.h>
|
||||
|
||||
|
@ -55,13 +55,6 @@ extern dma_addr_t bad_dma_address;
|
||||
extern struct dma_mapping_ops* dma_ops;
|
||||
extern int iommu_merge;
|
||||
|
||||
static inline int valid_dma_direction(int dma_direction)
|
||||
{
|
||||
return ((dma_direction == DMA_BIDIRECTIONAL) ||
|
||||
(dma_direction == DMA_TO_DEVICE) ||
|
||||
(dma_direction == DMA_FROM_DEVICE));
|
||||
}
|
||||
|
||||
static inline int dma_mapping_error(dma_addr_t dma_addr)
|
||||
{
|
||||
if (dma_ops->mapping_error)
|
||||
|
@ -24,6 +24,13 @@ enum dma_data_direction {
|
||||
#define DMA_28BIT_MASK 0x000000000fffffffULL
|
||||
#define DMA_24BIT_MASK 0x0000000000ffffffULL
|
||||
|
||||
static inline int valid_dma_direction(int dma_direction)
|
||||
{
|
||||
return ((dma_direction == DMA_BIDIRECTIONAL) ||
|
||||
(dma_direction == DMA_TO_DEVICE) ||
|
||||
(dma_direction == DMA_FROM_DEVICE));
|
||||
}
|
||||
|
||||
#include <asm/dma-mapping.h>
|
||||
|
||||
/* Backwards compat, remove in 2.7.x */
|
||||
|
Loading…
Reference in New Issue
Block a user