Lines Matching refs:io_port

3939  * @io_port: base I/O address
3941 static void trms1040_wait_30us(unsigned long io_port)
3944 outb(5, io_port + TRM_S1040_GEN_TIMER);
3945 while (!(inb(io_port + TRM_S1040_GEN_STATUS) & GTIMEOUT))
3954 * @io_port: base I/O address
3958 static void trms1040_write_cmd(unsigned long io_port, u8 cmd, u8 addr)
3969 outb(send_data, io_port + TRM_S1040_GEN_NVRAM);
3970 trms1040_wait_30us(io_port);
3972 io_port + TRM_S1040_GEN_NVRAM);
3973 trms1040_wait_30us(io_port);
3982 outb(send_data, io_port + TRM_S1040_GEN_NVRAM);
3983 trms1040_wait_30us(io_port);
3985 io_port + TRM_S1040_GEN_NVRAM);
3986 trms1040_wait_30us(io_port);
3988 outb(NVR_SELECT, io_port + TRM_S1040_GEN_NVRAM);
3989 trms1040_wait_30us(io_port);
3999 * @io_port: base I/O address
4003 static void trms1040_set_data(unsigned long io_port, u8 addr, u8 byte)
4009 trms1040_write_cmd(io_port, 0x05, addr);
4017 outb(send_data, io_port + TRM_S1040_GEN_NVRAM);
4018 trms1040_wait_30us(io_port);
4019 outb((send_data | NVR_CLOCK), io_port + TRM_S1040_GEN_NVRAM);
4020 trms1040_wait_30us(io_port);
4022 outb(NVR_SELECT, io_port + TRM_S1040_GEN_NVRAM);
4023 trms1040_wait_30us(io_port);
4026 outb(0, io_port + TRM_S1040_GEN_NVRAM);
4027 trms1040_wait_30us(io_port);
4029 outb(NVR_SELECT, io_port + TRM_S1040_GEN_NVRAM);
4030 trms1040_wait_30us(io_port);
4034 outb((NVR_SELECT | NVR_CLOCK), io_port + TRM_S1040_GEN_NVRAM);
4035 trms1040_wait_30us(io_port);
4037 outb(NVR_SELECT, io_port + TRM_S1040_GEN_NVRAM);
4038 trms1040_wait_30us(io_port);
4040 if (inb(io_port + TRM_S1040_GEN_NVRAM) & NVR_BITIN)
4045 outb(0, io_port + TRM_S1040_GEN_NVRAM);
4055 * @io_port: the base io port
4057 static void trms1040_write_all(struct NvRamType *eeprom, unsigned long io_port)
4063 outb((inb(io_port + TRM_S1040_GEN_CONTROL) | EN_EEPROM),
4064 io_port + TRM_S1040_GEN_CONTROL);
4067 trms1040_write_cmd(io_port, 0x04, 0xFF);
4068 outb(0, io_port + TRM_S1040_GEN_NVRAM);
4069 trms1040_wait_30us(io_port);
4073 trms1040_set_data(io_port, addr, *b_eeprom);
4076 trms1040_write_cmd(io_port, 0x04, 0x00);
4077 outb(0, io_port + TRM_S1040_GEN_NVRAM);
4078 trms1040_wait_30us(io_port);
4081 outb((inb(io_port + TRM_S1040_GEN_CONTROL) & ~EN_EEPROM),
4082 io_port + TRM_S1040_GEN_CONTROL);
4092 * @io_port: base I/O address
4097 static u8 trms1040_get_data(unsigned long io_port, u8 addr)
4104 trms1040_write_cmd(io_port, 0x06, addr);
4108 outb((NVR_SELECT | NVR_CLOCK), io_port + TRM_S1040_GEN_NVRAM);
4109 trms1040_wait_30us(io_port);
4110 outb(NVR_SELECT, io_port + TRM_S1040_GEN_NVRAM);
4113 read_byte = inb(io_port + TRM_S1040_GEN_NVRAM);
4118 trms1040_wait_30us(io_port);
4122 outb(0, io_port + TRM_S1040_GEN_NVRAM);
4133 * @io_port: the base io port
4135 static void trms1040_read_all(struct NvRamType *eeprom, unsigned long io_port)
4141 outb((inb(io_port + TRM_S1040_GEN_CONTROL) | EN_EEPROM),
4142 io_port + TRM_S1040_GEN_CONTROL);
4146 *b_eeprom = trms1040_get_data(io_port, addr);
4149 outb((inb(io_port + TRM_S1040_GEN_CONTROL) & ~EN_EEPROM),
4150 io_port + TRM_S1040_GEN_CONTROL);
4163 * @io_port: io port to read from
4165 static void check_eeprom(struct NvRamType *eeprom, unsigned long io_port)
4173 trms1040_read_all(eeprom, io_port); /* read eeprom */
4219 trms1040_write_all(eeprom, io_port);
4344 * early (when this instance is created) and the io_port and irq
4424 host->io_port = acb->io_port_base;
4498 * @io_port: The base I/O port
4504 static int adapter_init(struct AdapterCtlBlk *acb, unsigned long io_port,
4507 if (!request_region(io_port, io_port_len, DC395X_NAME)) {
4508 dprintkl(KERN_ERR, "Failed to reserve IO region 0x%lx\n", io_port);
4512 acb->io_port_base = io_port;
4524 check_eeprom(&acb->eeprom, io_port);