dma: import linux/dma-direction.h to consolidate enum dma_data_direction
Import include/linux/dma-direction.h from Linux 4.13-rc7 and delete duplicated definitions of enum dma_data_direction. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This commit is contained in:
parent
29487ef4d5
commit
b27af39935
7 changed files with 20 additions and 25 deletions
|
@ -8,13 +8,9 @@
|
||||||
#ifndef __ASM_ARM_DMA_MAPPING_H
|
#ifndef __ASM_ARM_DMA_MAPPING_H
|
||||||
#define __ASM_ARM_DMA_MAPPING_H
|
#define __ASM_ARM_DMA_MAPPING_H
|
||||||
|
|
||||||
#define dma_mapping_error(x, y) 0
|
#include <linux/dma-direction.h>
|
||||||
|
|
||||||
enum dma_data_direction {
|
#define dma_mapping_error(x, y) 0
|
||||||
DMA_BIDIRECTIONAL = 0,
|
|
||||||
DMA_TO_DEVICE = 1,
|
|
||||||
DMA_FROM_DEVICE = 2,
|
|
||||||
};
|
|
||||||
|
|
||||||
static inline void *dma_alloc_coherent(size_t len, unsigned long *handle)
|
static inline void *dma_alloc_coherent(size_t len, unsigned long *handle)
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,11 +7,7 @@
|
||||||
#ifndef __ASM_NDS_DMA_MAPPING_H
|
#ifndef __ASM_NDS_DMA_MAPPING_H
|
||||||
#define __ASM_NDS_DMA_MAPPING_H
|
#define __ASM_NDS_DMA_MAPPING_H
|
||||||
|
|
||||||
enum dma_data_direction {
|
#include <linux/dma-direction.h>
|
||||||
DMA_BIDIRECTIONAL = 0,
|
|
||||||
DMA_TO_DEVICE = 1,
|
|
||||||
DMA_FROM_DEVICE = 2,
|
|
||||||
};
|
|
||||||
|
|
||||||
static void *dma_alloc_coherent(size_t len, unsigned long *handle)
|
static void *dma_alloc_coherent(size_t len, unsigned long *handle)
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,13 +8,9 @@
|
||||||
#ifndef __ASM_X86_DMA_MAPPING_H
|
#ifndef __ASM_X86_DMA_MAPPING_H
|
||||||
#define __ASM_X86_DMA_MAPPING_H
|
#define __ASM_X86_DMA_MAPPING_H
|
||||||
|
|
||||||
#define dma_mapping_error(x, y) 0
|
#include <linux/dma-direction.h>
|
||||||
|
|
||||||
enum dma_data_direction {
|
#define dma_mapping_error(x, y) 0
|
||||||
DMA_BIDIRECTIONAL = 0,
|
|
||||||
DMA_TO_DEVICE = 1,
|
|
||||||
DMA_FROM_DEVICE = 2,
|
|
||||||
};
|
|
||||||
|
|
||||||
static inline void *dma_alloc_coherent(size_t len, unsigned long *handle)
|
static inline void *dma_alloc_coherent(size_t len, unsigned long *handle)
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#include <command.h>
|
#include <command.h>
|
||||||
#include <pci.h>
|
#include <pci.h>
|
||||||
#include <asm/processor.h>
|
#include <asm/processor.h>
|
||||||
|
#include <linux/dma-direction.h>
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
|
|
@ -401,13 +401,6 @@ struct ata_device {
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
enum dma_data_direction {
|
|
||||||
DMA_BIDIRECTIONAL = 0,
|
|
||||||
DMA_TO_DEVICE = 1,
|
|
||||||
DMA_FROM_DEVICE = 2,
|
|
||||||
DMA_NONE = 3,
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ata_link {
|
struct ata_link {
|
||||||
struct ata_port *ap;
|
struct ata_port *ap;
|
||||||
int pmp;
|
int pmp;
|
||||||
|
|
|
@ -11,10 +11,10 @@
|
||||||
#include <mmc.h>
|
#include <mmc.h>
|
||||||
#include <dm.h>
|
#include <dm.h>
|
||||||
#include <linux/compat.h>
|
#include <linux/compat.h>
|
||||||
|
#include <linux/dma-direction.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/sizes.h>
|
#include <linux/sizes.h>
|
||||||
#include <asm/unaligned.h>
|
#include <asm/unaligned.h>
|
||||||
#include <asm/dma-mapping.h>
|
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
|
|
13
include/linux/dma-direction.h
Normal file
13
include/linux/dma-direction.h
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
#ifndef _LINUX_DMA_DIRECTION_H
|
||||||
|
#define _LINUX_DMA_DIRECTION_H
|
||||||
|
/*
|
||||||
|
* These definitions mirror those in pci.h, so they can be used
|
||||||
|
* interchangeably with their PCI_ counterparts.
|
||||||
|
*/
|
||||||
|
enum dma_data_direction {
|
||||||
|
DMA_BIDIRECTIONAL = 0,
|
||||||
|
DMA_TO_DEVICE = 1,
|
||||||
|
DMA_FROM_DEVICE = 2,
|
||||||
|
DMA_NONE = 3,
|
||||||
|
};
|
||||||
|
#endif
|
Loading…
Reference in a new issue