Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line | 
|---|---|---|---|
| 9 | f9daq | 1 | #ifndef __PCIIF_H__ | 
        
| 2 | #define __PCIIF_H__ | 
        ||
| 3 | //**************************************************************************** | 
        ||
| 4 | // Copyright (C) 2001-2004  ARW Elktronik Germany | 
        ||
| 5 | // | 
        ||
| 6 | // This program is free software; you can redistribute it and/or modify | 
        ||
| 7 | // it under the terms of the GNU General Public License as published by | 
        ||
| 8 | // the Free Software Foundation; either version 2 of the License, or | 
        ||
| 9 | // (at your option) any later version. | 
        ||
| 10 | // | 
        ||
| 11 | // This program is distributed in the hope that it will be useful, | 
        ||
| 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | 
        ||
| 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
        ||
| 14 | // GNU General Public License for more details. | 
        ||
| 15 | // | 
        ||
| 16 | // You should have received a copy of the GNU General Public License | 
        ||
| 17 | // along with this program; if not, write to the Free Software | 
        ||
| 18 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 
        ||
| 19 | // | 
        ||
| 20 | // This product is not authorized for use as critical component in | 
        ||
| 21 | // life support systems without the express written approval of | 
        ||
| 22 | // ARW Elektronik Germany. | 
        ||
| 23 | // | 
        ||
| 24 | // Please announce changes and hints to ARW Elektronik | 
        ||
| 25 | // | 
        ||
| 26 | // Maintainer(s): Klaus Hitschler (klaus.hitschler@gmx.de) | 
        ||
| 27 | //**************************************************************************** | 
        ||
| 28 | |||
| 29 | //**************************************************************************** | 
        ||
| 30 | // | 
        ||
| 31 | // pciif.h - all definitions about the VMEMM module | 
        ||
| 32 | // | 
        ||
| 33 | // $Log: pciif.h,v $ | 
        ||
| 34 | // Revision 1.6  2004/08/13 19:23:26  klaus | 
        ||
| 35 | // conversion to kernel-version 2.6, released version 3.0 | 
        ||
| 36 | // | 
        ||
| 37 | // Revision 1.5  2002/10/18 21:56:28  klaus | 
        ||
| 38 | // completed functional features, untested | 
        ||
| 39 | // | 
        ||
| 40 | // Revision 1.4  2002/10/18 21:56:28  klaus | 
        ||
| 41 | // completed functional features, untested | 
        ||
| 42 | // | 
        ||
| 43 | // Revision 1.3  2002/10/10 18:57:46  klaus | 
        ||
| 44 | // source beautyfied | 
        ||
| 45 | // | 
        ||
| 46 | //**************************************************************************** | 
        ||
| 47 | |||
| 48 | //**************************************************************************** | 
        ||
| 49 | // INCLUDES | 
        ||
| 50 | #include <linux/types.h> | 
        ||
| 51 | #include "vic.h" | 
        ||
| 52 | |||
| 53 | //**************************************************************************** | 
        ||
| 54 | // DEFINES | 
        ||
| 55 | |||
| 56 | /* type of this VMEMM ---------------------------------------------------*/ | 
        ||
| 57 | #define VMEMM_MODULE_TYPE 0x1000 | 
        ||
| 58 | |||
| 59 | /*-----------------------------------------------------------------------*/ | 
        ||
| 60 | /* all addresses relative to PCI-Window                                  */ | 
        ||
| 61 | |||
| 62 | /*------------- addresses of vmemm local devices ------------------------*/ | 
        ||
| 63 | #define CSR     (u32)0x0000   /* control status register                 */ | 
        ||
| 64 | #define VICRES  (u32)0x0004   /* VIC reset register / interrupt status   */ | 
        ||
| 65 | #define ADRHL   (u32)0x0008   /* AdrH and AdrL as long                   */ | 
        ||
| 66 | #define VICBASE (u32)0x0400   /* base of VIC68A                          */ | 
        ||
| 67 | #define VECBASE (u32)0x0800   /* base of vector registers                */ | 
        ||
| 68 | #define VMEBASE (u32)0x1000   /* base of 4k VME-BUS window               */ | 
        ||
| 69 | |||
| 70 | /*---------- parts of addresses derived from above ----------------------*/ | 
        ||
| 71 | #define IVEC1   (u32)(VECBASE + 3)      /* IACK 1 vector                 */ | 
        ||
| 72 | #define IVEC2   (u32)(VECBASE + 5)      /* IACK 2 vector                 */ | 
        ||
| 73 | #define IVEC3   (u32)(VECBASE + 7)      /* IACK 3 vector                 */ | 
        ||
| 74 | #define IVEC4   (u32)(VECBASE + 9)      /* IACK 4 vector                 */ | 
        ||
| 75 | #define IVEC5   (u32)(VECBASE + b)      /* IACK 5 vector                 */ | 
        ||
| 76 | #define IVEC6   (u32)(VECBASE + d)      /* IACK 6 vector                 */ | 
        ||
| 77 | #define IVEC7   (u32)(VECBASE + f)      /* IACK 7 vector                 */ | 
        ||
| 78 | |||
| 79 | #define ADRL    (u32)ADRHL               /* u16 access addr. VME-addr    */ | 
        ||
| 80 | #define ADRH    (u32)(ADRHL + 2) | 
        ||
| 81 | |||
| 82 | /*--------- address mask ------------------------------------------------*/ | 
        ||
| 83 | #define VME_ADR_MASK (u32)0x00000FFF    /* masks lower part of address   */ | 
        ||
| 84 | |||
| 85 | /*--------- some masks in CSR -------------------------------------------*/ | 
        ||
| 86 | #define FLAG_RMC     (u16)0x0001        /* set = next cycle is RMC       */ | 
        ||
| 87 | #define FLAG_BLT     (u16)0x0002        /* don't use it. must be 0       */ | 
        ||
| 88 | #define FLAG_WORD    (u16)0x0004         /* it is a u16 wide interface   */ | 
        ||
| 89 | #define FLAG_SYSCTL  (u16)0x0008        /* the system contrl. is enabled */ | 
        ||
| 90 | #define MASK_MODNR   (u16)0x00F0        /* the mask to get the module No */ | 
        ||
| 91 | #define MASK_FPGA    (u16)0x0F00        /* the mask to get the FPGA rev. */ | 
        ||
| 92 | #define MASK_MODTYPE (u16)0xF000        /* the mask to get type of module*/ | 
        ||
| 93 | |||
| 94 | /*---------- action commands in VICRES -----------------------------------*/ | 
        ||
| 95 | #define GLOBAL_RESET (u16)0x000A        /* write this to reset the intrfc */ | 
        ||
| 96 | #define LOCAL_RESET  (u16)0x0005        /* generate a local reset         */ | 
        ||
| 97 | |||
| 98 | #endif // __PCIIF_H__ | 
        ||
| 99 | |||
| 100 |