2007-11-24 10:55:21 -07:00
|
|
|
/* This file has to be built with -mcpu=ev56 */
|
2006-11-26 11:13:41 -07:00
|
|
|
#ifdef HAVE_XORG_CONFIG_H
|
|
|
|
#include <xorg-config.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "xf86.h"
|
2010-07-27 13:02:24 -06:00
|
|
|
#include "compiler.h"
|
2006-11-26 11:13:41 -07:00
|
|
|
|
|
|
|
int readDense8(pointer Base, register unsigned long Offset);
|
|
|
|
int readDense16(pointer Base, register unsigned long Offset);
|
|
|
|
int readDense32(pointer Base, register unsigned long Offset);
|
|
|
|
void
|
2012-06-10 07:21:05 -06:00
|
|
|
writeDenseNB8(int Value, pointer Base, register unsigned long Offset);
|
2006-11-26 11:13:41 -07:00
|
|
|
void
|
2012-06-10 07:21:05 -06:00
|
|
|
writeDenseNB16(int Value, pointer Base, register unsigned long Offset);
|
2006-11-26 11:13:41 -07:00
|
|
|
void
|
2012-06-10 07:21:05 -06:00
|
|
|
writeDenseNB32(int Value, pointer Base, register unsigned long Offset);
|
2006-11-26 11:13:41 -07:00
|
|
|
void
|
2012-06-10 07:21:05 -06:00
|
|
|
writeDense8(int Value, pointer Base, register unsigned long Offset);
|
2006-11-26 11:13:41 -07:00
|
|
|
void
|
2012-06-10 07:21:05 -06:00
|
|
|
writeDense16(int Value, pointer Base, register unsigned long Offset);
|
2006-11-26 11:13:41 -07:00
|
|
|
void
|
2012-06-10 07:21:05 -06:00
|
|
|
writeDense32(int Value, pointer Base, register unsigned long Offset);
|
2006-11-26 11:13:41 -07:00
|
|
|
|
|
|
|
int
|
|
|
|
readDense8(pointer Base, register unsigned long Offset)
|
|
|
|
{
|
|
|
|
mem_barrier();
|
2012-06-10 07:21:05 -06:00
|
|
|
return *(volatile CARD8 *) ((unsigned long) Base + (Offset));
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
readDense16(pointer Base, register unsigned long Offset)
|
|
|
|
{
|
|
|
|
mem_barrier();
|
2012-06-10 07:21:05 -06:00
|
|
|
return *(volatile CARD16 *) ((unsigned long) Base + (Offset));
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
readDense32(pointer Base, register unsigned long Offset)
|
|
|
|
{
|
|
|
|
mem_barrier();
|
2012-06-10 07:21:05 -06:00
|
|
|
return *(volatile CARD32 *) ((unsigned long) Base + (Offset));
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
writeDenseNB8(int Value, pointer Base, register unsigned long Offset)
|
|
|
|
{
|
2012-06-10 07:21:05 -06:00
|
|
|
*(volatile CARD8 *) ((unsigned long) Base + (Offset)) = Value;
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
writeDenseNB16(int Value, pointer Base, register unsigned long Offset)
|
|
|
|
{
|
2012-06-10 07:21:05 -06:00
|
|
|
*(volatile CARD16 *) ((unsigned long) Base + (Offset)) = Value;
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
writeDenseNB32(int Value, pointer Base, register unsigned long Offset)
|
|
|
|
{
|
2012-06-10 07:21:05 -06:00
|
|
|
*(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value;
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
writeDense8(int Value, pointer Base, register unsigned long Offset)
|
|
|
|
{
|
|
|
|
write_mem_barrier();
|
2012-06-10 07:21:05 -06:00
|
|
|
*(volatile CARD8 *) ((unsigned long) Base + (Offset)) = Value;
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
writeDense16(int Value, pointer Base, register unsigned long Offset)
|
|
|
|
{
|
|
|
|
write_mem_barrier();
|
2012-06-10 07:21:05 -06:00
|
|
|
*(volatile CARD16 *) ((unsigned long) Base + (Offset)) = Value;
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
writeDense32(int Value, pointer Base, register unsigned long Offset)
|
|
|
|
{
|
|
|
|
write_mem_barrier();
|
2012-06-10 07:21:05 -06:00
|
|
|
*(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value;
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|