• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/scsi/

Lines Matching refs:io_port

3831  * @io_port: base I/O address
3833 static void __devinit trms1040_wait_30us(unsigned long io_port)
3836 outb(5, io_port + TRM_S1040_GEN_TIMER);
3837 while (!(inb(io_port + TRM_S1040_GEN_STATUS) & GTIMEOUT))
3846 * @io_port: base I/O address
3850 static void __devinit trms1040_write_cmd(unsigned long io_port, u8 cmd, u8 addr)
3861 outb(send_data, io_port + TRM_S1040_GEN_NVRAM);
3862 trms1040_wait_30us(io_port);
3864 io_port + TRM_S1040_GEN_NVRAM);
3865 trms1040_wait_30us(io_port);
3874 outb(send_data, io_port + TRM_S1040_GEN_NVRAM);
3875 trms1040_wait_30us(io_port);
3877 io_port + TRM_S1040_GEN_NVRAM);
3878 trms1040_wait_30us(io_port);
3880 outb(NVR_SELECT, io_port + TRM_S1040_GEN_NVRAM);
3881 trms1040_wait_30us(io_port);
3891 * @io_port: base I/O address
3895 static void __devinit trms1040_set_data(unsigned long io_port, u8 addr, u8 byte)
3901 trms1040_write_cmd(io_port, 0x05, addr);
3909 outb(send_data, io_port + TRM_S1040_GEN_NVRAM);
3910 trms1040_wait_30us(io_port);
3911 outb((send_data | NVR_CLOCK), io_port + TRM_S1040_GEN_NVRAM);
3912 trms1040_wait_30us(io_port);
3914 outb(NVR_SELECT, io_port + TRM_S1040_GEN_NVRAM);
3915 trms1040_wait_30us(io_port);
3918 outb(0, io_port + TRM_S1040_GEN_NVRAM);
3919 trms1040_wait_30us(io_port);
3921 outb(NVR_SELECT, io_port + TRM_S1040_GEN_NVRAM);
3922 trms1040_wait_30us(io_port);
3926 outb((NVR_SELECT | NVR_CLOCK), io_port + TRM_S1040_GEN_NVRAM);
3927 trms1040_wait_30us(io_port);
3929 outb(NVR_SELECT, io_port + TRM_S1040_GEN_NVRAM);
3930 trms1040_wait_30us(io_port);
3932 if (inb(io_port + TRM_S1040_GEN_NVRAM) & NVR_BITIN)
3937 outb(0, io_port + TRM_S1040_GEN_NVRAM);
3947 * @io_port: the base io port
3949 static void __devinit trms1040_write_all(struct NvRamType *eeprom, unsigned long io_port)
3955 outb((inb(io_port + TRM_S1040_GEN_CONTROL) | EN_EEPROM),
3956 io_port + TRM_S1040_GEN_CONTROL);
3959 trms1040_write_cmd(io_port, 0x04, 0xFF);
3960 outb(0, io_port + TRM_S1040_GEN_NVRAM);
3961 trms1040_wait_30us(io_port);
3965 trms1040_set_data(io_port, addr, *b_eeprom);
3968 trms1040_write_cmd(io_port, 0x04, 0x00);
3969 outb(0, io_port + TRM_S1040_GEN_NVRAM);
3970 trms1040_wait_30us(io_port);
3973 outb((inb(io_port + TRM_S1040_GEN_CONTROL) & ~EN_EEPROM),
3974 io_port + TRM_S1040_GEN_CONTROL);
3984 * @io_port: base I/O address
3989 static u8 __devinit trms1040_get_data(unsigned long io_port, u8 addr)
3996 trms1040_write_cmd(io_port, 0x06, addr);
4000 outb((NVR_SELECT | NVR_CLOCK), io_port + TRM_S1040_GEN_NVRAM);
4001 trms1040_wait_30us(io_port);
4002 outb(NVR_SELECT, io_port + TRM_S1040_GEN_NVRAM);
4005 read_byte = inb(io_port + TRM_S1040_GEN_NVRAM);
4010 trms1040_wait_30us(io_port);
4014 outb(0, io_port + TRM_S1040_GEN_NVRAM);
4025 * @io_port: the base io port
4027 static void __devinit trms1040_read_all(struct NvRamType *eeprom, unsigned long io_port)
4033 outb((inb(io_port + TRM_S1040_GEN_CONTROL) | EN_EEPROM),
4034 io_port + TRM_S1040_GEN_CONTROL);
4038 *b_eeprom = trms1040_get_data(io_port, addr);
4041 outb((inb(io_port + TRM_S1040_GEN_CONTROL) & ~EN_EEPROM),
4042 io_port + TRM_S1040_GEN_CONTROL);
4055 * @io_port: io port to read from
4057 static void __devinit check_eeprom(struct NvRamType *eeprom, unsigned long io_port)
4065 trms1040_read_all(eeprom, io_port); /* read eeprom */
4111 trms1040_write_all(eeprom, io_port);
4236 * early (when this instance is created) and the io_port and irq
4316 host->io_port = acb->io_port_base;
4395 * @io_port: The base I/O port
4402 unsigned long io_port, u32 io_port_len, unsigned int irq)
4404 if (!request_region(io_port, io_port_len, DC395X_NAME)) {
4405 dprintkl(KERN_ERR, "Failed to reserve IO region 0x%lx\n", io_port);
4409 acb->io_port_base = io_port;
4421 check_eeprom(&acb->eeprom, io_port);