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/] [pexmodule.h] - Diff between revs 7 and 56

Only display areas with differences | Details | Blame | View Log

Rev 7 Rev 56
 
 
#ifndef _PEXDEV_H_
#ifndef _PEXDEV_H_
#define _PEXDEV_H_
#define _PEXDEV_H_
 
 
#include <linux/cdev.h>
#include <linux/cdev.h>
#include <linux/sched.h>
#include <linux/sched.h>
#include <linux/version.h>
#include <linux/version.h>
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,37)
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,37)
#include <linux/semaphore.h>
#include <linux/semaphore.h>
#endif
#endif
 
 
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
 
 
#ifndef _EVENT_H_
#ifndef _EVENT_H_
    #include "event.h"
    #include "event.h"
#endif
#endif
#ifndef  _DMA_CHAN_H_
#ifndef  _DMA_CHAN_H_
    #include "dmachan.h"
    #include "dmachan.h"
#endif
#endif
#ifndef _STREAMLL_H_
#ifndef _STREAMLL_H_
    #include "streamll.h"
    #include "streamll.h"
#endif
#endif
#ifndef _MEMORY_H_
#ifndef _MEMORY_H_
    #include "memory.h"
    #include "memory.h"
#endif
#endif
 
 
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
 
 
#define PEX_DRIVER_NAME             "pex_driver"
#define PEX_DRIVER_NAME             "pex_driver"
#define MAX_NUMBER_OF_DMACHANNELS   4
#define MAX_NUMBER_OF_DMACHANNELS   4
#define NUMBER_OF_PLDS              4
#define NUMBER_OF_PLDS              4
#define IRQ_NUMBER                  1
#define IRQ_NUMBER                  1
#define NUM_TETR_IRQ                8
#define NUM_TETR_IRQ                8
 
 
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
 
 
struct pex_device {
struct pex_device {
 
 
    struct list_head        m_list;
    struct list_head        m_list;
    char                    m_name[128];
    char                    m_name[128];
    atomic_t                m_TotalIRQ;
    atomic_t                m_TotalIRQ;
    dev_t                   m_devno;
    dev_t                   m_devno;
    struct class           *m_class;
    struct class           *m_class;
    struct device          *m_device;
    struct device          *m_device;
    struct pci_dev         *m_pci;
    struct pci_dev         *m_pci;
 
 
    struct address_t        m_BAR0;
    struct address_t        m_BAR0;
    struct address_t        m_BAR1;
    struct address_t        m_BAR1;
 
 
    spinlock_t              m_BoardLock;
    spinlock_t              m_BoardLock;
    struct mutex            m_BoardMutex;
    struct mutex            m_BoardMutex;
    struct semaphore        m_BoardSem;
    struct semaphore        m_BoardSem;
    u32                     m_Interrupt;
    u32                     m_Interrupt;
    u32                     m_DmaIrqEnbl;
    u32                     m_DmaIrqEnbl;
    u32                     m_FlgIrqEnbl;
    u32                     m_FlgIrqEnbl;
    u32                     m_BoardIndex;
    u32                     m_BoardIndex;
    wait_queue_head_t       m_WaitQueue;
    wait_queue_head_t       m_WaitQueue;
    struct timer_list       m_TimeoutTimer;
 
    atomic_t                m_IsTimeout;
    atomic_t                m_IsTimeout;
    struct cdev             m_cdev;
    struct cdev             m_cdev;
 
 
    spinlock_t              m_MemListLock;
    spinlock_t              m_MemListLock;
    atomic_t                m_MemListCount;
    atomic_t                m_MemListCount;
    struct list_head        m_MemList;
    struct list_head        m_MemList;
 
 
    struct CDmaChannel     *m_DmaChannel[MAX_NUMBER_OF_DMACHANNELS];    //
    struct CDmaChannel     *m_DmaChannel[MAX_NUMBER_OF_DMACHANNELS];    //
    u32                     m_PldStatus[NUMBER_OF_PLDS];                        //
    u32                     m_PldStatus[NUMBER_OF_PLDS];                        //
    u32                     m_MemOpUseCount;    // счетчик использования диапазона памяти (PE_MAIN on AMBPEX8)
    u32                     m_MemOpUseCount;    // счетчик использования диапазона памяти (PE_MAIN on AMBPEX8)
    u16                     m_BlockCnt;
    u16                     m_BlockCnt;
    u32                     m_DmaChanMask;
    u32                     m_DmaChanMask;
    u32                     m_DmaChanEnbl[MAX_NUMBER_OF_DMACHANNELS];
    u32                     m_DmaChanEnbl[MAX_NUMBER_OF_DMACHANNELS];
    u32                     m_DmaFifoSize[MAX_NUMBER_OF_DMACHANNELS];
    u32                     m_DmaFifoSize[MAX_NUMBER_OF_DMACHANNELS];
    u32                     m_DmaDir[MAX_NUMBER_OF_DMACHANNELS];
    u32                     m_DmaDir[MAX_NUMBER_OF_DMACHANNELS];
    u32                     m_MaxDmaSize[MAX_NUMBER_OF_DMACHANNELS];
    u32                     m_MaxDmaSize[MAX_NUMBER_OF_DMACHANNELS];
    u16                     m_BlockFifoId[MAX_NUMBER_OF_DMACHANNELS];
    u16                     m_BlockFifoId[MAX_NUMBER_OF_DMACHANNELS];
    u32                     m_FifoAddr[MAX_NUMBER_OF_DMACHANNELS];
    u32                     m_FifoAddr[MAX_NUMBER_OF_DMACHANNELS];
    u32                     m_TetrIrq[NUM_TETR_IRQ];
    u32                     m_TetrIrq[NUM_TETR_IRQ];
    u32                     m_primChan;
    u32                     m_primChan;
};
};
 
 
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
 
 
extern int dbg_trace;
extern int dbg_trace;
extern int err_trace;
extern int err_trace;
 
 
#ifndef PRINTK
#ifndef PRINTK
#define PRINTK(S...) printk(S)
#define PRINTK(S...) printk(S)
#endif
#endif
 
 
#define dbg_msg(flag, S...) do { if(flag) PRINTK(KERN_DEBUG S); } while(0)
#define dbg_msg(flag, S...) do { if(flag) PRINTK(KERN_DEBUG S); } while(0)
#define err_msg(flag, S...) do { if(flag) PRINTK(KERN_ERR S); } while(0)
#define err_msg(flag, S...) do { if(flag) PRINTK(KERN_ERR S); } while(0)
 
 
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
 
 
#endif //_PEXDEV_H_
#endif //_PEXDEV_H_
 
 

powered by: WebSVN 2.1.0

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