Lines Matching refs:ioaddr

89 static int card_wait_for_busy_clear(const int ioaddr[],
91 static int card_wait_for_ready(const int ioaddr[], const char* name,
93 static int card_send_command(const int ioaddr[], const char* name,
97 static int sb1000_wait_for_ready(const int ioaddr[], const char* name);
98 static int sb1000_wait_for_ready_clear(const int ioaddr[],
100 static void sb1000_send_command(const int ioaddr[], const char* name,
102 static void sb1000_read_status(const int ioaddr[], unsigned char in[]);
103 static void sb1000_issue_read_command(const int ioaddr[],
107 static int sb1000_reset(const int ioaddr[], const char* name);
108 static int sb1000_check_CRC(const int ioaddr[], const char* name);
109 static inline int sb1000_start_get_set_command(const int ioaddr[],
111 static int sb1000_end_get_set_command(const int ioaddr[],
113 static int sb1000_activate(const int ioaddr[], const char* name);
114 static int sb1000_get_firmware_version(const int ioaddr[],
116 static int sb1000_get_frequency(const int ioaddr[], const char* name,
118 static int sb1000_set_frequency(const int ioaddr[], const char* name,
120 static int sb1000_get_PIDs(const int ioaddr[], const char* name,
122 static int sb1000_set_PIDs(const int ioaddr[], const char* name,
148 unsigned short ioaddr[2], irq; in sb1000_probe_one() local
164 ioaddr[0] = pnp_port_start(pdev, 0); in sb1000_probe_one()
165 ioaddr[1] = pnp_port_start(pdev, 0); in sb1000_probe_one()
169 if (!request_region(ioaddr[0], 16, "sb1000")) in sb1000_probe_one()
171 if (!request_region(ioaddr[1], 16, "sb1000")) in sb1000_probe_one()
181 dev->base_addr = ioaddr[0]; in sb1000_probe_one()
183 dev->mem_start = ioaddr[1]; in sb1000_probe_one()
220 release_region(ioaddr[1], 16); in sb1000_probe_one()
222 release_region(ioaddr[0], 16); in sb1000_probe_one()
257 card_wait_for_busy_clear(const int ioaddr[], const char* name) in card_wait_for_busy_clear() argument
262 a = inb(ioaddr[0] + 7); in card_wait_for_busy_clear()
268 a = inb(ioaddr[0] + 7); in card_wait_for_busy_clear()
281 card_wait_for_ready(const int ioaddr[], const char* name, unsigned char in[]) in card_wait_for_ready() argument
286 a = inb(ioaddr[1] + 6); in card_wait_for_ready()
292 a = inb(ioaddr[1] + 6); in card_wait_for_ready()
300 in[1] = inb(ioaddr[0] + 1); in card_wait_for_ready()
301 in[2] = inb(ioaddr[0] + 2); in card_wait_for_ready()
302 in[3] = inb(ioaddr[0] + 3); in card_wait_for_ready()
303 in[4] = inb(ioaddr[0] + 4); in card_wait_for_ready()
304 in[0] = inb(ioaddr[0] + 5); in card_wait_for_ready()
305 in[6] = inb(ioaddr[0] + 6); in card_wait_for_ready()
306 in[5] = inb(ioaddr[1] + 6); in card_wait_for_ready()
312 card_send_command(const int ioaddr[], const char* name, in card_send_command() argument
317 if ((status = card_wait_for_busy_clear(ioaddr, name))) in card_send_command()
319 outb(0xa0, ioaddr[0] + 6); in card_send_command()
320 outb(out[2], ioaddr[0] + 1); in card_send_command()
321 outb(out[3], ioaddr[0] + 2); in card_send_command()
322 outb(out[4], ioaddr[0] + 3); in card_send_command()
323 outb(out[5], ioaddr[0] + 4); in card_send_command()
324 outb(out[1], ioaddr[0] + 5); in card_send_command()
325 outb(0xa0, ioaddr[0] + 6); in card_send_command()
326 outb(out[0], ioaddr[0] + 7); in card_send_command()
328 if ((status = card_wait_for_ready(ioaddr, name, in))) in card_send_command()
330 inb(ioaddr[0] + 7); in card_send_command()
359 sb1000_wait_for_ready(const int ioaddr[], const char* name) in sb1000_wait_for_ready() argument
364 while (inb(ioaddr[1] + 6) & 0x80) { in sb1000_wait_for_ready()
372 while (!(inb(ioaddr[1] + 6) & 0x40)) { in sb1000_wait_for_ready()
379 inb(ioaddr[0] + 7); in sb1000_wait_for_ready()
385 sb1000_wait_for_ready_clear(const int ioaddr[], const char* name) in sb1000_wait_for_ready_clear() argument
390 while (inb(ioaddr[1] + 6) & 0x80) { in sb1000_wait_for_ready_clear()
398 while (inb(ioaddr[1] + 6) & 0x40) { in sb1000_wait_for_ready_clear()
410 sb1000_send_command(const int ioaddr[], const char* name, in sb1000_send_command() argument
413 outb(out[2], ioaddr[0] + 1); in sb1000_send_command()
414 outb(out[3], ioaddr[0] + 2); in sb1000_send_command()
415 outb(out[4], ioaddr[0] + 3); in sb1000_send_command()
416 outb(out[5], ioaddr[0] + 4); in sb1000_send_command()
417 outb(out[1], ioaddr[0] + 5); in sb1000_send_command()
418 outb(out[0], ioaddr[0] + 7); in sb1000_send_command()
426 sb1000_read_status(const int ioaddr[], unsigned char in[]) in sb1000_read_status() argument
428 in[1] = inb(ioaddr[0] + 1); in sb1000_read_status()
429 in[2] = inb(ioaddr[0] + 2); in sb1000_read_status()
430 in[3] = inb(ioaddr[0] + 3); in sb1000_read_status()
431 in[4] = inb(ioaddr[0] + 4); in sb1000_read_status()
432 in[0] = inb(ioaddr[0] + 5); in sb1000_read_status()
437 sb1000_issue_read_command(const int ioaddr[], const char* name) in sb1000_issue_read_command() argument
441 sb1000_wait_for_ready_clear(ioaddr, name); in sb1000_issue_read_command()
442 outb(0xa0, ioaddr[0] + 6); in sb1000_issue_read_command()
443 sb1000_send_command(ioaddr, name, Command0); in sb1000_issue_read_command()
452 sb1000_reset(const int ioaddr[], const char* name) in sb1000_reset() argument
459 port = ioaddr[1] + 6; in sb1000_reset()
473 if ((status = card_send_command(ioaddr, name, Command0, st))) in sb1000_reset()
482 sb1000_check_CRC(const int ioaddr[], const char* name) in sb1000_check_CRC() argument
490 if ((status = card_send_command(ioaddr, name, Command0, st))) in sb1000_check_CRC()
498 sb1000_start_get_set_command(const int ioaddr[], const char* name) in sb1000_start_get_set_command() argument
504 return card_send_command(ioaddr, name, Command0, st); in sb1000_start_get_set_command()
508 sb1000_end_get_set_command(const int ioaddr[], const char* name) in sb1000_end_get_set_command() argument
516 if ((status = card_send_command(ioaddr, name, Command0, st))) in sb1000_end_get_set_command()
518 return card_send_command(ioaddr, name, Command1, st); in sb1000_end_get_set_command()
522 sb1000_activate(const int ioaddr[], const char* name) in sb1000_activate() argument
531 status = card_send_command(ioaddr, name, Command0, st); in sb1000_activate()
534 status = card_send_command(ioaddr, name, Command1, st); in sb1000_activate()
538 status = sb1000_start_get_set_command(ioaddr, name); in sb1000_activate()
544 return sb1000_start_get_set_command(ioaddr, name); in sb1000_activate()
549 sb1000_get_firmware_version(const int ioaddr[], const char* name, in sb1000_get_firmware_version() argument
557 if ((status = sb1000_start_get_set_command(ioaddr, name))) in sb1000_get_firmware_version()
559 if ((status = card_send_command(ioaddr, name, Command0, st))) in sb1000_get_firmware_version()
566 return sb1000_end_get_set_command(ioaddr, name); in sb1000_get_firmware_version()
573 sb1000_get_frequency(const int ioaddr[], const char* name, int* frequency) in sb1000_get_frequency() argument
581 if ((status = sb1000_start_get_set_command(ioaddr, name))) in sb1000_get_frequency()
583 if ((status = card_send_command(ioaddr, name, Command0, st))) in sb1000_get_frequency()
586 return sb1000_end_get_set_command(ioaddr, name); in sb1000_get_frequency()
591 sb1000_set_frequency(const int ioaddr[], const char* name, int frequency) in sb1000_set_frequency() argument
607 if ((status = sb1000_start_get_set_command(ioaddr, name))) in sb1000_set_frequency()
616 return card_send_command(ioaddr, name, Command0, st); in sb1000_set_frequency()
621 sb1000_get_PIDs(const int ioaddr[], const char* name, short PID[]) in sb1000_get_PIDs() argument
632 if ((status = sb1000_start_get_set_command(ioaddr, name))) in sb1000_get_PIDs()
635 if ((status = card_send_command(ioaddr, name, Command0, st))) in sb1000_get_PIDs()
639 if ((status = card_send_command(ioaddr, name, Command1, st))) in sb1000_get_PIDs()
643 if ((status = card_send_command(ioaddr, name, Command2, st))) in sb1000_get_PIDs()
647 if ((status = card_send_command(ioaddr, name, Command3, st))) in sb1000_get_PIDs()
651 return sb1000_end_get_set_command(ioaddr, name); in sb1000_get_PIDs()
656 sb1000_set_PIDs(const int ioaddr[], const char* name, const short PID[]) in sb1000_set_PIDs() argument
669 if ((status = sb1000_start_get_set_command(ioaddr, name))) in sb1000_set_PIDs()
676 if ((status = card_send_command(ioaddr, name, Command0, st))) in sb1000_set_PIDs()
683 if ((status = card_send_command(ioaddr, name, Command1, st))) in sb1000_set_PIDs()
690 if ((status = card_send_command(ioaddr, name, Command2, st))) in sb1000_set_PIDs()
697 if ((status = card_send_command(ioaddr, name, Command3, st))) in sb1000_set_PIDs()
700 if ((status = card_send_command(ioaddr, name, Command4, st))) in sb1000_set_PIDs()
702 return sb1000_end_get_set_command(ioaddr, name); in sb1000_set_PIDs()
743 int ioaddr, ns; in sb1000_rx() local
759 ioaddr = dev->base_addr; in sb1000_rx()
761 insw(ioaddr, (unsigned short*) st, 1); in sb1000_rx()
806 insw(ioaddr, buffer, NewDatagramHeaderSize / 2); in sb1000_rx()
816 insw(ioaddr, buffer, NewDatagramDataSize / 2); in sb1000_rx()
826 insw(ioaddr, buffer, NewDatagramDataSize / 2); in sb1000_rx()
837 insw(ioaddr, buffer, NewDatagramDataSize / 2); in sb1000_rx()
843 insw(ioaddr, skb_put(skb, NewDatagramDataSize), in sb1000_rx()
848 insw(ioaddr, buffer, ContDatagramHeaderSize / 2); in sb1000_rx()
855 insw(ioaddr, buffer, ContDatagramDataSize / 2); in sb1000_rx()
859 insw(ioaddr, skb_put(skb, ContDatagramDataSize), in sb1000_rx()
878 insw(ioaddr, buffer, FrameSize / 2); in sb1000_rx()
905 int ioaddr[2]; in sb1000_error_dpc() local
909 ioaddr[0] = dev->base_addr; in sb1000_error_dpc()
911 ioaddr[1] = dev->mem_start; in sb1000_error_dpc()
914 sb1000_wait_for_ready_clear(ioaddr, name); in sb1000_error_dpc()
915 sb1000_send_command(ioaddr, name, Command0); in sb1000_error_dpc()
916 sb1000_wait_for_ready(ioaddr, name); in sb1000_error_dpc()
917 sb1000_read_status(ioaddr, st); in sb1000_error_dpc()
930 int ioaddr[2], status; in sb1000_open() local
934 ioaddr[0] = dev->base_addr; in sb1000_open()
936 ioaddr[1] = dev->mem_start; in sb1000_open()
940 if ((status = sb1000_reset(ioaddr, name))) in sb1000_open()
943 if ((status = sb1000_check_CRC(ioaddr, name))) in sb1000_open()
975 if ((status = sb1000_activate(ioaddr, name))) in sb1000_open()
978 if ((status = sb1000_get_firmware_version(ioaddr, name, version, 0))) in sb1000_open()
995 int ioaddr[2], status, frequency; in sb1000_dev_ioctl() local
1002 ioaddr[0] = dev->base_addr; in sb1000_dev_ioctl()
1004 ioaddr[1] = dev->mem_start; in sb1000_dev_ioctl()
1020 if ((status = sb1000_get_firmware_version(ioaddr, name, version, 1))) in sb1000_dev_ioctl()
1027 if ((status = sb1000_get_frequency(ioaddr, name, &frequency))) in sb1000_dev_ioctl()
1038 if ((status = sb1000_set_frequency(ioaddr, name, frequency))) in sb1000_dev_ioctl()
1043 if ((status = sb1000_get_PIDs(ioaddr, name, PID))) in sb1000_dev_ioctl()
1054 if ((status = sb1000_set_PIDs(ioaddr, name, PID))) in sb1000_dev_ioctl()
1092 int ioaddr[2]; in sb1000_interrupt() local
1098 ioaddr[0] = dev->base_addr; in sb1000_interrupt()
1100 ioaddr[1] = dev->mem_start; in sb1000_interrupt()
1104 st = inb(ioaddr[1] + 6); in sb1000_interrupt()
1112 st = inb(ioaddr[0] + 7); in sb1000_interrupt()
1118 sb1000_issue_read_command(ioaddr, name); in sb1000_interrupt()
1121 sb1000_issue_read_command(ioaddr, name); in sb1000_interrupt()
1124 sb1000_wait_for_ready_clear(ioaddr, name); in sb1000_interrupt()
1125 sb1000_send_command(ioaddr, name, Command0); in sb1000_interrupt()
1126 sb1000_wait_for_ready(ioaddr, name); in sb1000_interrupt()
1127 sb1000_issue_read_command(ioaddr, name); in sb1000_interrupt()
1130 sb1000_wait_for_ready_clear(ioaddr, name); in sb1000_interrupt()
1131 sb1000_send_command(ioaddr, name, Command1); in sb1000_interrupt()
1132 sb1000_wait_for_ready(ioaddr, name); in sb1000_interrupt()
1133 sb1000_issue_read_command(ioaddr, name); in sb1000_interrupt()
1143 int ioaddr[2]; in sb1000_close() local
1151 ioaddr[0] = dev->base_addr; in sb1000_close()
1153 ioaddr[1] = dev->mem_start; in sb1000_close()
1157 release_region(ioaddr[1], SB1000_IO_EXTENT); in sb1000_close()
1158 release_region(ioaddr[0], SB1000_IO_EXTENT); in sb1000_close()