linux/drivers/video/fbdev/riva/nvreg.h

/* $XConsortium: nvreg.h /main/2 1996/10/28 05:13:41 kaleb $ */
/*
 * Copyright 1996-1997  David J. McKay
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * DAVID J. MCKAY BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

/* $XFree86: xc/programs/Xserver/hw/xfree86/vga256/drivers/nv/nvreg.h,v 3.2.2.1 1998/01/18 10:35:36 hohndel Exp $ */

#ifndef __NVREG_H_
#define __NVREG_H_

/* Little macro to construct bitmask for contiguous ranges of bits */
#define BITMASK(t,b)
#define MASKEXPAND(mask)

/* Macro to set specific bitfields (mask has to be a macro x:y) ! */
#define SetBF(mask,value)
#define GetBF(var,mask)

#define MaskAndSetBF(var,mask,value)

#define DEVICE_BASE(device)
#define DEVICE_SIZE(device)

/* This is where we will have to have conditional compilation */
#define DEVICE_ACCESS(device,reg)

#define DEVICE_WRITE(device,reg,value)
#define DEVICE_READ(device,reg)
#define DEVICE_PRINT(device,reg)
#define DEVICE_DEF(device,mask,value)
#define DEVICE_VALUE(device,mask,value)
#define DEVICE_MASK(device,mask)

#define PDAC_Write(reg,value)
#define PDAC_Read(reg)
#define PDAC_Print(reg)
#define PDAC_Def(mask,value)
#define PDAC_Val(mask,value)
#define PDAC_Mask(mask)

#define PFB_Write(reg,value)
#define PFB_Read(reg)
#define PFB_Print(reg)
#define PFB_Def(mask,value)
#define PFB_Val(mask,value)
#define PFB_Mask(mask)

#define PRM_Write(reg,value)
#define PRM_Read(reg)
#define PRM_Print(reg)
#define PRM_Def(mask,value)
#define PRM_Val(mask,value)
#define PRM_Mask(mask)

#define PGRAPH_Write(reg,value)
#define PGRAPH_Read(reg)
#define PGRAPH_Print(reg)
#define PGRAPH_Def(mask,value)
#define PGRAPH_Val(mask,value)
#define PGRAPH_Mask(mask)

#define PDMA_Write(reg,value)
#define PDMA_Read(reg)
#define PDMA_Print(reg)
#define PDMA_Def(mask,value)
#define PDMA_Val(mask,value)
#define PDMA_Mask(mask)

#define PTIMER_Write(reg,value)
#define PTIMER_Read(reg)
#define PTIMER_Print(reg)
#define PTIMER_Def(mask,value)
#define PTIMER_Val(mask,value)
#define PTIMER_Mask(mask)

#define PEXTDEV_Write(reg,value)
#define PEXTDEV_Read(reg)
#define PEXTDEV_Print(reg)
#define PEXTDEV_Def(mask,value)
#define PEXTDEV_Val(mask,value)
#define PEXTDEV_Mask(mask)

#define PFIFO_Write(reg,value)
#define PFIFO_Read(reg)
#define PFIFO_Print(reg)
#define PFIFO_Def(mask,value)
#define PFIFO_Val(mask,value)
#define PFIFO_Mask(mask)

#define PRAM_Write(reg,value)
#define PRAM_Read(reg)
#define PRAM_Print(reg)
#define PRAM_Def(mask,value)
#define PRAM_Val(mask,value)
#define PRAM_Mask(mask)

#define PRAMFC_Write(reg,value)
#define PRAMFC_Read(reg)
#define PRAMFC_Print(reg)
#define PRAMFC_Def(mask,value)
#define PRAMFC_Val(mask,value)
#define PRAMFC_Mask(mask)

#define PMC_Write(reg,value)
#define PMC_Read(reg)
#define PMC_Print(reg)
#define PMC_Def(mask,value)
#define PMC_Val(mask,value)
#define PMC_Mask(mask)

#define PMC_Write(reg,value)
#define PMC_Read(reg)
#define PMC_Print(reg)
#define PMC_Def(mask,value)
#define PMC_Val(mask,value)
#define PMC_Mask(mask)


#define PBUS_Write(reg,value)
#define PBUS_Read(reg)
#define PBUS_Print(reg)
#define PBUS_Def(mask,value)
#define PBUS_Val(mask,value)
#define PBUS_Mask(mask)


#define PRAMDAC_Write(reg,value)
#define PRAMDAC_Read(reg)
#define PRAMDAC_Print(reg)
#define PRAMDAC_Def(mask,value)
#define PRAMDAC_Val(mask,value)
#define PRAMDAC_Mask(mask)


#define PDAC_ReadExt(reg)

#define PDAC_WriteExt(reg,value)

#define CRTC_Write(index,value)
#define CRTC_Read(index)

#define PCRTC_Write(index,value)
#define PCRTC_Read(index)

#define PCRTC_Def(mask,value)
#define PCRTC_Val(mask,value)
#define PCRTC_Mask(mask)

#define SR_Write(index,value)
#define SR_Read(index)

extern volatile unsigned  *nvCONTROL;

NVChipType;

NVChipType GetChipType(void);

#endif