OpenCores
URL https://opencores.org/ocsvn/pcie_ds_dma/pcie_ds_dma/trunk

Subversion Repositories pcie_ds_dma

[/] [pcie_ds_dma/] [trunk/] [soft/] [linux/] [driver/] [pexdrv/] [hardware.h] - Rev 2

Go to most recent revision | Compare with Previous | Blame | View Log

 
#ifndef _HARDWARE_H_
#define _HARDWARE_H_
 
//-----------------------------------------------------------------------------
 
#define INSYS_VENDOR_ID         0x4953
#define AMBPEX8_DEVID		0x5503
#define ADP201X1AMB_DEVID	0x5504
#define ADP201X1DSP_DEVID	0x5505
#define AMBPEX5_DEVID		0x5507
#define AMBPEXARM_DEVID		0x5702
#define AMBFMC106P_DEVID	0x550A
 
//-----------------------------------------------------------------------------
 
#define MAX_PEXDEVICE_SUPPORT   4
 
//-----------------------------------------------------------------------------
struct pex_device;
//-----------------------------------------------------------------------------
 
int set_device_name(struct pex_device *brd, u16 dev_id, int index);
int InitializeBoard(struct pex_device *brd);
u32 ReadOperationReg(struct pex_device *brd, u32 RelativePort);
void WriteOperationReg(struct pex_device *brd, u32 RelativePort, u32 Value);
u16 ReadOperationWordReg(struct pex_device *brd, u32 RelativePort);
void WriteOperationWordReg(struct pex_device *brd, u32 RelativePort, u16 Value);
u8 ReadOperationByteReg(struct pex_device *brd, u32 RelativePort);
void WriteOperationByteReg(struct pex_device *brd, u32 RelativePort, u8 Value);
u32 ReadAmbReg(struct pex_device *brd, u32 AdmNumber, u32 RelativePort);
u32 ReadAmbMainReg(struct pex_device *brd, u32 RelativePort);
void WriteAmbReg(struct pex_device *brd, u32 AdmNumber, u32 RelativePort, u32 Value);
void WriteAmbMainReg(struct pex_device *brd, u32 RelativePort, u32 Value);
void ReadBufAmbReg(struct pex_device *brd, u32 AdmNumber, u32 RelativePort, u32* VirtualAddress, u32 DwordsCount);
void WriteBufAmbReg(struct pex_device *brd, u32 AdmNumber, u32 RelativePort, u32* VirtualAddress, u32 DwordsCount);
void WriteBufAmbMainReg(struct pex_device *brd, u32 RelativePort, u32* VirtualAddress, u32 DwordsCount);
void TimeoutTimerCallback(unsigned long arg );
void SetRelativeTimer ( struct timer_list *timer, int timeout, void *data );
void CancelTimer ( struct timer_list *timer );
int WaitCmdReady(struct pex_device *brd, u32 AdmNumber, u32 StatusAddress);
int WriteRegData(struct pex_device *brd, u32 AdmNumber, u32 TetrNumber, u32 RegNumber, u32 Value);
void ToPause(int time_out);
void ToTimeOut(int mctime_out);
int ReadRegData(struct pex_device *brd, u32 AdmNumber, u32 TetrNumber, u32 RegNumber, u32 *Value);
int SetDmaMode(struct pex_device *brd, u32 NumberOfChannel, u32 AdmNumber, u32 TetrNumber);
int SetDrqFlag(struct pex_device *brd, u32 AdmNumber, u32 TetrNumber, u32 DrqFlag);
int DmaEnable(struct pex_device *brd, u32 AdmNumber, u32 TetrNumber);
int DmaDisable(struct pex_device *brd, u32 AdmNumber, u32 TetrNumber);
int ResetFifo(struct pex_device *brd, u32 NumberOfChannel);
int Done(struct pex_device *brd, u32 NumberOfChannel);
int HwStartDmaTransfer(struct pex_device *brd, u32 NumberOfChannel);
int HwCompleteDmaTransfer(struct pex_device *brd, u32 NumberOfChannel);
 
//-----------------------------------------------------------------------------
 
int lock_pages( void *va, u32 size );
int unlock_pages( void *va, u32 size );
 
//-----------------------------------------------------------------------------
 
#endif //_HARDWARE_H_
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.