Annotation of margi2/l64021.h, revision 1.1

1.1     ! cvs         1: /* 
        !             2:     l64021.h
        !             3: 
        !             4:     Copyright (C) Christian Wolff for convergence integrated media.
        !             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: 
        !            21: #ifndef _L64021_H_
        !            22: #define _L64021_H_
        !            23: 
        !            24: #include "margi.h"
        !            25: #include "l64014.h"
        !            26: // L64021 DRAM definitions
        !            27: 
        !            28: #define DRAMMaxSize 0x00200000 // 2 MWords of DRAM
        !            29: 
        !            30: // definitions for the L64021
        !            31: 
        !            32: #define DECODER_OFFSET          0x400
        !            33: 
        !            34: #define L21INTR0  0x000
        !            35: #define L21INTR1  0x001
        !            36: #define L21INTR2  0x002
        !            37: #define L21INTR3  0x003
        !            38: #define L21INTR4  0x004
        !            39: 
        !            40: 
        !            41: // Host interface registers
        !            42: 
        !            43: // Video Decoder Registers
        !            44: 
        !            45: // CSS Regs
        !            46: 
        !            47: // Memory Interface
        !            48: 
        !            49: // Microcontroller
        !            50: 
        !            51: // Video Interface
        !            52: 
        !            53: // Audio Decoder
        !            54: 
        !            55: // RAM Test
        !            56: 
        !            57: // SPU Decoder
        !            58: 
        !            59: 
        !            60: 
        !            61: 
        !            62:     ////////////////////////////////////////////////////
        !            63:    //                                                //
        !            64:   //  Access to the L64021 registers (0x400-0x7FF)  //
        !            65:  //                                                //
        !            66: ////////////////////////////////////////////////////
        !            67: 
        !            68: #define DecoderWriteByte(card,where,what) WriteByte(card,where,what)
        !            69: #define DecoderReadByte(card,where) ReadByte(card,where)
        !            70: #define DecoderMaskByte(card,where,mask,bits) MaskByte(card,where,mask,bits)
        !            71: #define DecoderSetByte(card,addr,bits) DecoderWriteByte(card,addr,DecoderReadByte(card,addr)|(bits))
        !            72: #define DecoderDelByte(card,addr,mask) DecoderWriteByte(card,addr,DecoderReadByte(card,addr)&~(mask))
        !            73: 
        !            74: #define DecoderReadWord(card,addr) ((u16)DecoderReadByte(card,addr)|\
        !            75:                                    ((u16)DecoderReadByte(card,(addr)+1)<<8))
        !            76: 
        !            77: #define DecoderWriteWord(card,addr,data) {\
        !            78:         DecoderWriteByte(card,addr,(data) & 0xFF);\
        !            79:         DecoderWriteByte(card,(addr)+1,((data)>>8) & 0xFF);}
        !            80: 
        !            81: 
        !            82: #define DecoderReadMWord(card, addr)(\
        !            83:           (u32)DecoderReadByte(card,addr)|\
        !            84:          ((u32)DecoderReadByte(card,(addr)+1)<<8)|\
        !            85:          ((u32)DecoderReadByte(card,(addr)+2)<<16))
        !            86: 
        !            87: #define DecoderWriteMWord(card,addr,data) {\
        !            88:   DecoderWriteByte(card,addr,(data) & 0xFF);\
        !            89:   DecoderWriteByte(card,(addr)+1,((data)>>8) & 0xFF);\
        !            90:   DecoderWriteByte(card,(addr)+2,((data)>>16) & 0xFF);}
        !            91: 
        !            92: #define DecoderReadDWord(card,addr) (\
        !            93:            (u32)DecoderReadByte(card,addr)|\
        !            94:           ((u32)DecoderReadByte(card,(addr)+1)<<8)|\
        !            95:           ((u32)DecoderReadByte(card,(addr)+2)<<16)|\
        !            96:           ((u32)DecoderReadByte(card,(addr)+3)<<24))
        !            97: 
        !            98: #define DecoderWriteDWord(card,addr,data) {\
        !            99:   DecoderWriteByte(card,addr,(data) & 0xFF);\
        !           100:   DecoderWriteByte(card,(addr)+1,((data)>>8) & 0xFF);\
        !           101:   DecoderWriteByte(card,(addr)+2,((data)>>16) & 0xFF);\
        !           102:   DecoderWriteByte(card,(addr)+3,((data)>>24) & 0xFF);}
        !           103: 
        !           104: 
        !           105: void l64020Reset(struct cvdv_cards *card);
        !           106: 
        !           107: 
        !           108: #endif                         // _L64021_H_

LinuxTV legacy CVS <linuxtv.org/cvs>