home *** CD-ROM | disk | FTP | other *** search
- /* ================================
- * Misc.
- * ================================ */
-
- #define DMA_REGS 4
- #define INT_RAM_SIZE 256 /* in 32-bit values */
- #define EXT_RAM_SIZE 65536 /* in 32-bits = 262K bytes */
-
- /* ==========================
- * Coco Commands
- * ========================== */
- #define COCO_NOOP 0x00000000L /* no op */
- #define COCO_FILLRAMIL 0x01000000L /* fill LS bits of internal LUT */
- #define COCO_FILLRAMIH 0x02000000L /* fill MS bits of internal LUT */
- #define COCO_FILLRAML 0x03000000L /* fill external LUT */
- #define COCO_FILLRAMO 0x04000000L /* fill internal output LUT */
- #define COCO_SETMODE 0x05000000L /* set mode register */
- #define COCO_SETADDR 0x06000000L /* set address resgister */
- #define COCO_READRAMIL 0x07000000L /* read LS bits of internal inp LUT */
- #define COCO_READRAMIH 0x08000000L /* read MS bits of internal inp LUT */
- #define COCO_READRAML 0x09000000L /* read external LUT */
- #define COCO_READRAMO 0x0A000000L /* read internal output LUT */
- #define COCO_READMODE 0x0B000000L /* read mode register */
- #define COCO_READADDR 0x0C000000L /* read address register */
- #define COCO_TRANSP 0x0D000000L /* pass data transparent */
- #define COCO_CONVERT 0x0F000000L /* convert data */
-
-
- /* =================================
- * IOCTL Commands
- * =================================
- */
-
- #define COCO_COMMAND 0x403 /* issue a Chameleon command */
- #define COCO_RAW_READ_FIFO 0x404 /* slave read a word from Amcc Fifo */
- #define COCO_RAW_WRITE_FIFO 0x405 /* slave write a word to Amcc Fifo */
- #define COCO_RAW_READB_FIFO 0x406 /* slave read a buf from Amcc Fifo */
- #define COCO_RAW_WRITEB_FIFO 0x407 /* slave write a buf to Amcc Fifo */
- #define COCO_FIFO_TEST 0x408 /* Do internal Amcc Fifo access test */
- #define COCO_SET_MODE 0x409 /* set Chameleon mode */
- #define COCO_READ_MODE 0x410 /* Read current Chameleon Mode */
- #define COCO_RAW_READ_DMA 0x411 /* read words from Normal DMA regs */
- #define COCO_RAW_WRITE_DMA 0x412 /* write words to Normal DMA regs */
- #define COCO_READ_ADDR 0x413 /* read Address register */
- #define COCO_SET_ADDR 0x414 /* set Address register */
- #define COCO_DMAREGS_TEST 0x415 /* Test Access to Normal DMA regs */
- #define COCO_INTRAM_TEST 0x416 /* Test Internal Ram LUT accesses */
- #define COCO_EXTRAM_TEST 0x417 /* Test External Ram LUT access */
-
- #define COCO_READ_RAMIL 0x418 /* slave Read Internal RamIL Lut */
- #define COCO_READ_RAMIH 0x419 /* slave Read Internal RamIH Lut */
- #define COCO_READ_RAMO 0x420 /* slave Read Internal RamO Lut */
- #define COCO_READ_RAML 0x421 /* slave Read External RamL Lut */
- #define COCO_FILL_RAMIL 0x422 /* slave Write Internal RamIL Lut */
- #define COCO_FILL_RAMIH 0x423 /* slave Write Internal RamIH Lut */
- #define COCO_FILL_RAMO 0x424 /* slave Write Internal RamO Lut */
- #define COCO_FILL_RAML 0x425 /* slave Write External RamL Lut */
-
- #define COCO_CONVERT_PIXLE 0x426 /* Convert single pixle (word) */
- #define COCO_CONVERT_TEST 0x427 /* test single pixle conversion */
-
- #define COCO_SET_SINGLE_DMA 0x428 /* Set DMA mode to SINGLE */
- #define COCO_SET_PROG_DMA 0x429 /* Set DMA mode to CHAIN (Prog) */
-
- #define COCO_BLOCK_FILL_RAMIL 0x430 /* DMA data to Internal RamIL Lut */
- #define COCO_BLOCK_FILL_RAMIH 0x431 /* DMA data to Internal RamIH Lut */
- #define COCO_BLOCK_FILL_RAML 0x432 /* DMA data to External RamL Lut */
- #define COCO_BLOCK_FILL_RAMO 0x433 /* DMA data to Internal RamO Lut */
- #define COCO_SETCMD_TRANSP 0x434 /* set DMA command to Transparent */
- #define COCO_SETCMD_CONVERT 0x435 /* set DMA command to Convert */
- #define COCO_RESET 0x436 /* Reset Chameleon board */
- #define COCO_RW_BUF 0x437 /* start a Sim. read/write DMA */
- #define COCO_ISPCI 0x438 /* test if PCI Chameleon board */
- #define COCO_MAP_SIZE 0x439 /* return bytes available for Map */
- #define COCO_GET_TIME 0x440 /* return timing measurements */
- #define COCO_MKHWGR 0x441 /* cmd issued by ioconig for hwgraph */
-
- /*
- * struct used by
- * COCO_READ_RAMIL
- * COCO_READ_RAMIH
- * COCO_READ_RAMO
- * COCO_READ_RAML
- * COCO_FILL_RAMIL
- * COCO_FILL_RAMIH
- * COCO_FILL_RAMO
- * COCO_FILL_RAML
- * COCO_RAW_READB_FIFO
- * COCO_RAW_WRITEB_FIFO
- * COCO_BLOCK_FILL_RAMIL
- * COCO_BLOCK_FILL_RAMIH
- * COCO_BLOCK_FILL_RAML
- * COCO_BLOCK_FILL_RAMO
- *
- */
- typedef struct {
- int buf_size; /* buf size (in 32-bit words) */
- unsigned int *buf; /* buffer address */
- } coco_buf_t;
-
-
- /*
- * struct used by COCO_SET_MODE
- */
- typedef struct {
- int mode;
- int swap;
- int slice;
- int flag;
- } coco_mode_t;
-
-
- /*
- * struct used for COCO_COMMAND
- */
- typedef struct {
- unsigned int cmd; /* command to give to Chameleon */
- unsigned int datav; /* data associated with command */
- } coco_cmd_t;
-
-
- /*
- * struct used for COCO_CONVERT_TEST
- */
- typedef struct {
- unsigned int in; /* value to convert */
- unsigned int out; /* expected result */
- int result; /* conversion result (0 = success) */
- } coco_convert_t;
-
-
- /*
- * struct used for COCO_RW_BUF
- */
- typedef struct {
- int buf_size; /* buffer size in int32 */
- int adjust_chain; /* 1 = adjust read/write chain entries */
- unsigned int *r_buf; /* read buffer */
- unsigned int *w_buf; /* write buffer */
- } coco_rw_t;
-
-
- /*
- * struct used for COCO_GET_TIME
- * After each DMA, the start and end time can be obtained
- */
- typedef struct {
- int coco_sec; /* seconds */
- int coco_msec; /* miliseconds */
- int coco_usec; /* microseconds */
- int coco_nsec; /* nanoseconds */
- } coco_timeval_t;
-
- typedef struct {
- coco_timeval_t start_time; /* time call received */
- coco_timeval_t end_time; /* time driver returned to user */
- coco_timeval_t diff_time; /* the difference */
- } coco_time_t;
-
-