00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef SMC_IRCC_H
00031 #define SMC_IRCC_H
00032
00033 #include <asm/spinlock.h>
00034
00035 #include <net/irda/irport.h>
00036
00037
00038 #define DMA_TX_MODE 0x08
00039 #define DMA_RX_MODE 0x04
00040
00041
00042 #define IRCC_MASTER 0x07
00043 #define IRCC_MASTER_POWERDOWN 0x80
00044 #define IRCC_MASTER_RESET 0x40
00045 #define IRCC_MASTER_INT_EN 0x20
00046 #define IRCC_MASTER_ERROR_RESET 0x10
00047
00048
00049
00050
00051 #define IRCC_IIR 0x01
00052 #define IRCC_IIR_ACTIVE_FRAME 0x80
00053 #define IRCC_IIR_EOM 0x40
00054 #define IRCC_IIR_RAW_MODE 0x20
00055 #define IRCC_IIR_FIFO 0x10
00056
00057
00058 #define IRCC_IER 0x02
00059 #define IRCC_IER_ACTIVE_FRAME 0x80
00060 #define IRCC_IER_EOM 0x40
00061 #define IRCC_IER_RAW_MODE 0x20
00062 #define IRCC_IER_FIFO 0x10
00063
00064
00065 #define IRCC_LSR 0x03
00066 #define IRCC_LSR_UNDERRUN 0x80
00067 #define IRCC_LSR_OVERRUN 0x40
00068 #define IRCC_LSR_FRAME_ERROR 0x20
00069 #define IRCC_LSR_SIZE_ERROR 0x10
00070 #define IRCC_LSR_CRC_ERROR 0x80
00071 #define IRCC_LSR_FRAME_ABORT 0x40
00072
00073
00074 #define IRCC_LCR_A 0x04
00075 #define IRCC_LCR_A_FIFO_RESET 0x80
00076 #define IRCC_LCR_A_FAST 0x40
00077 #define IRCC_LCR_A_GP_DATA 0x20
00078 #define IRCC_LCR_A_RAW_TX 0x10
00079 #define IRCC_LCR_A_RAW_RX 0x08
00080 #define IRCC_LCR_A_ABORT 0x04
00081 #define IRCC_LCR_A_DATA_DONE 0x02
00082
00083
00084 #define IRCC_LCR_B 0x05
00085 #define IRCC_LCR_B_SCE_DISABLED 0x00
00086 #define IRCC_LCR_B_SCE_TRANSMIT 0x40
00087 #define IRCC_LCR_B_SCE_RECEIVE 0x80
00088 #define IRCC_LCR_B_SCE_UNDEFINED 0xc0
00089 #define IRCC_LCR_B_SIP_ENABLE 0x20
00090 #define IRCC_LCR_B_BRICK_WALL 0x10
00091
00092
00093 #define IRCC_BSR 0x06
00094 #define IRCC_BSR_NOT_EMPTY 0x80
00095 #define IRCC_BSR_FIFO_FULL 0x40
00096 #define IRCC_BSR_TIMEOUT 0x20
00097
00098
00099
00100 #define IRCC_FIFO_THRESHOLD 0x02
00101
00102 #define IRCC_SCE_CFGA 0x00
00103 #define IRCC_CFGA_AUX_IR 0x80
00104 #define IRCC_CFGA_HALF_DUPLEX 0x04
00105 #define IRCC_CFGA_TX_POLARITY 0x02
00106 #define IRCC_CFGA_RX_POLARITY 0x01
00107
00108 #define IRCC_CFGA_COM 0x00
00109 #define IRCC_CFGA_IRDA_SIR_A 0x08
00110 #define IRCC_CFGA_ASK_SIR 0x10
00111 #define IRCC_CFGA_IRDA_SIR_B 0x18
00112 #define IRCC_CFGA_IRDA_HDLC 0x20
00113 #define IRCC_CFGA_IRDA_4PPM 0x28
00114 #define IRCC_CFGA_CONSUMER 0x30
00115 #define IRCC_CFGA_RAW_IR 0x38
00116 #define IRCC_CFGA_OTHER 0x40
00117
00118 #define IRCC_IR_HDLC 0x04
00119 #define IRCC_IR_4PPM 0x01
00120 #define IRCC_IR_CONSUMER 0x02
00121
00122 #define IRCC_SCE_CFGB 0x01
00123 #define IRCC_CFGB_LOOPBACK 0x20
00124 #define IRCC_CFGB_LPBCK_TX_CRC 0x10
00125 #define IRCC_CFGB_NOWAIT 0x08
00126 #define IRCC_CFGB_STRING_MOVE 0x04
00127 #define IRCC_CFGB_DMA_BURST 0x02
00128 #define IRCC_CFGB_DMA_ENABLE 0x01
00129
00130 #define IRCC_CFGB_MUX_COM 0x00
00131 #define IRCC_CFGB_MUX_IR 0x40
00132 #define IRCC_CFGB_MUX_AUX 0x80
00133 #define IRCC_CFGB_MUX_INACTIVE 0xc0
00134
00135
00136 #define IRCC_ID_HIGH 0x00
00137 #define IRCC_ID_LOW 0x01
00138 #define IRCC_CHIP_ID 0x02
00139 #define IRCC_VERSION 0x03
00140 #define IRCC_INTERFACE 0x04
00141
00142
00143 #define IRCC_CONTROL 0x00
00144 #define IRCC_BOF_COUNT_LO 0x01
00145 #define IRCC_BOF_COUNT_HI 0x00
00146 #define IRCC_BRICKWALL_CNT_LO 0x02
00147 #define IRCC_BRICKWALL_CNT_HI 0x03
00148 #define IRCC_TX_SIZE_LO 0x04
00149 #define IRCC_TX_SIZE_HI 0x03
00150 #define IRCC_RX_SIZE_HI 0x05
00151 #define IRCC_RX_SIZE_LO 0x06
00152
00153 #define IRCC_1152 0x80
00154 #define IRCC_CRC 0x40
00155
00156 struct smc_chip {
00157 char *name;
00158 unsigned char entr1;
00159 unsigned char entr2;
00160 unsigned char cid_index;
00161 unsigned char cid_value;
00162 int (*probe)(struct smc_chip *chip, chipio_t *info);
00163 };
00164 typedef struct smc_chip smc_chip_t;
00165
00166
00167 struct ircc_cb {
00168 struct device *netdev;
00169 struct irlap_cb *irlap;
00170
00171 chipio_t io;
00172 iobuff_t tx_buff;
00173 iobuff_t rx_buff;
00174
00175 struct irport_cb *irport;
00176
00177 spinlock_t lock;
00178
00179 __u32 new_speed;
00180 __u32 flags;
00181
00182 int tx_buff_offsets[10];
00183 int tx_len;
00184 };
00185
00186 #endif