Lines Matching defs:sock

120 static u_char i365_get(u_short sock, u_short reg)
125 ioaddr_t port = pccsock[sock].ioaddr;
127 reg = I365_REG(pccsock[sock].internalid, reg);
134 static void i365_set(u_short sock, u_short reg, u_char data)
139 ioaddr_t port = pccsock[sock].ioaddr;
140 u_char val = I365_REG(pccsock[sock].internalid, reg);
164 void i365_bset(u_short sock, u_short reg, u_char mask) {
165 u_char d = i365_get(sock, reg);
167 i365_set(sock, reg, d);
170 void i365_bclr(u_short sock, u_short reg, u_char mask) {
171 u_char d = i365_get(sock, reg);
173 i365_set(sock, reg, d);
177 /*static void i365_bflip(u_short sock, u_short reg, u_char mask, int b)
179 u_char d = i365_get(sock, reg);
184 i365_set(sock, reg, d);
189 static u_short i365_get_pair(u_short sock, u_short reg)
192 a = i365_get(sock, reg);
193 b = i365_get(sock, reg+1);
199 static void i365_set_pair(u_short sock, u_short reg, u_short data)
201 i365_set(sock, reg, data & 0xff);
202 i365_set(sock, reg+1, data >> 8);
205 int identify_i365 ( u_short port, u_short sock ) {
210 pccsock[pccsocks].internalid = sock;
254 int i, j, sock, k, ns, id;
266 sock = (i & 1) << 1;
267 if (identify_i365(port, sock) == IS_I82365DF) {
268 add_socket_i365(port, sock, IS_VLSI);
274 sock = (i & 3);
275 id = identify_i365(port, sock);
280 if (identify_i365(port, sock+j) < 0) continue;
288 add_socket_i365(port, sock+j, id); ns++;
338 /*static int i365_get_status(u_short sock, u_int *value)
342 status = i365_get(sock, I365_STATUS);
346 if (i365_get(sock, I365_INTCTL) & I365_PC_IOCARD)
357 if (pccsock[sock].type == IS_VG469) {
358 status = i365_get(sock, VG469_VSENSE);
359 if (pccsock[sock].internalid & 1) {
369 printf("i82365: GetStatus(%d) = %#4.4x\n", sock, *value);
374 /*static int i365_set_socket(u_short sock, socket_state_t *state)
376 socket_info_t *t = &socket[sock];
380 "io_irq %d, csc_mask %#2.2x)\n", sock, state->flags,
385 // set_bridge_state(sock); *TODO* check: need this here?
392 i365_set(sock, I365_INTCTL, reg);
409 i365_bset(sock, PD67_MISC_CTL_1, PD67_MC1_VCC_3V);
411 i365_bclr(sock, PD67_MISC_CTL_1, PD67_MC1_VCC_3V);
425 i365_bset(sock, VG469_VSELECT, VG469_VSEL_VCC);
427 i365_bclr(sock, VG469_VSELECT, VG469_VSEL_VCC);
457 if (reg != i365_get(sock, I365_POWER))
458 i365_set(sock, I365_POWER, reg);
463 i365_bflip(sock, PD67_MISC_CTL_1, PD67_MC1_SPKR_ENA,
477 i365_set(sock, I365_CSCINT, reg);
478 i365_get(sock, I365_CSC);
484 /*static int i365_get_io_map(u_short sock, struct pccard_io_map *io)
490 io->start = i365_get_pair(sock, I365_IO(map)+I365_W_START);
491 io->stop = i365_get_pair(sock, I365_IO(map)+I365_W_STOP);
492 ioctl = i365_get(sock, I365_IOCTL);
493 addr = i365_get(sock, I365_ADDRWIN);
500 "%#4.4x-%#4.4x\n", sock, map, io->flags, io->speed,
508 /*static int i365_set_io_map(u_short sock, struct pccard_io_map *io)
513 "%#4.4x-%#4.4x)\n", sock, io->map, io->flags,
522 if (i365_get(sock, I365_ADDRWIN) & I365_ENA_IO(map))
523 i365_bclr(sock, I365_ADDRWIN, I365_ENA_IO(map));
524 i365_set_pair(sock, I365_IO(map)+I365_W_START, io->start);
525 i365_set_pair(sock, I365_IO(map)+I365_W_STOP, io->stop);
526 ioctl = i365_get(sock, I365_IOCTL) & ~I365_IOCTL_MASK(map);
531 i365_set(sock, I365_IOCTL, ioctl);
534 i365_bset(sock, I365_ADDRWIN, I365_ENA_IO(map));
540 static int i365_set_mem_map(u_short sock, struct pccard_mem_map *mem)
546 "lx, %#5.5x)\n", sock, mem->map, mem->flags, mem->speed,
555 if (!(socket[sock].flags & IS_PCI) &&
560 if (i365_get(sock, I365_ADDRWIN) & I365_ENA_MEM(map))
561 i365_bclr(sock, I365_ADDRWIN, I365_ENA_MEM(map));
567 i365_set_pair(sock, base+I365_W_START, i);
576 i365_set_pair(sock, base+I365_W_STOP, i);
581 i365_set_pair(sock, base+I365_W_OFF, i);
585 i365_bset(sock, I365_ADDRWIN, I365_ENA_MEM(map));