mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 14:55:04 +07:00
d2912cb15b
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
52 lines
1.4 KiB
C
52 lines
1.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* arch/arm/include/asm/mach/dma.h
|
|
*
|
|
* Copyright (C) 1998-2000 Russell King
|
|
*
|
|
* This header file describes the interface between the generic DMA handler
|
|
* (dma.c) and the architecture-specific DMA backends (dma-*.c)
|
|
*/
|
|
|
|
struct dma_struct;
|
|
typedef struct dma_struct dma_t;
|
|
|
|
struct dma_ops {
|
|
int (*request)(unsigned int, dma_t *); /* optional */
|
|
void (*free)(unsigned int, dma_t *); /* optional */
|
|
void (*enable)(unsigned int, dma_t *); /* mandatory */
|
|
void (*disable)(unsigned int, dma_t *); /* mandatory */
|
|
int (*residue)(unsigned int, dma_t *); /* optional */
|
|
int (*setspeed)(unsigned int, dma_t *, int); /* optional */
|
|
const char *type;
|
|
};
|
|
|
|
struct dma_struct {
|
|
void *addr; /* single DMA address */
|
|
unsigned long count; /* single DMA size */
|
|
struct scatterlist buf; /* single DMA */
|
|
int sgcount; /* number of DMA SG */
|
|
struct scatterlist *sg; /* DMA Scatter-Gather List */
|
|
|
|
unsigned int active:1; /* Transfer active */
|
|
unsigned int invalid:1; /* Address/Count changed */
|
|
|
|
unsigned int dma_mode; /* DMA mode */
|
|
int speed; /* DMA speed */
|
|
|
|
unsigned int lock; /* Device is allocated */
|
|
const char *device_id; /* Device name */
|
|
|
|
const struct dma_ops *d_ops;
|
|
};
|
|
|
|
/*
|
|
* isa_dma_add - add an ISA-style DMA channel
|
|
*/
|
|
extern int isa_dma_add(unsigned int, dma_t *dma);
|
|
|
|
/*
|
|
* Add the ISA DMA controller. Always takes channels 0-7.
|
|
*/
|
|
extern void isa_init_dma(void);
|