/* write to this reg (number,len) triggers TPC execution */ #define R592_TPC_EXEC 0x00 #define R592_TPC_EXEC_LEN_SHIFT 16 /* Bits 16..25 are TPC len */ #define R592_TPC_EXEC_BIG_FIFO (1 << 26) /* If bit 26 is set, large fifo is used (reg 48) */ #define R592_TPC_EXEC_TPC_SHIFT 28 /* Bits 28..31 are the TPC number */
/* Window for small TPC fifo (big endian)*/ /* reads and writes always are done in 8 byte chunks */ /* Not used in driver, because large fifo does better job */ #define R592_SFIFO 0x08
/* Status register (ms int, small fifo, IO)*/ #define R592_STATUS 0x10 /* Parallel INT bits */ #define R592_STATUS_P_CMDNACK (1 << 16) /* INT reg: NACK (parallel mode) */ #define R592_STATUS_P_BREQ (1 << 17) /* INT reg: card ready (parallel mode)*/ #define R592_STATUS_P_INTERR (1 << 18) /* INT reg: int error (parallel mode)*/ #define R592_STATUS_P_CED (1 << 19) /* INT reg: command done (parallel mode) */
/* Fifo status */ #define R592_STATUS_SFIFO_FULL (1 << 20) /* Small Fifo almost full (last chunk is written) */ #define R592_STATUS_SFIFO_EMPTY (1 << 21) /* Small Fifo empty */
/* Card state */ #define R592_STATUS_RDY (1 << 28) /* RDY signal received */ #define R592_STATUS_CED (1 << 29) /* INT: Command done (serial mode)*/ #define R592_STATUS_SFIFO_INPUT (1 << 30) /* Small fifo received data*/
#define R592_SFIFO_SIZE 32 /* total size of small fifo is 32 bytes */ #define R592_SFIFO_PACKET 8 /* packet size of small fifo */
/* IO control */ #define R592_IO 0x18 #define R592_IO_16 (1 << 16) /* Set by default, can be cleared */ #define R592_IO_18 (1 << 18) /* Set by default, can be cleared */ #define R592_IO_SERIAL1 (1 << 20) /* Set by default, can be cleared, (cleared on parallel) */ #define R592_IO_22 (1 << 22) /* Set by default, can be cleared */ #define R592_IO_DIRECTION (1 << 24) /* TPC direction (1 write 0 read) */ #define R592_IO_26 (1 << 26) /* Set by default, can be cleared */ #define R592_IO_SERIAL2 (1 << 30) /* Set by default, can be cleared (cleared on parallel), serial doesn't work if unset */ #define R592_IO_RESET (1 << 31) /* Reset, sets defaults*/
/* Turns hardware on/off */ #define R592_POWER 0x20 /* bits 0-7 writeable */ #define R592_POWER_0 (1 << 0) /* set on start, cleared on stop - must be set*/ #define R592_POWER_1 (1 << 1) /* set on start, cleared on stop - must be set*/ #define R592_POWER_3 (1 << 3) /* must be clear */ #define R592_POWER_20 (1 << 5) /* set before switch to parallel */
#define R592_REG_MSC_FIFO_USER_ORN (1 << 12) /* set if software reads empty fifo (if R592_REG_MSC_FIFO_EMPTY is set) */ #define R592_REG_MSC_FIFO_MISMATH (1 << 13) /* set if amount of data in fifo doesn't match amount in TPC */ #define R592_REG_MSC_FIFO_DMA_ERR (1 << 14) /* IO failure */ #define R592_REG_MSC_LED (1 << 15) /* clear to turn led off (only status)*/
/* Maybe just an delay */ /* Bits 17..19 are just number */ /* bit 16 is set, then bit 20 is waited */ /* time to wait is about 50 spins * 2 ^ (bits 17..19) */ /* seems to be possible just to ignore */ /* Probably debug register */ #define R592_REG38 0x38 #define R592_REG38_CHANGE (1 << 16) /* Start bit */ #define R592_REG38_DONE (1 << 20) /* HW set this after the delay */ #define R592_REG38_SHIFT 17
/* Debug register, written (0xABCDEF00) when error happens - not used*/ #define R592_REG_3C 0x3C
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.