Go to the documentation of this file.
43 #define SYM_VERSION "2.2.3"
44 #define SYM_DRIVER_NAME "sym-" SYM_VERSION
58 #define FE_LED0 (1<<0)
59 #define FE_WIDE (1<<1)
60 #define FE_ULTRA (1<<2)
61 #define FE_ULTRA2 (1<<3)
62 #define FE_DBLR (1<<4)
63 #define FE_QUAD (1<<5)
65 #define FE_CLSE (1<<7)
66 #define FE_WRIE (1<<8)
67 #define FE_ERMP (1<<9)
68 #define FE_BOF (1<<10)
69 #define FE_DFS (1<<11)
70 #define FE_PFEN (1<<12)
71 #define FE_LDSTR (1<<13)
72 #define FE_RAM (1<<14)
73 #define FE_VARCLK (1<<15)
74 #define FE_RAM8K (1<<16)
75 #define FE_64BIT (1<<17)
76 #define FE_IO256 (1<<18)
77 #define FE_NOPM (1<<19)
78 #define FE_LEDC (1<<20)
79 #define FE_ULTRA3 (1<<21)
80 #define FE_66MHZ (1<<22)
81 #define FE_CRC (1<<23)
82 #define FE_DIFF (1<<24)
83 #define FE_DFBC (1<<25)
84 #define FE_LCKFRQ (1<<26)
85 #define FE_C10 (1<<27)
86 #define FE_U3EN (1<<28)
87 #define FE_DAC (1<<29)
88 #define FE_ISTAT1 (1<<30)
90 #define FE_CACHE_SET (FE_ERL|FE_CLSE|FE_WRIE|FE_ERMP)
91 #define FE_CACHE0_SET (FE_CACHE_SET & ~FE_ERL)
298 #define SMODE_HVD 0x40
299 #define SMODE_SE 0x80
300 #define SMODE_LVD 0xc0
341 #define XCLKH_DT 0x08
342 #define XCLKH_ST 0x04
343 #define XCLKS_DT 0x02
344 #define XCLKS_ST 0x01
384 #define REGJ(p,r) (offsetof(struct sym_reg, p ## r))
385 #define REG(r) REGJ (nc_, r)
394 #define SCR_DATA_OUT 0x00000000
395 #define SCR_DATA_IN 0x01000000
396 #define SCR_COMMAND 0x02000000
397 #define SCR_STATUS 0x03000000
398 #define SCR_DT_DATA_OUT 0x04000000
399 #define SCR_DT_DATA_IN 0x05000000
400 #define SCR_MSG_OUT 0x06000000
401 #define SCR_MSG_IN 0x07000000
403 #define SCR_ILG_OUT 0x04000000
404 #define SCR_ILG_IN 0x05000000
424 #define OPC_MOVE 0x08000000
426 #define SCR_MOVE_ABS(l) ((0x00000000 | OPC_MOVE) | (l))
428 #define SCR_MOVE_TBL (0x10000000 | OPC_MOVE)
430 #define SCR_CHMOV_ABS(l) ((0x00000000) | (l))
432 #define SCR_CHMOV_TBL (0x10000000)
434 #ifdef SYM_CONF_TARGET_ROLE_SUPPORT
437 #define OPC_TCHMOVE 0x08000000
439 #define SCR_TCHMOVE_ABS(l) ((0x20000000 | OPC_TCHMOVE) | (l))
440 #define SCR_TCHMOVE_TBL (0x30000000 | OPC_TCHMOVE)
442 #define SCR_TMOV_ABS(l) ((0x20000000) | (l))
443 #define SCR_TMOV_TBL (0x30000000)
466 #define SCR_SEL_ABS 0x40000000
467 #define SCR_SEL_ABS_ATN 0x41000000
468 #define SCR_SEL_TBL 0x42000000
469 #define SCR_SEL_TBL_ATN 0x43000000
471 #ifdef SYM_CONF_TARGET_ROLE_SUPPORT
472 #define SCR_RESEL_ABS 0x40000000
473 #define SCR_RESEL_ABS_ATN 0x41000000
474 #define SCR_RESEL_TBL 0x42000000
475 #define SCR_RESEL_TBL_ATN 0x43000000
485 #define SCR_JMP_REL 0x04000000
486 #define SCR_ID(id) (((u32)(id)) << 16)
503 #define SCR_WAIT_DISC 0x48000000
504 #define SCR_WAIT_RESEL 0x50000000
506 #ifdef SYM_CONF_TARGET_ROLE_SUPPORT
507 #define SCR_DISCONNECT 0x48000000
523 #define SCR_SET(f) (0x58000000 | (f))
524 #define SCR_CLR(f) (0x60000000 | (f))
526 #define SCR_CARRY 0x00000400
527 #define SCR_TRG 0x00000200
528 #define SCR_ACK 0x00000040
529 #define SCR_ATN 0x00000008
551 #define SCR_NO_FLUSH 0x01000000
553 #define SCR_COPY(n) (0xc0000000 | SCR_NO_FLUSH | (n))
554 #define SCR_COPY_F(n) (0xc0000000 | (n))
582 #define SCR_REG_OFS(ofs) ((((ofs) & 0x7f) << 16ul) + ((ofs) & 0x80))
584 #define SCR_SFBR_REG(reg,op,data) \
585 (0x68000000 | (SCR_REG_OFS(REG(reg))) | (op) | (((data)&0xff)<<8ul))
587 #define SCR_REG_SFBR(reg,op,data) \
588 (0x70000000 | (SCR_REG_OFS(REG(reg))) | (op) | (((data)&0xff)<<8ul))
590 #define SCR_REG_REG(reg,op,data) \
591 (0x78000000 | (SCR_REG_OFS(REG(reg))) | (op) | (((data)&0xff)<<8ul))
594 #define SCR_LOAD 0x00000000
595 #define SCR_SHL 0x01000000
596 #define SCR_OR 0x02000000
597 #define SCR_XOR 0x03000000
598 #define SCR_AND 0x04000000
599 #define SCR_SHR 0x05000000
600 #define SCR_ADD 0x06000000
601 #define SCR_ADDC 0x07000000
603 #define SCR_SFBR_DATA (0x00800000>>8ul)
622 #define SCR_FROM_REG(reg) \
623 SCR_REG_SFBR(reg,SCR_OR,0)
625 #define SCR_TO_REG(reg) \
626 SCR_SFBR_REG(reg,SCR_OR,0)
628 #define SCR_LOAD_REG(reg,data) \
629 SCR_REG_REG(reg,SCR_LOAD,data)
631 #define SCR_LOAD_SFBR(data) \
632 (SCR_REG_SFBR (gpreg, SCR_LOAD, data))
652 #define SCR_REG_OFS2(ofs) (((ofs) & 0xff) << 16ul)
653 #define SCR_NO_FLUSH2 0x02000000
654 #define SCR_DSA_REL2 0x10000000
656 #define SCR_LOAD_R(reg, how, n) \
657 (0xe1000000 | how | (SCR_REG_OFS2(REG(reg))) | (n))
659 #define SCR_STORE_R(reg, how, n) \
660 (0xe0000000 | how | (SCR_REG_OFS2(REG(reg))) | (n))
662 #define SCR_LOAD_ABS(reg, n) SCR_LOAD_R(reg, SCR_NO_FLUSH2, n)
663 #define SCR_LOAD_REL(reg, n) SCR_LOAD_R(reg, SCR_NO_FLUSH2|SCR_DSA_REL2, n)
664 #define SCR_LOAD_ABS_F(reg, n) SCR_LOAD_R(reg, 0, n)
665 #define SCR_LOAD_REL_F(reg, n) SCR_LOAD_R(reg, SCR_DSA_REL2, n)
667 #define SCR_STORE_ABS(reg, n) SCR_STORE_R(reg, SCR_NO_FLUSH2, n)
668 #define SCR_STORE_REL(reg, n) SCR_STORE_R(reg, SCR_NO_FLUSH2|SCR_DSA_REL2,n)
669 #define SCR_STORE_ABS_F(reg, n) SCR_STORE_R(reg, 0, n)
670 #define SCR_STORE_REL_F(reg, n) SCR_STORE_R(reg, SCR_DSA_REL2, n)
709 #define SCR_NO_OP 0x80000000
710 #define SCR_JUMP 0x80080000
711 #define SCR_JUMP64 0x80480000
712 #define SCR_JUMPR 0x80880000
713 #define SCR_CALL 0x88080000
714 #define SCR_CALLR 0x88880000
715 #define SCR_RETURN 0x90080000
716 #define SCR_INT 0x98080000
717 #define SCR_INT_FLY 0x98180000
719 #define IFFALSE(arg) (0x00080000 | (arg))
720 #define IFTRUE(arg) (0x00000000 | (arg))
722 #define WHEN(phase) (0x00030000 | (phase))
723 #define IF(phase) (0x00020000 | (phase))
725 #define DATA(D) (0x00040000 | ((D) & 0xff))
726 #define MASK(D,M) (0x00040000 | (((M ^ 0xff) & 0xff) << 8ul)|((D) & 0xff))
728 #define CARRYSET (0x00200000)
741 #define M_COMPLETE COMMAND_COMPLETE
742 #define M_EXTENDED EXTENDED_MESSAGE
743 #define M_SAVE_DP SAVE_POINTERS
744 #define M_RESTORE_DP RESTORE_POINTERS
745 #define M_DISCONNECT DISCONNECT
746 #define M_ID_ERROR INITIATOR_ERROR
747 #define M_ABORT ABORT_TASK_SET
748 #define M_REJECT MESSAGE_REJECT
750 #define M_PARITY MSG_PARITY_ERROR
751 #define M_LCOMPLETE LINKED_CMD_COMPLETE
752 #define M_FCOMPLETE LINKED_FLG_CMD_COMPLETE
753 #define M_RESET TARGET_RESET
754 #define M_ABORT_TAG ABORT_TASK
755 #define M_CLEAR_QUEUE CLEAR_TASK_SET
756 #define M_INIT_REC INITIATE_RECOVERY
757 #define M_REL_REC RELEASE_RECOVERY
758 #define M_TERMINATE (0x11)
759 #define M_SIMPLE_TAG SIMPLE_QUEUE_TAG
760 #define M_HEAD_TAG HEAD_OF_QUEUE_TAG
761 #define M_ORDERED_TAG ORDERED_QUEUE_TAG
762 #define M_IGN_RESIDUE IGNORE_WIDE_RESIDUE
764 #define M_X_MODIFY_DP EXTENDED_MODIFY_DATA_POINTER
765 #define M_X_SYNC_REQ EXTENDED_SDTR
766 #define M_X_WIDE_REQ EXTENDED_WDTR
767 #define M_X_PPR_REQ EXTENDED_PPR
772 #define PPR_OPT_IU (0x01)
773 #define PPR_OPT_DT (0x02)
774 #define PPR_OPT_QAS (0x04)
775 #define PPR_OPT_MASK (0x07)
781 #define S_GOOD SAM_STAT_GOOD
782 #define S_CHECK_COND SAM_STAT_CHECK_CONDITION
783 #define S_COND_MET SAM_STAT_CONDITION_MET
784 #define S_BUSY SAM_STAT_BUSY
785 #define S_INT SAM_STAT_INTERMEDIATE
786 #define S_INT_COND_MET SAM_STAT_INTERMEDIATE_CONDITION_MET
787 #define S_CONFLICT SAM_STAT_RESERVATION_CONFLICT
788 #define S_TERMINATED SAM_STAT_COMMAND_TERMINATED
789 #define S_QUEUE_FULL SAM_STAT_TASK_SET_FULL
790 #define S_ILLEGAL (0xff)