0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030 #ifndef _LINUX_I82365_H
0031 #define _LINUX_I82365_H
0032
0033
0034
0035
0036 #define I365_IDENT 0x00
0037 #define I365_STATUS 0x01
0038 #define I365_POWER 0x02
0039 #define I365_INTCTL 0x03
0040 #define I365_CSC 0x04
0041 #define I365_CSCINT 0x05
0042 #define I365_ADDRWIN 0x06
0043 #define I365_IOCTL 0x07
0044 #define I365_GENCTL 0x16
0045 #define I365_GBLCTL 0x1E
0046
0047
0048 #define I365_IO(map) (0x08+((map)<<2))
0049 #define I365_MEM(map) (0x10+((map)<<3))
0050 #define I365_W_START 0
0051 #define I365_W_STOP 2
0052 #define I365_W_OFF 4
0053
0054
0055 #define I365_CS_BVD1 0x01
0056 #define I365_CS_STSCHG 0x01
0057 #define I365_CS_BVD2 0x02
0058 #define I365_CS_SPKR 0x02
0059 #define I365_CS_DETECT 0x0C
0060 #define I365_CS_WRPROT 0x10
0061 #define I365_CS_READY 0x20
0062 #define I365_CS_POWERON 0x40
0063 #define I365_CS_GPI 0x80
0064
0065
0066 #define I365_PWR_OFF 0x00
0067 #define I365_PWR_OUT 0x80
0068 #define I365_PWR_NORESET 0x40
0069 #define I365_PWR_AUTO 0x20
0070 #define I365_VCC_MASK 0x18
0071
0072
0073
0074 #define I365_VCC_5V 0x10
0075 #define I365_VCC_3V 0x18
0076 #define I365_VPP2_MASK 0x0c
0077 #define I365_VPP2_5V 0x04
0078 #define I365_VPP2_12V 0x08
0079 #define I365_VPP1_MASK 0x03
0080 #define I365_VPP1_5V 0x01
0081 #define I365_VPP1_12V 0x02
0082
0083
0084 #define I365_RING_ENA 0x80
0085 #define I365_PC_RESET 0x40
0086 #define I365_PC_IOCARD 0x20
0087 #define I365_INTR_ENA 0x10
0088 #define I365_IRQ_MASK 0x0F
0089
0090
0091 #define I365_CSC_BVD1 0x01
0092 #define I365_CSC_STSCHG 0x01
0093 #define I365_CSC_BVD2 0x02
0094 #define I365_CSC_READY 0x04
0095 #define I365_CSC_DETECT 0x08
0096 #define I365_CSC_ANY 0x0F
0097 #define I365_CSC_GPI 0x10
0098 #define I365_CSC_IRQ_MASK 0xF0
0099
0100
0101 #define I365_ENA_IO(map) (0x40 << (map))
0102 #define I365_ENA_MEM(map) (0x01 << (map))
0103
0104
0105 #define I365_IOCTL_MASK(map) (0x0F << (map<<2))
0106 #define I365_IOCTL_WAIT(map) (0x08 << (map<<2))
0107 #define I365_IOCTL_0WS(map) (0x04 << (map<<2))
0108 #define I365_IOCTL_IOCS16(map) (0x02 << (map<<2))
0109 #define I365_IOCTL_16BIT(map) (0x01 << (map<<2))
0110
0111
0112 #define I365_CTL_16DELAY 0x01
0113 #define I365_CTL_RESET 0x02
0114 #define I365_CTL_GPI_ENA 0x04
0115 #define I365_CTL_GPI_CTL 0x08
0116 #define I365_CTL_RESUME 0x10
0117 #define I365_CTL_SW_IRQ 0x20
0118
0119
0120 #define I365_GBL_PWRDOWN 0x01
0121 #define I365_GBL_CSC_LEV 0x02
0122 #define I365_GBL_WRBACK 0x04
0123 #define I365_GBL_IRQ_0_LEV 0x08
0124 #define I365_GBL_IRQ_1_LEV 0x10
0125
0126
0127 #define I365_MEM_16BIT 0x8000
0128 #define I365_MEM_0WS 0x4000
0129 #define I365_MEM_WS1 0x8000
0130 #define I365_MEM_WS0 0x4000
0131 #define I365_MEM_WRPROT 0x8000
0132 #define I365_MEM_REG 0x4000
0133
0134 #define I365_REG(slot, reg) (((slot) << 6) + reg)
0135
0136 #endif