Home
last modified time | relevance | path

Searched refs:hwif (Results 1 – 25 of 76) sorted by relevance

1234

/drivers/ide/
Dide-probe.c192 ide_hwif_t *hwif = drive->hwif; in do_identify() local
201 hwif->tp_ops->input_data(drive, NULL, id, SECTOR_SIZE); in do_identify()
269 ide_hwif_t *hwif = drive->hwif; in actual_try_to_identify() local
270 struct ide_io_ports *io_ports = &hwif->io_ports; in actual_try_to_identify()
271 const struct ide_tp_ops *tp_ops = hwif->tp_ops; in actual_try_to_identify()
280 (hwif->host_flags & IDE_HFLAG_BROKEN_ALTSTATUS) == 0) { in actual_try_to_identify()
281 a = tp_ops->read_altstatus(hwif); in actual_try_to_identify()
282 s = tp_ops->read_status(hwif); in actual_try_to_identify()
307 tp_ops->exec_command(hwif, cmd); in actual_try_to_identify()
311 if (ide_busy_sleep(hwif, timeout, use_altstatus)) in actual_try_to_identify()
[all …]
Dide-dma-sff.c21 ide_hwif_t *hwif = drive->hwif; in config_drive_for_dma() local
25 if (hwif->host_flags & IDE_HFLAG_NO_ATAPI_DMA) in config_drive_for_dma()
53 u8 ide_dma_sff_read_status(ide_hwif_t *hwif) in ide_dma_sff_read_status() argument
55 unsigned long addr = hwif->dma_base + ATA_DMA_STATUS; in ide_dma_sff_read_status()
57 if (hwif->host_flags & IDE_HFLAG_MMIO) in ide_dma_sff_read_status()
64 static void ide_dma_sff_write_status(ide_hwif_t *hwif, u8 val) in ide_dma_sff_write_status() argument
66 unsigned long addr = hwif->dma_base + ATA_DMA_STATUS; in ide_dma_sff_write_status()
68 if (hwif->host_flags & IDE_HFLAG_MMIO) in ide_dma_sff_write_status()
84 ide_hwif_t *hwif = drive->hwif; in ide_dma_host_set() local
86 u8 dma_stat = hwif->dma_ops->dma_sff_read_status(hwif); in ide_dma_host_set()
[all …]
Dide-dma.c91 ide_hwif_t *hwif = drive->hwif; in ide_dma_intr() local
94 dma_stat = hwif->dma_ops->dma_end(drive); in ide_dma_intr()
95 stat = hwif->tp_ops->read_status(hwif); in ide_dma_intr()
99 struct request *rq = hwif->rq; in ide_dma_intr()
129 ide_hwif_t *hwif = drive->hwif; in ide_build_sglist() local
130 struct scatterlist *sg = hwif->sg_table; in ide_build_sglist()
136 hwif->sg_dma_direction = DMA_FROM_DEVICE; in ide_build_sglist()
138 hwif->sg_dma_direction = DMA_TO_DEVICE; in ide_build_sglist()
140 i = dma_map_sg(hwif->dev, sg, hwif->sg_nents, hwif->sg_dma_direction); in ide_build_sglist()
142 hwif->orig_sg_nents = hwif->sg_nents; in ide_build_sglist()
[all …]
Dide-io.c91 drive->hwif->rq = NULL; in __ide_end_request()
110 struct request *rq = drive->hwif->rq; in ide_end_request()
163 ide_hwif_t *hwif = drive->hwif; in ide_end_drive_cmd() local
164 struct request *rq = hwif->rq; in ide_end_drive_cmd()
175 drive->hwif->tp_ops->tf_read(drive, task); in ide_end_drive_cmd()
189 hwif->rq = NULL; in ide_end_drive_cmd()
212 ide_hwif_t *hwif = drive->hwif; in ide_ata_error() local
223 hwif->tp_ops->read_status(hwif) == ATA_CMD_INIT_DEV_PARAMS) in ide_ata_error()
238 (hwif->host_flags & IDE_HFLAG_ERROR_STOPS_FIFO) == 0) { in ide_ata_error()
249 if (hwif->tp_ops->read_status(hwif) & (ATA_BUSY | ATA_DRQ)) in ide_ata_error()
[all …]
Dide-iops.c60 ide_hwif_t *hwif = drive->hwif; in SELECT_DRIVE() local
61 const struct ide_port_ops *port_ops = hwif->port_ops; in SELECT_DRIVE()
70 drive->hwif->tp_ops->tf_load(drive, &task); in SELECT_DRIVE()
75 const struct ide_port_ops *port_ops = drive->hwif->port_ops; in SELECT_MASK()
81 void ide_exec_command(ide_hwif_t *hwif, u8 cmd) in ide_exec_command() argument
83 if (hwif->host_flags & IDE_HFLAG_MMIO) in ide_exec_command()
84 writeb(cmd, (void __iomem *)hwif->io_ports.command_addr); in ide_exec_command()
86 outb(cmd, hwif->io_ports.command_addr); in ide_exec_command()
90 u8 ide_read_status(ide_hwif_t *hwif) in ide_read_status() argument
92 if (hwif->host_flags & IDE_HFLAG_MMIO) in ide_read_status()
[all …]
Dtrm290.c147 ide_hwif_t *hwif = drive->hwif; in trm290_prepare_drive() local
156 if (reg != hwif->select_data) { in trm290_prepare_drive()
157 hwif->select_data = reg; in trm290_prepare_drive()
159 outb(0x51 | (hwif->channel << 3), hwif->config_data + 1); in trm290_prepare_drive()
160 outw(reg & 0xff, hwif->config_data); in trm290_prepare_drive()
165 reg = inw(hwif->config_data + 3); in trm290_prepare_drive()
167 reg &= ~(1 << hwif->channel); in trm290_prepare_drive()
168 outw(reg, hwif->config_data + 3); in trm290_prepare_drive()
186 ide_hwif_t *hwif = drive->hwif; in trm290_dma_setup() local
187 struct request *rq = hwif->rq; in trm290_dma_setup()
[all …]
Dide-acpi.c41 ide_hwif_t *hwif; member
173 static acpi_handle ide_acpi_hwif_get_handle(ide_hwif_t *hwif) in ide_acpi_hwif_get_handle() argument
175 struct device *dev = hwif->gendev.parent; in ide_acpi_hwif_get_handle()
181 DEBPRINT("ENTER: device %s\n", hwif->name); in ide_acpi_hwif_get_handle()
184 DEBPRINT("no PCI device for %s\n", hwif->name); in ide_acpi_hwif_get_handle()
197 chan_handle = acpi_get_child(dev_handle, hwif->channel); in ide_acpi_hwif_get_handle()
199 hwif->channel, chan_handle); in ide_acpi_hwif_get_handle()
215 ide_hwif_t *hwif = drive->hwif; in ide_acpi_drive_get_handle() local
219 if (!hwif->acpidata) in ide_acpi_drive_get_handle()
222 if (!hwif->acpidata->obj_handle) in ide_acpi_drive_get_handle()
[all …]
Dns87415.c54 static u8 superio_read_status(ide_hwif_t *hwif) in superio_read_status() argument
56 return superio_ide_inb(hwif->io_ports.status_addr); in superio_read_status()
59 static u8 superio_dma_sff_read_status(ide_hwif_t *hwif) in superio_dma_sff_read_status() argument
61 return superio_ide_inb(hwif->dma_base + ATA_DMA_STATUS); in superio_dma_sff_read_status()
66 struct ide_io_ports *io_ports = &drive->hwif->io_ports; in superio_tf_read()
122 static void __devinit superio_init_iops(struct hwif_s *hwif) in superio_init_iops() argument
124 struct pci_dev *pdev = to_pci_dev(hwif->dev); in superio_init_iops()
126 u8 port = hwif->channel, tmp; in superio_init_iops()
147 ide_hwif_t *hwif = drive->hwif; in ns87415_prepare_drive() local
148 struct pci_dev *dev = to_pci_dev(hwif->dev); in ns87415_prepare_drive()
[all …]
Dsiimage.c77 static inline int is_sata(ide_hwif_t *hwif) in is_sata() argument
79 return pdev_is_sata(to_pci_dev(hwif->dev)); in is_sata()
93 static unsigned long siimage_selreg(ide_hwif_t *hwif, int r) in siimage_selreg() argument
95 unsigned long base = (unsigned long)hwif->hwif_data; in siimage_selreg()
98 if (hwif->host_flags & IDE_HFLAG_MMIO) in siimage_selreg()
99 base += hwif->channel << 6; in siimage_selreg()
101 base += hwif->channel << 4; in siimage_selreg()
117 ide_hwif_t *hwif = drive->hwif; in siimage_seldev() local
118 unsigned long base = (unsigned long)hwif->hwif_data; in siimage_seldev()
122 if (hwif->host_flags & IDE_HFLAG_MMIO) in siimage_seldev()
[all …]
Dscc_pata.c128 static void scc_exec_command(ide_hwif_t *hwif, u8 cmd) in scc_exec_command() argument
130 out_be32((void *)hwif->io_ports.command_addr, cmd); in scc_exec_command()
132 in_be32((void *)(hwif->dma_base + 0x01c)); in scc_exec_command()
136 static u8 scc_read_status(ide_hwif_t *hwif) in scc_read_status() argument
138 return (u8)in_be32((void *)hwif->io_ports.status_addr); in scc_read_status()
141 static u8 scc_read_altstatus(ide_hwif_t *hwif) in scc_read_altstatus() argument
143 return (u8)in_be32((void *)hwif->io_ports.ctl_addr); in scc_read_altstatus()
146 static u8 scc_dma_sff_read_status(ide_hwif_t *hwif) in scc_dma_sff_read_status() argument
148 return (u8)in_be32((void *)(hwif->dma_base + 4)); in scc_dma_sff_read_status()
151 static void scc_set_irq(ide_hwif_t *hwif, int on) in scc_set_irq() argument
[all …]
Dtx4939ide.c103 #define TX4939IDE_BASE(hwif) ((void __iomem *)(hwif)->extra_base) argument
107 ide_hwif_t *hwif = drive->hwif; in tx4939ide_set_pio_mode() local
122 hwif->select_data = (hwif->select_data & ~mask) | val; in tx4939ide_set_pio_mode()
128 ide_hwif_t *hwif = drive->hwif; in tx4939ide_set_dma_mode() local
143 hwif->select_data = (hwif->select_data & ~mask) | val; in tx4939ide_set_dma_mode()
147 static u16 tx4939ide_check_error_ints(ide_hwif_t *hwif) in tx4939ide_check_error_ints() argument
149 void __iomem *base = TX4939IDE_BASE(hwif); in tx4939ide_check_error_ints()
165 hwif->name, ctl, in tx4939ide_check_error_ints()
174 ide_hwif_t *hwif; in tx4939ide_clear_irq() local
184 hwif = drive->hwif; in tx4939ide_clear_irq()
[all …]
Dsgiioc4.c109 sgiioc4_checkirq(ide_hwif_t * hwif) in sgiioc4_checkirq() argument
112 hwif->io_ports.irq_addr + IOC4_INTR_REG * 4; in sgiioc4_checkirq()
126 ide_hwif_t *hwif = drive->hwif; in sgiioc4_clearirq() local
127 struct ide_io_ports *io_ports = &hwif->io_ports; in sgiioc4_clearirq()
140 u8 stat = sgiioc4_read_status(hwif); in sgiioc4_clearirq()
143 stat = sgiioc4_read_status(hwif); in sgiioc4_clearirq()
146 stat = sgiioc4_read_status(hwif); in sgiioc4_clearirq()
150 struct pci_dev *dev = to_pci_dev(hwif->dev); in sgiioc4_clearirq()
184 ide_hwif_t *hwif = drive->hwif; in sgiioc4_dma_start() local
185 unsigned long ioc4_dma_addr = hwif->dma_base + IOC4_DMA_CTRL * 4; in sgiioc4_dma_start()
[all …]
Dit821x.c113 ide_hwif_t *hwif = drive->hwif; in it821x_program() local
114 struct pci_dev *dev = to_pci_dev(hwif->dev); in it821x_program()
115 struct it821x_dev *itdev = ide_get_hwifdata(hwif); in it821x_program()
116 int channel = hwif->channel; in it821x_program()
139 ide_hwif_t *hwif = drive->hwif; in it821x_program_udma() local
140 struct pci_dev *dev = to_pci_dev(hwif->dev); in it821x_program_udma()
141 struct it821x_dev *itdev = ide_get_hwifdata(hwif); in it821x_program_udma()
142 int channel = hwif->channel; in it821x_program_udma()
169 ide_hwif_t *hwif = drive->hwif; in it821x_clock_strategy() local
170 struct pci_dev *dev = to_pci_dev(hwif->dev); in it821x_clock_strategy()
[all …]
Dtc86c001.c18 ide_hwif_t *hwif = drive->hwif; in tc86c001_set_mode() local
19 unsigned long scr_port = hwif->config_data + (drive->dn ? 0x02 : 0x00); in tc86c001_set_mode()
65 ide_hwif_t *hwif = drive->hwif; in tc86c001_timer_expiry() local
66 ide_expiry_t *expiry = ide_get_hwifdata(hwif); in tc86c001_timer_expiry()
67 u8 dma_stat = inb(hwif->dma_base + ATA_DMA_STATUS); in tc86c001_timer_expiry()
70 hwif->expiry = expiry; in tc86c001_timer_expiry()
73 unsigned long sc_base = hwif->config_data; in tc86c001_timer_expiry()
75 u8 dma_cmd = inb(hwif->dma_base + ATA_DMA_CMD); in tc86c001_timer_expiry()
81 outb(dma_cmd & ~0x01, hwif->dma_base + ATA_DMA_CMD); in tc86c001_timer_expiry()
90 outb(0x00, hwif->dma_base + ATA_DMA_CMD); in tc86c001_timer_expiry()
[all …]
Dcmd64x.c72 struct pci_dev *dev = to_pci_dev(drive->hwif->dev); in program_cycle_times()
118 ide_hwif_t *hwif = drive->hwif; in cmd64x_tune_pio() local
119 struct pci_dev *dev = to_pci_dev(hwif->dev); in cmd64x_tune_pio()
140 if (hwif->channel) { in cmd64x_tune_pio()
158 if (hwif->channel) in cmd64x_tune_pio()
185 ide_hwif_t *hwif = drive->hwif; in cmd64x_set_dma_mode() local
186 struct pci_dev *dev = to_pci_dev(hwif->dev); in cmd64x_set_dma_mode()
188 u8 regU = 0, pciU = hwif->channel ? UDIDETCR1 : UDIDETCR0; in cmd64x_set_dma_mode()
231 ide_hwif_t *hwif = drive->hwif; in cmd648_dma_end() local
232 unsigned long base = hwif->dma_base - (hwif->channel * 8); in cmd648_dma_end()
[all …]
Dpdc202xx_old.c42 ide_hwif_t *hwif = drive->hwif; in pdc202xx_set_mode() local
43 struct pci_dev *dev = to_pci_dev(hwif->dev); in pdc202xx_set_mode()
58 pdc_old_disable_66MHz_clock(hwif); in pdc202xx_set_mode()
119 static u8 pdc2026x_cable_detect(ide_hwif_t *hwif) in pdc2026x_cable_detect() argument
121 struct pci_dev *dev = to_pci_dev(hwif->dev); in pdc2026x_cable_detect()
122 u16 CIS, mask = hwif->channel ? (1 << 11) : (1 << 10); in pdc2026x_cable_detect()
138 static void pdc_old_enable_66MHz_clock(ide_hwif_t *hwif) in pdc_old_enable_66MHz_clock() argument
140 unsigned long clock_reg = hwif->extra_base + 0x01; in pdc_old_enable_66MHz_clock()
143 outb(clock | (hwif->channel ? 0x08 : 0x02), clock_reg); in pdc_old_enable_66MHz_clock()
146 static void pdc_old_disable_66MHz_clock(ide_hwif_t *hwif) in pdc_old_disable_66MHz_clock() argument
[all …]
Dide-taskfile.c61 ide_hwif_t *hwif = drive->hwif; in do_rw_taskfile() local
64 const struct ide_tp_ops *tp_ops = hwif->tp_ops; in do_rw_taskfile()
65 const struct ide_dma_ops *dma_ops = hwif->dma_ops; in do_rw_taskfile()
79 memcpy(&hwif->task, task, sizeof(*task)); in do_rw_taskfile()
83 tp_ops->set_irq(hwif, 1); in do_rw_taskfile()
91 tp_ops->exec_command(hwif, tf->command); in do_rw_taskfile()
120 ide_hwif_t *hwif = drive->hwif; in task_no_data_intr() local
121 ide_task_t *task = &hwif->task; in task_no_data_intr()
130 stat = hwif->tp_ops->read_status(hwif); in task_no_data_intr()
156 hwif->tp_ops->tf_read(drive, task); in task_no_data_intr()
[all …]
Dhpt366.c629 ide_hwif_t *hwif = drive->hwif; in hpt3xx_udma_filter() local
630 struct hpt_info *info = hpt3xx_get_info(hwif->dev); in hpt3xx_udma_filter()
631 u8 mask = hwif->ultra_mask; in hpt3xx_udma_filter()
668 ide_hwif_t *hwif = drive->hwif; in hpt3xx_mdma_filter() local
669 struct hpt_info *info = hpt3xx_get_info(hwif->dev); in hpt3xx_mdma_filter()
703 ide_hwif_t *hwif = drive->hwif; in hpt3xx_set_mode() local
704 struct pci_dev *dev = to_pci_dev(hwif->dev); in hpt3xx_set_mode()
705 struct hpt_info *info = hpt3xx_get_info(hwif->dev); in hpt3xx_set_mode()
746 ide_hwif_t *hwif = drive->hwif; in hpt3xx_maskproc() local
747 struct pci_dev *dev = to_pci_dev(hwif->dev); in hpt3xx_maskproc()
[all …]
Dalim15x3.c71 ide_hwif_t *hwif = drive->hwif; in ali_set_pio_mode() local
72 struct pci_dev *dev = to_pci_dev(hwif->dev); in ali_set_pio_mode()
78 int port = hwif->channel ? 0x5c : 0x58; in ali_set_pio_mode()
79 int portFIFO = hwif->channel ? 0x55 : 0x54; in ali_set_pio_mode()
140 return drive->hwif->ultra_mask; in ali_udma_filter()
153 ide_hwif_t *hwif = drive->hwif; in ali_set_dma_mode() local
154 struct pci_dev *dev = to_pci_dev(hwif->dev); in ali_set_dma_mode()
158 int m5229_udma = (hwif->channel) ? 0x57 : 0x56; in ali_set_dma_mode()
201 if (rq_data_dir(drive->hwif->rq)) in ali15x3_dma_setup()
372 static u8 ali_cable_detect(ide_hwif_t *hwif) in ali_cable_detect() argument
[all …]
Dide-lib.c61 ide_hwif_t *hwif = drive->hwif; in ide_rate_filter() local
65 if (hwif->pio_mask) in ide_rate_filter()
66 mode = fls(hwif->pio_mask) - 1 + XFER_PIO_0; in ide_rate_filter()
97 if ((drive->hwif->host_flags & IDE_HFLAG_PIO_NO_BLACKLIST) == 0) in ide_get_best_pio_mode()
138 ide_hwif_t *hwif = drive->hwif; in ide_set_pio() local
139 const struct ide_port_ops *port_ops = hwif->port_ops; in ide_set_pio()
143 (hwif->host_flags & IDE_HFLAG_NO_SET_MODE)) in ide_set_pio()
146 BUG_ON(hwif->pio_mask == 0x00); in ide_set_pio()
148 host_pio = fls(hwif->pio_mask) - 1; in ide_set_pio()
181 struct device *dev = drive->hwif->dev; in ide_toggle_bounce()
[all …]
Dpiix.c70 ide_hwif_t *hwif = drive->hwif; in piix_set_pio_mode() local
71 struct pci_dev *dev = to_pci_dev(hwif->dev); in piix_set_pio_mode()
73 int master_port = hwif->channel ? 0x42 : 0x40; in piix_set_pio_mode()
111 slave_data &= hwif->channel ? 0x0f : 0xf0; in piix_set_pio_mode()
113 (hwif->channel ? 4 : 0); in piix_set_pio_mode()
139 ide_hwif_t *hwif = drive->hwif; in piix_set_dma_mode() local
140 struct pci_dev *dev = to_pci_dev(hwif->dev); in piix_set_dma_mode()
141 u8 maslave = hwif->channel ? 0x42 : 0x40; in piix_set_dma_mode()
227 ide_hwif_t *hwif = drive->hwif; in ich_clear_irq() local
235 if (drive->waiting_for_dma || hwif->dma_base == 0) in ich_clear_irq()
[all …]
Dpdc202xx_new.c83 static u8 get_indexed_reg(ide_hwif_t *hwif, u8 index) in get_indexed_reg() argument
87 outb(index, hwif->dma_base + 1); in get_indexed_reg()
88 value = inb(hwif->dma_base + 3); in get_indexed_reg()
99 static void set_indexed_reg(ide_hwif_t *hwif, u8 index, u8 value) in set_indexed_reg() argument
101 outb(index, hwif->dma_base + 1); in set_indexed_reg()
102 outb(value, hwif->dma_base + 3); in set_indexed_reg()
146 ide_hwif_t *hwif = drive->hwif; in pdcnew_set_dma_mode() local
147 struct pci_dev *dev = to_pci_dev(hwif->dev); in pdcnew_set_dma_mode()
162 set_indexed_reg(hwif, 0x10 + adj, in pdcnew_set_dma_mode()
164 set_indexed_reg(hwif, 0x11 + adj, in pdcnew_set_dma_mode()
[all …]
Dsetup-pci.c79 unsigned long ide_pci_dma_base(ide_hwif_t *hwif, const struct ide_port_info *d) in ide_pci_dma_base() argument
81 struct pci_dev *dev = to_pci_dev(hwif->dev); in ide_pci_dma_base()
84 if (hwif->host_flags & IDE_HFLAG_MMIO) in ide_pci_dma_base()
85 return hwif->dma_base; in ide_pci_dma_base()
87 if (hwif->mate && hwif->mate->dma_base) { in ide_pci_dma_base()
88 dma_base = hwif->mate->dma_base - (hwif->channel ? 0 : 8); in ide_pci_dma_base()
101 if (hwif->channel) in ide_pci_dma_base()
108 int ide_pci_check_simplex(ide_hwif_t *hwif, const struct ide_port_info *d) in ide_pci_check_simplex() argument
110 struct pci_dev *dev = to_pci_dev(hwif->dev); in ide_pci_check_simplex()
117 if (ide_pci_clear_simplex(hwif->dma_base, d->name)) in ide_pci_check_simplex()
[all …]
Dpmac.c412 ((void __iomem *)((drive)->hwif->io_ports.data_addr + (x)))
422 ide_hwif_t *hwif = drive->hwif; in pmac_ide_selectproc() local
424 (pmac_ide_hwif_t *)dev_get_drvdata(hwif->gendev.parent); in pmac_ide_selectproc()
441 ide_hwif_t *hwif = drive->hwif; in pmac_ide_kauai_selectproc() local
443 (pmac_ide_hwif_t *)dev_get_drvdata(hwif->gendev.parent); in pmac_ide_kauai_selectproc()
461 ide_hwif_t *hwif = drive->hwif; in pmac_ide_do_update_timings() local
463 (pmac_ide_hwif_t *)dev_get_drvdata(hwif->gendev.parent); in pmac_ide_do_update_timings()
473 static void pmac_exec_command(ide_hwif_t *hwif, u8 cmd) in pmac_exec_command() argument
475 writeb(cmd, (void __iomem *)hwif->io_ports.command_addr); in pmac_exec_command()
476 (void)readl((void __iomem *)(hwif->io_ports.data_addr in pmac_exec_command()
[all …]
Dsc1200.c82 ide_hwif_t *hwif = drive->hwif; in sc1200_tunepio() local
83 struct pci_dev *pdev = to_pci_dev(hwif->dev); in sc1200_tunepio()
84 unsigned int basereg = hwif->channel ? 0x50 : 0x40, format = 0; in sc1200_tunepio()
105 ide_hwif_t *hwif = drive->hwif; in sc1200_udma_filter() local
108 u8 mask = hwif->ultra_mask; in sc1200_udma_filter()
128 ide_hwif_t *hwif = drive->hwif; in sc1200_set_dma_mode() local
129 struct pci_dev *dev = to_pci_dev(hwif->dev); in sc1200_set_dma_mode()
132 unsigned int basereg = hwif->channel ? 0x50 : 0x40; in sc1200_set_dma_mode()
173 ide_hwif_t *hwif = drive->hwif; in sc1200_dma_end() local
174 unsigned long dma_base = hwif->dma_base; in sc1200_dma_end()
[all …]

1234