Lines Matching refs:sock
106 void pcc_ioread_byte(int sock, unsigned long port, void *buf, size_t size,
113 pr_debug("m32r_cfc: pcc_ioread_byte: sock=%d, port=%#lx, buf=%p, "
115 sock, port, buf, size, nmemb, flag);
131 void pcc_ioread_word(int sock, unsigned long port, void *buf, size_t size,
138 pr_debug("m32r_cfc: pcc_ioread_word: sock=%d, port=%#lx, "
140 sock, port, buf, size, nmemb, flag);
162 void pcc_iowrite_byte(int sock, unsigned long port, void *buf, size_t size,
169 pr_debug("m32r_cfc: pcc_iowrite_byte: sock=%d, port=%#lx, "
171 sock, port, buf, size, nmemb, flag);
187 void pcc_iowrite_word(int sock, unsigned long port, void *buf, size_t size,
194 pr_debug("m32r_cfc: pcc_iowrite_word: sock=%d, port=%#lx, "
196 sock, port, buf, size, nmemb, flag);
247 static unsigned int pcc_get(u_short sock, unsigned int reg)
255 static void pcc_set(u_short sock, unsigned int reg, unsigned int data)
270 static int __init is_alive(u_short sock)
277 stat = pcc_get(sock, (unsigned int)PLD_CFSTS);
280 printk("Card is detected at socket %d : stat = 0x%08x\n", sock, stat);
281 pr_debug("m32r_cfc: is_alive: sock stat is 0x%04x\n", stat);
395 static int _pcc_get_status(u_short sock, u_int *value)
400 status = pcc_get(sock, (unsigned int)PLD_CFSTS);
418 pcc_set(sock, (unsigned int)PLD_CFBUFCR,0);/* enable buffer */
434 status = pcc_get(sock, (unsigned int)PLD_CPCR);
436 pcc_set(sock, (unsigned int)PLD_CPCR, 1);
437 pcc_set(sock, (unsigned int)PLD_CFBUFCR,0); /* force buffer off for ZA-36 */
442 pcc_set(sock, (unsigned int)PLD_CFBUFCR,0);
444 pcc_set(sock, (unsigned int)PLD_CFRSTCR, 0x0101);
446 pcc_set(sock, (unsigned int)PLD_CFRSTCR, 0x0100);
453 pcc_set(sock, (unsigned int)PLD_CPCR, 0);
462 sock, *value);
468 static int _pcc_set_socket(u_short sock, socket_state_t *state)
471 "io_irq %d, csc_mask %#2.2x)\n", sock, state->flags,
485 pcc_set(sock,(unsigned int)PLD_CFRSTCR,0x101);
487 pcc_set(sock,(unsigned int)PLD_CFRSTCR,0x100);
492 pcc_set(sock,(unsigned int)PLD_CFBUFCR,0);
494 pcc_set(sock,(unsigned int)PLD_CFBUFCR,1);
522 static int _pcc_set_io_map(u_short sock, struct pccard_io_map *io)
527 "%#llx-%#llx)\n", sock, io->map, io->flags,
537 static int _pcc_set_mem_map(u_short sock, struct pccard_mem_map *mem)
542 pcc_socket_t *t = &socket[sock];
545 "%#llx, %#x)\n", sock, map, mem->flags,
600 unsigned int sock = container_of(s, struct pcc_socket, socket)->number;
602 if (socket[sock].flags & IS_ALIVE) {
603 dev_dbg(&s->dev, "pcc_get_status: sock(%d) -EINVAL\n", sock);
607 dev_dbg(&s->dev, "pcc_get_status: sock(%d)\n", sock);
608 LOCKED(_pcc_get_status(sock, value));
613 unsigned int sock = container_of(s, struct pcc_socket, socket)->number;
615 if (socket[sock].flags & IS_ALIVE) {
616 dev_dbg(&s->dev, "pcc_set_socket: sock(%d) -EINVAL\n", sock);
619 dev_dbg(&s->dev, "pcc_set_socket: sock(%d)\n", sock);
620 LOCKED(_pcc_set_socket(sock, state));
625 unsigned int sock = container_of(s, struct pcc_socket, socket)->number;
627 if (socket[sock].flags & IS_ALIVE) {
628 dev_dbg(&s->dev, "pcc_set_io_map: sock(%d) -EINVAL\n", sock);
631 dev_dbg(&s->dev, "pcc_set_io_map: sock(%d)\n", sock);
632 LOCKED(_pcc_set_io_map(sock, io));
637 unsigned int sock = container_of(s, struct pcc_socket, socket)->number;
639 if (socket[sock].flags & IS_ALIVE) {
640 dev_dbg(&s->dev, "pcc_set_mem_map: sock(%d) -EINVAL\n", sock);
643 dev_dbg(&s->dev, "pcc_set_mem_map: sock(%d)\n", sock);
644 LOCKED(_pcc_set_mem_map(sock, mem));