Lines Matching refs:sock

217 static u_char i365_get(u_short sock, u_short reg)  in i365_get()  argument
222 unsigned int port = socket[sock].ioaddr; in i365_get()
224 reg = I365_REG(socket[sock].psock, reg); in i365_get()
231 static void i365_set(u_short sock, u_short reg, u_char data) in i365_set() argument
236 unsigned int port = socket[sock].ioaddr; in i365_set()
237 u_char val = I365_REG(socket[sock].psock, reg); in i365_set()
243 static void i365_bset(u_short sock, u_short reg, u_char mask) in i365_bset() argument
245 u_char d = i365_get(sock, reg); in i365_bset()
247 i365_set(sock, reg, d); in i365_bset()
250 static void i365_bclr(u_short sock, u_short reg, u_char mask) in i365_bclr() argument
252 u_char d = i365_get(sock, reg); in i365_bclr()
254 i365_set(sock, reg, d); in i365_bclr()
257 static void i365_bflip(u_short sock, u_short reg, u_char mask, int b) in i365_bflip() argument
259 u_char d = i365_get(sock, reg); in i365_bflip()
264 i365_set(sock, reg, d); in i365_bflip()
267 static u_short i365_get_pair(u_short sock, u_short reg) in i365_get_pair() argument
270 a = i365_get(sock, reg); in i365_get_pair()
271 b = i365_get(sock, reg+1); in i365_get_pair()
275 static void i365_set_pair(u_short sock, u_short reg, u_short data) in i365_set_pair() argument
277 i365_set(sock, reg, data & 0xff); in i365_set_pair()
278 i365_set(sock, reg+1, data >> 8); in i365_set_pair()
489 static u_int __init test_irq(u_short sock, int irq) in test_irq() argument
495 irq_hits = 0; irq_sock = sock; in test_irq()
504 i365_set(sock, I365_CSCINT, I365_CSC_DETECT | (irq << 4)); in test_irq()
505 i365_bset(sock, I365_GENCTL, I365_CTL_SW_IRQ); in test_irq()
511 i365_set(sock, I365_CSCINT, 0); in test_irq()
517 static u_int __init isa_scan(u_short sock, u_int mask0) in isa_scan() argument
529 set_bridge_state(sock); in isa_scan()
530 i365_set(sock, I365_CSCINT, 0); in isa_scan()
532 if ((mask0 & (1 << i)) && (test_irq(sock, i) == 0)) in isa_scan()
535 if ((mask1 & (1 << i)) && (test_irq(sock, i) != 0)) in isa_scan()
572 static int __init identify(unsigned int port, u_short sock) in identify() argument
579 socket[sockets].psock = sock; in identify()
640 static int __init is_alive(u_short sock) in is_alive() argument
645 stat = i365_get(sock, I365_STATUS); in is_alive()
646 start = i365_get_pair(sock, I365_IO(0)+I365_W_START); in is_alive()
647 stop = i365_get_pair(sock, I365_IO(0)+I365_W_STOP); in is_alive()
649 (i365_get(sock, I365_INTCTL) & I365_PC_IOCARD) && in is_alive()
650 (i365_get(sock, I365_ADDRWIN) & I365_ENA_IO(0)) && in is_alive()
755 int i, j, sock, k, ns, id; in isa_probe() local
796 sock = (i & 1) << 1; in isa_probe()
797 if (identify(port, sock) == IS_I82365DF) { in isa_probe()
798 add_socket(port, sock, IS_VLSI); in isa_probe()
807 sock = (i & 3); in isa_probe()
808 id = identify(port, sock); in isa_probe()
813 if ((ignore == i+j) || (identify(port, sock+j) < 0)) in isa_probe()
822 add_socket(port, sock+j, id); ns++; in isa_probe()
887 static int i365_get_status(u_short sock, u_int *value) in i365_get_status() argument
891 status = i365_get(sock, I365_STATUS); in i365_get_status()
895 if (i365_get(sock, I365_INTCTL) & I365_PC_IOCARD) in i365_get_status()
905 if (socket[sock].type == IS_VG469) { in i365_get_status()
906 status = i365_get(sock, VG469_VSENSE); in i365_get_status()
907 if (socket[sock].psock & 1) { in i365_get_status()
916 pr_debug("GetStatus(%d) = %#4.4x\n", sock, *value); in i365_get_status()
922 static int i365_set_socket(u_short sock, socket_state_t *state) in i365_set_socket() argument
924 struct i82365_socket *t = &socket[sock]; in i365_set_socket()
928 "io_irq %d, csc_mask %#2.2x)\n", sock, state->flags, in i365_set_socket()
932 set_bridge_state(sock); in i365_set_socket()
939 i365_set(sock, I365_INTCTL, reg); in i365_set_socket()
956 i365_bset(sock, PD67_MISC_CTL_1, PD67_MC1_VCC_3V); in i365_set_socket()
958 i365_bclr(sock, PD67_MISC_CTL_1, PD67_MC1_VCC_3V); in i365_set_socket()
972 i365_bset(sock, VG469_VSELECT, VG469_VSEL_VCC); in i365_set_socket()
974 i365_bclr(sock, VG469_VSELECT, VG469_VSEL_VCC); in i365_set_socket()
1004 if (reg != i365_get(sock, I365_POWER)) in i365_set_socket()
1005 i365_set(sock, I365_POWER, reg); in i365_set_socket()
1010 i365_bflip(sock, PD67_MISC_CTL_1, PD67_MC1_SPKR_ENA, in i365_set_socket()
1024 i365_set(sock, I365_CSCINT, reg); in i365_set_socket()
1025 i365_get(sock, I365_CSC); in i365_set_socket()
1032 static int i365_set_io_map(u_short sock, struct pccard_io_map *io) in i365_set_io_map() argument
1037 "%#llx-%#llx)\n", sock, io->map, io->flags, io->speed, in i365_set_io_map()
1043 if (i365_get(sock, I365_ADDRWIN) & I365_ENA_IO(map)) in i365_set_io_map()
1044 i365_bclr(sock, I365_ADDRWIN, I365_ENA_IO(map)); in i365_set_io_map()
1045 i365_set_pair(sock, I365_IO(map)+I365_W_START, io->start); in i365_set_io_map()
1046 i365_set_pair(sock, I365_IO(map)+I365_W_STOP, io->stop); in i365_set_io_map()
1047 ioctl = i365_get(sock, I365_IOCTL) & ~I365_IOCTL_MASK(map); in i365_set_io_map()
1052 i365_set(sock, I365_IOCTL, ioctl); in i365_set_io_map()
1055 i365_bset(sock, I365_ADDRWIN, I365_ENA_IO(map)); in i365_set_io_map()
1061 static int i365_set_mem_map(u_short sock, struct pccard_mem_map *mem) in i365_set_mem_map() argument
1067 "%#x)\n", sock, mem->map, mem->flags, mem->speed, in i365_set_mem_map()
1079 if (i365_get(sock, I365_ADDRWIN) & I365_ENA_MEM(map)) in i365_set_mem_map()
1080 i365_bclr(sock, I365_ADDRWIN, I365_ENA_MEM(map)); in i365_set_mem_map()
1086 i365_set_pair(sock, base+I365_W_START, i); in i365_set_mem_map()
1095 i365_set_pair(sock, base+I365_W_STOP, i); in i365_set_mem_map()
1100 i365_set_pair(sock, base+I365_W_OFF, i); in i365_set_mem_map()
1104 i365_bset(sock, I365_ADDRWIN, I365_ENA_MEM(map)); in i365_set_mem_map()
1126 unsigned short sock;
1131 sock = s->number;
1133 ISA_LOCK(sock, flags);
1136 i365_get(sock,i), i365_get(sock,i+1),
1137 i365_get(sock,i+2), i365_get(sock,i+3),
1141 ISA_UNLOCK(sock, flags);
1166 unsigned int sock = container_of(s, struct i82365_socket, socket)->number; in pcic_get_status() local
1168 if (socket[sock].flags & IS_ALIVE) { in pcic_get_status()
1173 LOCKED(i365_get_status(sock, value)); in pcic_get_status()
1178 unsigned int sock = container_of(s, struct i82365_socket, socket)->number; in pcic_set_socket() local
1180 if (socket[sock].flags & IS_ALIVE) in pcic_set_socket()
1183 LOCKED(i365_set_socket(sock, state)); in pcic_set_socket()
1188 unsigned int sock = container_of(s, struct i82365_socket, socket)->number; in pcic_set_io_map() local
1189 if (socket[sock].flags & IS_ALIVE) in pcic_set_io_map()
1192 LOCKED(i365_set_io_map(sock, io)); in pcic_set_io_map()
1197 unsigned int sock = container_of(s, struct i82365_socket, socket)->number; in pcic_set_mem_map() local
1198 if (socket[sock].flags & IS_ALIVE) in pcic_set_mem_map()
1201 LOCKED(i365_set_mem_map(sock, mem)); in pcic_set_mem_map()