|
@@ -207,3 +207,155 @@ typedef struct smc_centronics {
|
|
u_char scent_smask;
|
|
u_char scent_smask;
|
|
ushort scent_mrblr;
|
|
ushort scent_mrblr;
|
|
uint scent_rstate;
|
|
uint scent_rstate;
|
|
|
|
+ uint scent_r_ptr;
|
|
|
|
+ ushort scent_rbptr;
|
|
|
|
+ ushort scent_r_cnt;
|
|
|
|
+ uint scent_rtemp;
|
|
|
|
+ uint scent_tstate;
|
|
|
|
+ uint scent_t_ptr;
|
|
|
|
+ ushort scent_tbptr;
|
|
|
|
+ ushort scent_t_cnt;
|
|
|
|
+ uint scent_ttemp;
|
|
|
|
+ ushort scent_max_sl;
|
|
|
|
+ ushort scent_sl_cnt;
|
|
|
|
+ ushort scent_character1;
|
|
|
|
+ ushort scent_character2;
|
|
|
|
+ ushort scent_character3;
|
|
|
|
+ ushort scent_character4;
|
|
|
|
+ ushort scent_character5;
|
|
|
|
+ ushort scent_character6;
|
|
|
|
+ ushort scent_character7;
|
|
|
|
+ ushort scent_character8;
|
|
|
|
+ ushort scent_rccm;
|
|
|
|
+ ushort scent_rccr;
|
|
|
|
+} smc_cent_t;
|
|
|
|
+
|
|
|
|
+/* Centronics Status Mask Register.
|
|
|
|
+*/
|
|
|
|
+#define SMC_CENT_F ((u_char)0x08)
|
|
|
|
+#define SMC_CENT_PE ((u_char)0x04)
|
|
|
|
+#define SMC_CENT_S ((u_char)0x02)
|
|
|
|
+
|
|
|
|
+/* SMC Event and Mask register.
|
|
|
|
+*/
|
|
|
|
+#define SMCM_BRKE ((unsigned char)0x40) /* When in UART Mode */
|
|
|
|
+#define SMCM_BRK ((unsigned char)0x10) /* When in UART Mode */
|
|
|
|
+#define SMCM_TXE ((unsigned char)0x10) /* When in Transparent Mode */
|
|
|
|
+#define SMCM_BSY ((unsigned char)0x04)
|
|
|
|
+#define SMCM_TX ((unsigned char)0x02)
|
|
|
|
+#define SMCM_RX ((unsigned char)0x01)
|
|
|
|
+
|
|
|
|
+/* Baud rate generators.
|
|
|
|
+*/
|
|
|
|
+#define CPM_BRG_RST ((uint)0x00020000)
|
|
|
|
+#define CPM_BRG_EN ((uint)0x00010000)
|
|
|
|
+#define CPM_BRG_EXTC_INT ((uint)0x00000000)
|
|
|
|
+#define CPM_BRG_EXTC_CLK2 ((uint)0x00004000)
|
|
|
|
+#define CPM_BRG_EXTC_CLK6 ((uint)0x00008000)
|
|
|
|
+#define CPM_BRG_ATB ((uint)0x00002000)
|
|
|
|
+#define CPM_BRG_CD_MASK ((uint)0x00001ffe)
|
|
|
|
+#define CPM_BRG_DIV16 ((uint)0x00000001)
|
|
|
|
+
|
|
|
|
+/* SCCs.
|
|
|
|
+*/
|
|
|
|
+#define SCC_GSMRH_IRP ((uint)0x00040000)
|
|
|
|
+#define SCC_GSMRH_GDE ((uint)0x00010000)
|
|
|
|
+#define SCC_GSMRH_TCRC_CCITT ((uint)0x00008000)
|
|
|
|
+#define SCC_GSMRH_TCRC_BISYNC ((uint)0x00004000)
|
|
|
|
+#define SCC_GSMRH_TCRC_HDLC ((uint)0x00000000)
|
|
|
|
+#define SCC_GSMRH_REVD ((uint)0x00002000)
|
|
|
|
+#define SCC_GSMRH_TRX ((uint)0x00001000)
|
|
|
|
+#define SCC_GSMRH_TTX ((uint)0x00000800)
|
|
|
|
+#define SCC_GSMRH_CDP ((uint)0x00000400)
|
|
|
|
+#define SCC_GSMRH_CTSP ((uint)0x00000200)
|
|
|
|
+#define SCC_GSMRH_CDS ((uint)0x00000100)
|
|
|
|
+#define SCC_GSMRH_CTSS ((uint)0x00000080)
|
|
|
|
+#define SCC_GSMRH_TFL ((uint)0x00000040)
|
|
|
|
+#define SCC_GSMRH_RFW ((uint)0x00000020)
|
|
|
|
+#define SCC_GSMRH_TXSY ((uint)0x00000010)
|
|
|
|
+#define SCC_GSMRH_SYNL16 ((uint)0x0000000c)
|
|
|
|
+#define SCC_GSMRH_SYNL8 ((uint)0x00000008)
|
|
|
|
+#define SCC_GSMRH_SYNL4 ((uint)0x00000004)
|
|
|
|
+#define SCC_GSMRH_RTSM ((uint)0x00000002)
|
|
|
|
+#define SCC_GSMRH_RSYN ((uint)0x00000001)
|
|
|
|
+
|
|
|
|
+#define SCC_GSMRL_SIR ((uint)0x80000000) /* SCC2 only */
|
|
|
|
+#define SCC_GSMRL_EDGE_NONE ((uint)0x60000000)
|
|
|
|
+#define SCC_GSMRL_EDGE_NEG ((uint)0x40000000)
|
|
|
|
+#define SCC_GSMRL_EDGE_POS ((uint)0x20000000)
|
|
|
|
+#define SCC_GSMRL_EDGE_BOTH ((uint)0x00000000)
|
|
|
|
+#define SCC_GSMRL_TCI ((uint)0x10000000)
|
|
|
|
+#define SCC_GSMRL_TSNC_3 ((uint)0x0c000000)
|
|
|
|
+#define SCC_GSMRL_TSNC_4 ((uint)0x08000000)
|
|
|
|
+#define SCC_GSMRL_TSNC_14 ((uint)0x04000000)
|
|
|
|
+#define SCC_GSMRL_TSNC_INF ((uint)0x00000000)
|
|
|
|
+#define SCC_GSMRL_RINV ((uint)0x02000000)
|
|
|
|
+#define SCC_GSMRL_TINV ((uint)0x01000000)
|
|
|
|
+#define SCC_GSMRL_TPL_128 ((uint)0x00c00000)
|
|
|
|
+#define SCC_GSMRL_TPL_64 ((uint)0x00a00000)
|
|
|
|
+#define SCC_GSMRL_TPL_48 ((uint)0x00800000)
|
|
|
|
+#define SCC_GSMRL_TPL_32 ((uint)0x00600000)
|
|
|
|
+#define SCC_GSMRL_TPL_16 ((uint)0x00400000)
|
|
|
|
+#define SCC_GSMRL_TPL_8 ((uint)0x00200000)
|
|
|
|
+#define SCC_GSMRL_TPL_NONE ((uint)0x00000000)
|
|
|
|
+#define SCC_GSMRL_TPP_ALL1 ((uint)0x00180000)
|
|
|
|
+#define SCC_GSMRL_TPP_01 ((uint)0x00100000)
|
|
|
|
+#define SCC_GSMRL_TPP_10 ((uint)0x00080000)
|
|
|
|
+#define SCC_GSMRL_TPP_ZEROS ((uint)0x00000000)
|
|
|
|
+#define SCC_GSMRL_TEND ((uint)0x00040000)
|
|
|
|
+#define SCC_GSMRL_TDCR_32 ((uint)0x00030000)
|
|
|
|
+#define SCC_GSMRL_TDCR_16 ((uint)0x00020000)
|
|
|
|
+#define SCC_GSMRL_TDCR_8 ((uint)0x00010000)
|
|
|
|
+#define SCC_GSMRL_TDCR_1 ((uint)0x00000000)
|
|
|
|
+#define SCC_GSMRL_RDCR_32 ((uint)0x0000c000)
|
|
|
|
+#define SCC_GSMRL_RDCR_16 ((uint)0x00008000)
|
|
|
|
+#define SCC_GSMRL_RDCR_8 ((uint)0x00004000)
|
|
|
|
+#define SCC_GSMRL_RDCR_1 ((uint)0x00000000)
|
|
|
|
+#define SCC_GSMRL_RENC_DFMAN ((uint)0x00003000)
|
|
|
|
+#define SCC_GSMRL_RENC_MANCH ((uint)0x00002000)
|
|
|
|
+#define SCC_GSMRL_RENC_FM0 ((uint)0x00001000)
|
|
|
|
+#define SCC_GSMRL_RENC_NRZI ((uint)0x00000800)
|
|
|
|
+#define SCC_GSMRL_RENC_NRZ ((uint)0x00000000)
|
|
|
|
+#define SCC_GSMRL_TENC_DFMAN ((uint)0x00000600)
|
|
|
|
+#define SCC_GSMRL_TENC_MANCH ((uint)0x00000400)
|
|
|
|
+#define SCC_GSMRL_TENC_FM0 ((uint)0x00000200)
|
|
|
|
+#define SCC_GSMRL_TENC_NRZI ((uint)0x00000100)
|
|
|
|
+#define SCC_GSMRL_TENC_NRZ ((uint)0x00000000)
|
|
|
|
+#define SCC_GSMRL_DIAG_LE ((uint)0x000000c0) /* Loop and echo */
|
|
|
|
+#define SCC_GSMRL_DIAG_ECHO ((uint)0x00000080)
|
|
|
|
+#define SCC_GSMRL_DIAG_LOOP ((uint)0x00000040)
|
|
|
|
+#define SCC_GSMRL_DIAG_NORM ((uint)0x00000000)
|
|
|
|
+#define SCC_GSMRL_ENR ((uint)0x00000020)
|
|
|
|
+#define SCC_GSMRL_ENT ((uint)0x00000010)
|
|
|
|
+#define SCC_GSMRL_MODE_ENET ((uint)0x0000000c)
|
|
|
|
+#define SCC_GSMRL_MODE_DDCMP ((uint)0x00000009)
|
|
|
|
+#define SCC_GSMRL_MODE_BISYNC ((uint)0x00000008)
|
|
|
|
+#define SCC_GSMRL_MODE_V14 ((uint)0x00000007)
|
|
|
|
+#define SCC_GSMRL_MODE_AHDLC ((uint)0x00000006)
|
|
|
|
+#define SCC_GSMRL_MODE_PROFIBUS ((uint)0x00000005)
|
|
|
|
+#define SCC_GSMRL_MODE_UART ((uint)0x00000004)
|
|
|
|
+#define SCC_GSMRL_MODE_SS7 ((uint)0x00000003)
|
|
|
|
+#define SCC_GSMRL_MODE_ATALK ((uint)0x00000002)
|
|
|
|
+#define SCC_GSMRL_MODE_HDLC ((uint)0x00000000)
|
|
|
|
+
|
|
|
|
+#define SCC_TODR_TOD ((ushort)0x8000)
|
|
|
|
+
|
|
|
|
+/* SCC Event and Mask register.
|
|
|
|
+*/
|
|
|
|
+#define SCCM_TXE ((unsigned char)0x10)
|
|
|
|
+#define SCCM_BSY ((unsigned char)0x04)
|
|
|
|
+#define SCCM_TX ((unsigned char)0x02)
|
|
|
|
+#define SCCM_RX ((unsigned char)0x01)
|
|
|
|
+
|
|
|
|
+typedef struct scc_param {
|
|
|
|
+ ushort scc_rbase; /* Rx Buffer descriptor base address */
|
|
|
|
+ ushort scc_tbase; /* Tx Buffer descriptor base address */
|
|
|
|
+ u_char scc_rfcr; /* Rx function code */
|
|
|
|
+ u_char scc_tfcr; /* Tx function code */
|
|
|
|
+ ushort scc_mrblr; /* Max receive buffer length */
|
|
|
|
+ uint scc_rstate; /* Internal */
|
|
|
|
+ uint scc_idp; /* Internal */
|
|
|
|
+ ushort scc_rbptr; /* Internal */
|
|
|
|
+ ushort scc_ibc; /* Internal */
|
|
|
|
+ uint scc_rxtmp; /* Internal */
|
|
|
|
+ uint scc_tstate; /* Internal */
|