/*
 *  arch/ppc/8220_io/bestdma/8220DmaApi.h
 *
 * Header file of Linux environment wrapper for DMA API.
 *
 * Author: MontaVista Software, Inc.
 *         source@mvista.com
 * Copyright 2003 Motorola Inc.
 * Copyright 2003-2004 MontaVista, Software, Inc.
 *
 * This program is free software; you can redistribute  it and/or modify it
 * under  the terms of  the GNU General Public License as published by the
 * Free Software Foundation;  either version 2 of the  License, or (at your
 * option) any later version.
 */

#ifndef __8220DMAAPI_H
#define __8220DMAAPI_H

void initDma (void);

extern int startDma(int channel, void  *srcAddr, s16 srcIncr,
			s8  *destAddr, s16 destIncr, u32 dmaSize, u32 xferSize,
			u32 initiator, int priority, u32 flags, u32 funcDesc,
			void *cookie, void (*callBack)(void *), void *bufDesc);
extern void progressDma(int channel, void **progress);
int MSD_reserveChannel(int channel, void (*handler)(int irq, void *dev_id,
					struct pt_regs *regs),
			const char *handlerName, void *dev_id);
MCD_bufDesc *MSD_allocBufDescriptors(int n);
MCD_bufDescFec *MSD_allocBufDescriptorsFec(int n);
int MSD_freeBufDescriptors(MCD_bufDesc *p, int n);
int MSD_freeBufDescriptorsFec(MCD_bufDescFec *p, int n);
int MSD_reserveChannel(int channel,
	void (*handler)(int irq, void *dev_id, struct pt_regs *regs),
	const char *handlerName, void *dev_id);
int MSD_releaseChannel(int channel);
void MSD_ack (int channel);
#endif
