Path: blob/master/drivers/isdn/hardware/eicon/diva_dma.h
15115 views
1/*2*3Copyright (c) Eicon Networks, 2002.4*5This source file is supplied for the use with6Eicon Networks range of DIVA Server Adapters.7*8Eicon File Revision : 2.19*10This program is free software; you can redistribute it and/or modify11it under the terms of the GNU General Public License as published by12the Free Software Foundation; either version 2, or (at your option)13any later version.14*15This program is distributed in the hope that it will be useful,16but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY17implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.18See the GNU General Public License for more details.19*20You should have received a copy of the GNU General Public License21along with this program; if not, write to the Free Software22Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.23*24*/25#ifndef __DIVA_DMA_MAPPING_IFC_H__26#define __DIVA_DMA_MAPPING_IFC_H__27typedef struct _diva_dma_map_entry diva_dma_map_entry_t;28struct _diva_dma_map_entry* diva_alloc_dma_map (void* os_context, int nentries);29void diva_init_dma_map_entry (struct _diva_dma_map_entry* pmap,30int nr, void* virt, dword phys,31void* addr_handle);32int diva_alloc_dma_map_entry (struct _diva_dma_map_entry* pmap);33void diva_free_dma_map_entry (struct _diva_dma_map_entry* pmap, int entry);34void diva_get_dma_map_entry (struct _diva_dma_map_entry* pmap, int nr,35void** pvirt, dword* pphys);36void diva_free_dma_mapping (struct _diva_dma_map_entry* pmap);37/*38Functionality to be implemented by OS wrapper39and running in process context40*/41void diva_init_dma_map (void* hdev,42struct _diva_dma_map_entry** ppmap,43int nentries);44void diva_free_dma_map (void* hdev,45struct _diva_dma_map_entry* pmap);46void* diva_get_entry_handle (struct _diva_dma_map_entry* pmap, int nr);47#endif484950