Lines Matching refs:slot

103 	vrc4171_slot_t slot;  member
171 static inline uint8_t exca_read_byte(int slot, uint8_t index) in exca_read_byte() argument
173 if (slot == CARD_SLOTB) in exca_read_byte()
180 static inline uint16_t exca_read_word(int slot, uint8_t index) in exca_read_word() argument
184 if (slot == CARD_SLOTB) in exca_read_word()
196 static inline uint8_t exca_write_byte(int slot, uint8_t index, uint8_t data) in exca_write_byte() argument
198 if (slot == CARD_SLOTB) in exca_write_byte()
207 static inline uint16_t exca_write_word(int slot, uint8_t index, uint16_t data) in exca_write_word() argument
209 if (slot == CARD_SLOTB) in exca_write_word()
238 unsigned int slot; in pccard_init() local
245 slot = sock->sock; in pccard_init()
246 socket = &vrc4171_sockets[slot]; in pccard_init()
256 unsigned int slot; in pccard_get_status() local
263 slot = sock->sock; in pccard_get_status()
265 status = exca_read_byte(slot, I365_STATUS); in pccard_get_status()
266 if (exca_read_byte(slot, I365_INTCTL) & I365_PC_IOCARD) { in pccard_get_status()
284 sense = exca_read_byte(slot, CARD_VOLTAGE_SENSE); in pccard_get_status()
321 unsigned int slot; in pccard_set_socket() local
329 slot = sock->sock; in pccard_set_socket()
330 socket = &vrc4171_sockets[slot]; in pccard_set_socket()
335 exca_write_byte(slot, CARD_VOLTAGE_SELECT, voltage); in pccard_set_socket()
342 exca_write_byte(slot, I365_POWER, power); in pccard_set_socket()
353 exca_write_byte(slot, I365_INTCTL, control); in pccard_set_socket()
356 exca_write_byte(slot, I365_CSCINT, cscint); in pccard_set_socket()
357 exca_read_byte(slot, I365_CSC); /* clear CardStatus change */ in pccard_set_socket()
373 exca_write_byte(slot, I365_CSCINT, cscint); in pccard_set_socket()
382 unsigned int slot; in pccard_set_io_map() local
391 slot = sock->sock; in pccard_set_io_map()
394 addrwin = exca_read_byte(slot, I365_ADDRWIN); in pccard_set_io_map()
397 exca_write_byte(slot, I365_ADDRWIN, addrwin); in pccard_set_io_map()
400 exca_write_word(slot, I365_IO(map)+I365_W_START, io->start); in pccard_set_io_map()
401 exca_write_word(slot, I365_IO(map)+I365_W_STOP, io->stop); in pccard_set_io_map()
412 exca_write_byte(slot, I365_IOCTL, ioctl); in pccard_set_io_map()
416 exca_write_byte(slot, I365_ADDRWIN, addrwin); in pccard_set_io_map()
424 unsigned int slot; in pccard_set_mem_map() local
438 slot = sock->sock; in pccard_set_mem_map()
441 addrwin = exca_read_byte(slot, I365_ADDRWIN); in pccard_set_mem_map()
444 exca_write_byte(slot, I365_ADDRWIN, addrwin); in pccard_set_mem_map()
450 exca_write_word(slot, I365_MEM(map)+I365_W_START, start); in pccard_set_mem_map()
466 exca_write_word(slot, I365_MEM(map)+I365_W_STOP, stop); in pccard_set_mem_map()
473 exca_write_word(slot, I365_MEM(map)+I365_W_OFF, offset); in pccard_set_mem_map()
477 exca_write_byte(slot, I365_ADDRWIN, addrwin); in pccard_set_mem_map()
491 static inline unsigned int get_events(int slot) in get_events() argument
496 status = exca_read_byte(slot, I365_STATUS); in get_events()
497 csc = exca_read_byte(slot, I365_CSC); in get_events()
499 if (exca_read_byte(slot, I365_INTCTL) & I365_PC_IOCARD) { in get_events()
528 if (socket->slot == SLOT_INITIALIZED) { in pccard_interrupt()
541 if (socket->slot == SLOT_INITIALIZED) { in pccard_interrupt()
555 static inline void reserve_using_irq(int slot) in reserve_using_irq() argument
559 irq = exca_read_byte(slot, I365_INTCTL); in reserve_using_irq()
563 irq = exca_read_byte(slot, I365_CSCINT); in reserve_using_irq()
571 int slot, retval; in vrc4171_add_sockets() local
573 for (slot = 0; slot < CARD_MAX_SLOTS; slot++) { in vrc4171_add_sockets()
574 if (slot == CARD_SLOTB && vrc4171_slotb == SLOTB_IS_NONE) in vrc4171_add_sockets()
577 socket = &vrc4171_sockets[slot]; in vrc4171_add_sockets()
578 if (socket->slot != SLOT_PROBE) { in vrc4171_add_sockets()
581 switch (socket->slot) { in vrc4171_add_sockets()
583 addrwin = exca_read_byte(slot, I365_ADDRWIN); in vrc4171_add_sockets()
585 exca_write_byte(slot, I365_ADDRWIN, addrwin); in vrc4171_add_sockets()
588 addrwin = exca_read_byte(slot, I365_ADDRWIN); in vrc4171_add_sockets()
590 exca_write_byte(slot, I365_ADDRWIN, addrwin); in vrc4171_add_sockets()
596 reserve_using_irq(slot); in vrc4171_add_sockets()
600 sprintf(socket->name, "NEC VRC4171 Card Slot %1c", 'A' + slot); in vrc4171_add_sockets()
609 exca_write_byte(slot, I365_ADDRWIN, 0); in vrc4171_add_sockets()
610 exca_write_byte(slot, GLOBAL_CONTROL, 0); in vrc4171_add_sockets()
612 socket->slot = SLOT_INITIALIZED; in vrc4171_add_sockets()
621 int slot; in vrc4171_remove_sockets() local
623 for (slot = 0; slot < CARD_MAX_SLOTS; slot++) { in vrc4171_remove_sockets()
624 if (slot == CARD_SLOTB && vrc4171_slotb == SLOTB_IS_NONE) in vrc4171_remove_sockets()
627 socket = &vrc4171_sockets[slot]; in vrc4171_remove_sockets()
628 if (socket->slot == SLOT_INITIALIZED) in vrc4171_remove_sockets()
631 socket->slot = SLOT_PROBE; in vrc4171_remove_sockets()
656 vrc4171_sockets[CARD_SLOTA].slot = SLOT_NOPROBE_MEM; in vrc4171_card_setup()
659 vrc4171_sockets[CARD_SLOTA].slot = SLOT_NOPROBE_IO; in vrc4171_card_setup()
662 vrc4171_sockets[CARD_SLOTA].slot = SLOT_NOPROBE_ALL; in vrc4171_card_setup()
696 vrc4171_sockets[CARD_SLOTB].slot = SLOT_NOPROBE_MEM; in vrc4171_card_setup()
698 vrc4171_sockets[CARD_SLOTB].slot = SLOT_NOPROBE_IO; in vrc4171_card_setup()
700 vrc4171_sockets[CARD_SLOTB].slot = SLOT_NOPROBE_ALL; in vrc4171_card_setup()