/drivers/ide/ |
H A D | ide-proc.c | 11 * Drive/Driver settings can be retrieved by reading the drive's 119 ide_drive_t *drive = (ide_drive_t *)m->private; local 122 if (!drive) { 130 if (taskfile_lib_get_identify(drive, buf) == 0) { 181 * @drive: drive to read from 182 * @setting: drive setting 184 * Read a drive setting and return the value. The caller 192 static int ide_read_setting(ide_drive_t *drive, argument 199 val = ds->get(drive); 222 ide_write_setting(ide_drive_t *drive, const struct ide_proc_devset *setting, int val) argument 239 set_xfer_rate(ide_drive_t *drive, int arg) argument 285 ide_drive_t *drive = (ide_drive_t *) m->private; local 336 ide_drive_t *drive = PDE_DATA(file_inode(file)); local 466 ide_drive_t *drive = (ide_drive_t *) m->private; local 491 ide_drive_t *drive = (ide_drive_t *) seq->private; local 513 ide_drive_t *drive = (ide_drive_t *)m->private; local 531 ide_replace_subdriver(ide_drive_t *drive, const char *driver) argument 561 ide_drive_t *drive = PDE_DATA(file_inode(file)); local 587 ide_drive_t *drive = (ide_drive_t *) m->private; local 647 ide_proc_register_driver(ide_drive_t *drive, struct ide_driver *driver) argument 669 ide_proc_unregister_driver(ide_drive_t *drive, struct ide_driver *driver) argument 687 ide_drive_t *drive; local 704 ide_proc_unregister_device(ide_drive_t *drive) argument [all...] |
H A D | cs5536.c | 92 static void cs5536_program_dtc(ide_drive_t *drive, u8 tim) argument 94 struct pci_dev *pdev = to_pci_dev(drive->hwif->dev); 95 int dshift = (drive->dn & 1) ? IDE_D1_SHIFT : IDE_D0_SHIFT; 129 * @drive: ATA device 132 static void cs5536_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) argument 147 ide_drive_t *pair = ide_get_pair_dev(drive); 148 int cshift = (drive->dn & 1) ? IDE_CAST_D1_SHIFT : IDE_CAST_D0_SHIFT; 149 unsigned long timings = (unsigned long)ide_get_drivedata(drive); 151 const u8 pio = drive->pio_mode - XFER_PIO_0; 159 ide_set_drivedata(drive, (voi 180 cs5536_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) argument 211 cs5536_dma_start(ide_drive_t *drive) argument 222 cs5536_dma_end(ide_drive_t *drive) argument [all...] |
H A D | it8172.c | 40 static void it8172_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) argument 45 const u8 pio = drive->pio_mode - XFER_PIO_0; 65 drive_enables &= drive->dn ? 0xc006 : 0xc060; 66 if (drive->media == ide_disk) 68 drive_enables |= 0x0004 << (drive->dn * 4); 69 if (ide_pio_need_iordy(drive, pio)) 71 drive_enables |= 0x0002 << (drive->dn * 4); 73 drive_timing &= drive->dn ? 0x00003f00 : 0x000fc000; 74 drive_timing |= timings[pio] << (drive->dn * 6 + 8); 80 static void it8172_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) argument [all...] |
H A D | ide-dma-sff.c | 11 * @drive: the drive to place in DMA mode 13 * If the drive supports at least mode 2 DMA or UDMA of any kind 17 * on the good/bad drive lists. 20 int config_drive_for_dma(ide_drive_t *drive) argument 22 ide_hwif_t *hwif = drive->hwif; 23 u16 *id = drive->id; 25 if (drive->media != ide_disk) { 31 * Enable DMA on any drive that has 39 * Enable DMA on any drive tha 82 ide_dma_host_set(ide_drive_t *drive, int on) argument 114 ide_build_dmatable(ide_drive_t *drive, struct ide_cmd *cmd) argument 187 ide_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd) argument 237 ide_dma_sff_timer_expiry(ide_drive_t *drive) argument 263 ide_dma_start(ide_drive_t *drive) argument 285 ide_dma_end(ide_drive_t *drive) argument 316 ide_dma_test_irq(ide_drive_t *drive) argument [all...] |
H A D | ide-taskfile.c | 27 void ide_tf_readback(ide_drive_t *drive, struct ide_cmd *cmd) argument 29 ide_hwif_t *hwif = drive->hwif; 35 tp_ops->tf_read(drive, &cmd->tf, cmd->valid.in.tf); 40 tp_ops->tf_read(drive, &cmd->hob, cmd->valid.in.hob); 57 int taskfile_lib_get_identify(ide_drive_t *drive, u8 *buf) argument 63 if (drive->media == ide_disk) 71 return ide_raw_taskfile(drive, &cmd, buf, 1); 78 ide_startstop_t do_rw_taskfile(ide_drive_t *drive, struct ide_cmd *orig_cmd) argument 80 ide_hwif_t *hwif = drive->hwif; 89 drive 148 task_no_data_intr(ide_drive_t *drive) argument 198 wait_drive_not_busy(ide_drive_t *drive) argument 223 ide_pio_bytes(ide_drive_t *drive, struct ide_cmd *cmd, unsigned int write, unsigned int len) argument 281 ide_pio_datablock(ide_drive_t *drive, struct ide_cmd *cmd, unsigned int write) argument 306 ide_error_cmd(ide_drive_t *drive, struct ide_cmd *cmd) argument 324 ide_finish_cmd(ide_drive_t *drive, struct ide_cmd *cmd, u8 stat) argument 344 task_pio_intr(ide_drive_t *drive) argument 403 pre_task_out_intr(ide_drive_t *drive, struct ide_cmd *cmd) argument 426 ide_raw_taskfile(ide_drive_t *drive, struct ide_cmd *cmd, u8 *buf, u16 nsect) argument 460 ide_no_data_taskfile(ide_drive_t *drive, struct ide_cmd *cmd) argument 469 ide_taskfile_ioctl(ide_drive_t *drive, unsigned long arg) argument [all...] |
H A D | trm290.c | 145 static void trm290_prepare_drive (ide_drive_t *drive, unsigned int use_dma) argument 147 ide_hwif_t *hwif = drive->hwif; 164 if (drive->dev_flags & IDE_DFLAG_PRESENT) { 174 static void trm290_dev_select(ide_drive_t *drive) argument 176 trm290_prepare_drive(drive, !!(drive->dev_flags & IDE_DFLAG_USING_DMA)); 178 outb(drive->select | ATA_DEVICE_OBS, drive->hwif->io_ports.device_addr); 181 static int trm290_dma_check(ide_drive_t *drive, struct ide_cmd *cmd) argument 192 static int trm290_dma_setup(ide_drive_t *drive, struc argument 209 trm290_dma_start(ide_drive_t *drive) argument 214 trm290_dma_end(ide_drive_t *drive) argument 223 trm290_dma_test_irq(ide_drive_t *drive) argument 230 trm290_dma_host_set(ide_drive_t *drive, int on) argument [all...] |
H A D | ns87415.c | 64 static void superio_tf_read(ide_drive_t *drive, struct ide_taskfile *tf, argument 67 struct ide_io_ports *io_ports = &drive->hwif->io_ports; 83 static void ns87415_dev_select(ide_drive_t *drive); 122 static void ns87415_prepare_drive (ide_drive_t *drive, unsigned int use_dma) argument 124 ide_hwif_t *hwif = drive->hwif; 135 if (drive->dev_flags & IDE_DFLAG_PRESENT) 140 /* Select PIO or DMA, DMA may only be selected for one drive/channel. */ 141 bit = 1 << (20 + (drive->dn & 1) + (hwif->channel << 1)); 142 other = 1 << (20 + (1 - (drive->dn & 1)) + (hwif->channel << 1)); 170 static void ns87415_dev_select(ide_drive_t *drive) argument 178 ns87415_dma_start(ide_drive_t *drive) argument 184 ns87415_dma_end(ide_drive_t *drive) argument [all...] |
H A D | sc1200.c | 81 static void sc1200_tunepio(ide_drive_t *drive, u8 pio) argument 83 ide_hwif_t *hwif = drive->hwif; 91 pci_write_config_dword(pdev, basereg + ((drive->dn & 1) << 3), 98 * different timings can still be chosen for each drive. We could 101 * by looking at our mate drive to see what it is capable of, before 102 * choosing a mode for our own drive. 104 static u8 sc1200_udma_filter(ide_drive_t *drive) argument 106 ide_hwif_t *hwif = drive->hwif; 107 ide_drive_t *mate = ide_get_pair_dev(drive); 126 static void sc1200_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) argument 171 sc1200_dma_end(ide_drive_t *drive) argument 197 sc1200_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) argument [all...] |
H A D | ide-disk_ioctl.c | 18 int ide_disk_ioctl(ide_drive_t *drive, struct block_device *bdev, fmode_t mode, argument 24 err = ide_setting_ioctl(drive, bdev, cmd, arg, ide_disk_ioctl_settings); 28 err = generic_ide_ioctl(drive, bdev, cmd, arg);
|
H A D | it821x.c | 83 u16 udma[2]; /* Cached UDMA values (per drive) */ 105 * @drive: drive to tune 112 static void it821x_program(ide_drive_t *drive, u16 timing) argument 114 ide_hwif_t *hwif = drive->hwif; 131 * @drive: drive to tune 134 * Program the UDMA timing for this drive according to the 138 static void it821x_program_udma(ide_drive_t *drive, u16 timing) argument 140 ide_hwif_t *hwif = drive 168 it821x_clock_strategy(ide_drive_t *drive) argument 239 it821x_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) argument 281 it821x_tune_mwdma(ide_drive_t *drive, u8 mode_wanted) argument 318 it821x_tune_udma(ide_drive_t *drive, u8 mode_wanted) argument 361 it821x_dma_start(ide_drive_t *drive) argument 383 it821x_dma_end(ide_drive_t *drive) argument 403 it821x_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) argument 442 it821x_quirkproc(ide_drive_t *drive) argument [all...] |
H A D | cs5520.c | 6 * typical IDE controllers they do bus mastering with the drive in 10 * drive for the right PIO mode. We must also ignore all the blacklists 11 * and the drive bus mastering DMA information. 60 static void cs5520_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) argument 63 int controller = drive->dn > 1 ? 1 : 0; 64 const u8 pio = drive->pio_mode - XFER_PIO_0; 75 pci_write_config_byte(pdev, 0x64 + 4*controller + (drive->dn&1), 79 pci_write_config_byte(pdev, 0x66 + 4*controller + (drive->dn&1), 84 static void cs5520_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) argument 88 drive [all...] |
H A D | pdc202xx_old.c | 24 static void pdc202xx_set_mode(ide_hwif_t *hwif, ide_drive_t *drive) argument 27 u8 drive_pci = 0x60 + (drive->dn << 2); 28 const u8 speed = drive->dma_mode; 61 if (ide_pio_need_iordy(drive, speed - XFER_PIO_0)) 63 if (drive->media == ide_disk) 79 static void pdc202xx_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) argument 81 drive->dma_mode = drive->pio_mode; 82 pdc202xx_set_mode(hwif, drive); 146 static void pdc202xx_dma_start(ide_drive_t *drive) argument 168 pdc202xx_dma_end(ide_drive_t *drive) argument [all...] |
H A D | ide-acpi.c | 201 * + _their_ children == drive objects */ 211 * do_drive_get_GTF - get the drive bootup default taskfile settings 212 * @drive: the drive for which the taskfile settings should be retrieved 225 static int do_drive_get_GTF(ide_drive_t *drive, argument 238 if (!drive->acpidata->obj_handle) { 239 DEBPRINT("No ACPI object found for %s\n", drive->name); 249 status = acpi_evaluate_object(drive->acpidata->obj_handle, "_GTF", 298 * do_drive_set_taskfiles - write the drive taskfile settings from _GTF 299 * @drive 306 do_drive_set_taskfiles(ide_drive_t *drive, unsigned int gtf_length, unsigned long gtf_address) argument 361 ide_acpi_exec_tfs(ide_drive_t *drive) argument 517 ide_drive_t *drive; local 567 ide_drive_t *drive; local [all...] |
H A D | sis5513.c | 187 static u8 sis_ata133_get_base(ide_drive_t *drive) argument 189 struct pci_dev *dev = to_pci_dev(drive->hwif->dev); 194 return ((reg54 & 0x40000000) ? 0x70 : 0x40) + drive->dn * 4; 197 static void sis_ata16_program_timings(ide_drive_t *drive, const u8 mode) argument 199 struct pci_dev *dev = to_pci_dev(drive->hwif->dev); 201 u8 drive_pci = 0x40 + drive->dn * 2; 220 static void sis_ata100_program_timings(ide_drive_t *drive, const u8 mode) argument 222 struct pci_dev *dev = to_pci_dev(drive->hwif->dev); 223 u8 t1, drive_pci = 0x40 + drive->dn * 2; 243 static void sis_ata133_program_timings(ide_drive_t *drive, cons argument 265 sis_program_timings(ide_drive_t *drive, const u8 mode) argument 275 config_drive_art_rwp(ide_drive_t *drive) argument 293 sis_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) argument 299 sis_ata133_program_udma_timings(ide_drive_t *drive, const u8 mode) argument 318 sis_ata33_program_udma_timings(ide_drive_t *drive, const u8 mode) argument 335 sis_program_udma_timings(ide_drive_t *drive, const u8 mode) argument 343 sis_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) argument 353 sis_ata133_udma_filter(ide_drive_t *drive) argument [all...] |
H A D | qd65xx.h | 34 static inline u8 QD_TIMING(ide_drive_t *drive) argument 36 return (unsigned long)ide_get_drivedata(drive) & 0x00ff; 39 static inline u8 QD_TIMREG(ide_drive_t *drive) argument 41 return ((unsigned long)ide_get_drivedata(drive) & 0xff00) >> 8;
|
H A D | tc86c001.c | 17 static void tc86c001_set_mode(ide_hwif_t *hwif, ide_drive_t *drive) argument 19 unsigned long scr_port = hwif->config_data + (drive->dn ? 0x02 : 0x00); 21 const u8 speed = drive->dma_mode; 45 static void tc86c001_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) argument 47 drive->dma_mode = drive->pio_mode; 48 tc86c001_set_mode(hwif, drive); 65 static int tc86c001_timer_expiry(ide_drive_t *drive) argument 67 ide_hwif_t *hwif = drive->hwif; 76 unsigned long twcr_port = sc_base + (drive 112 tc86c001_dma_start(ide_drive_t *drive) argument [all...] |
H A D | triflex.c | 37 static void triflex_set_mode(ide_hwif_t *hwif, ide_drive_t *drive) argument 42 u8 channel_offset = hwif->channel ? 0x74 : 0x70, unit = drive->dn & 1; 46 switch (drive->dma_mode) { 84 static void triflex_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) argument 86 drive->dma_mode = drive->pio_mode; 87 triflex_set_mode(hwif, drive);
|
H A D | it8213.c | 21 * @drive: drive 26 static void it8213_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) argument 29 int is_slave = drive->dn & 1; 37 const u8 pio = drive->pio_mode - XFER_PIO_0; 51 if (drive->media != ide_disk) 53 if (ide_pio_need_iordy(drive, pio)) 78 * @drive: drive 83 static void it8213_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) argument [all...] |
H A D | cs5535.c | 71 * @drive: Drive to set up 76 static void cs5535_set_speed(ide_drive_t *drive, const u8 speed) argument 79 u8 unit = drive->dn & 1; 83 ide_drive_t *pair = ide_get_pair_dev(drive); 95 /* Write the speed of the current drive */ 100 /* And if nessesary - change the speed of the other drive */ 133 * @drive: drive 138 static void cs5535_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) argument 140 cs5535_set_speed(drive, driv 151 cs5535_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) argument [all...] |
H A D | cy82c693.c | 56 static void cy82c693_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) argument 58 const u8 mode = drive->dma_mode; 83 static void cy82c693_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) argument 93 if (drive->dn > 1) { /* drive is on the secondary channel */ 98 drive->name); 103 ide_timing_compute(drive, drive->pio_mode, &t, T, 1); 111 if ((drive->dn & 1) == 0) { 113 * set master drive [all...] |
H A D | sgiioc4.c | 120 static int sgiioc4_clearirq(ide_drive_t *drive) argument 123 ide_hwif_t *hwif = drive->hwif; 160 __func__, drive->name, pci_stat_cmd_reg); 162 __func__, drive->name, 177 static void sgiioc4_dma_start(ide_drive_t *drive) argument 179 ide_hwif_t *hwif = drive->hwif; 203 static int sgiioc4_dma_end(ide_drive_t *drive) argument 206 ide_hwif_t *hwif = drive->hwif; 219 __func__, drive->name, ioc4_dma); 239 drive 258 sgiioc4_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) argument 263 sgiioc4_dma_test_irq(ide_drive_t *drive) argument 268 sgiioc4_dma_host_set(ide_drive_t *drive, int on) argument 274 sgiioc4_resetproc(ide_drive_t *drive) argument 283 sgiioc4_dma_lost_irq(ide_drive_t *drive) argument 357 sgiioc4_configure_for_dma(int dma_direction, ide_drive_t *drive) argument 414 sgiioc4_build_dmatable(ide_drive_t *drive, struct ide_cmd *cmd) argument 472 sgiioc4_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd) argument [all...] |
/drivers/gpu/drm/nouveau/core/subdev/i2c/ |
H A D | nv04.c | 35 u8 drive; member in struct:nv04_i2c_port 44 u8 val = nv_rdvgac(priv, 0, port->drive); 47 nv_wrvgac(priv, 0, port->drive, val | 0x01); 55 u8 val = nv_rdvgac(priv, 0, port->drive); 58 nv_wrvgac(priv, 0, port->drive, val | 0x01); 101 port->drive = info->drive;
|
/drivers/block/ |
H A D | ataflop.c | 11 * - Disk change detection and drive deselecting after motor-off 14 * don't have an HD drive :-( 19 * - Removed drive type (unknown on atari) 42 * - Let user set max. supported drive type (speeds up format 97 { "D360", 9, 720, 0, 1}, /* 1: 360kb in 720k or 1.2MB drive */ 98 { "D720", 9,1440, 0, 0}, /* 2: 720kb in 720k or 1.2MB drive */ 195 * MSch: User-provided type information. 'drive' points to 201 * User-provided permanent type information. 'drive' points to 210 int connected; /* !=0 : drive is connected */ 226 #define UD unit[drive] 520 static int drive = 0; local 646 do_format(int drive, int type, struct atari_format_descr *desc) argument 1332 unsigned int drive = p - unit; local 1354 unsigned int drive = p - unit; local 1423 int drive, type; local 1514 int drive = floppy - unit; local 1800 int drive, cnt = 0; local 1913 int drive = *part & 3; local [all...] |
H A D | floppy.c | 240 * motor of these drives causes system hangs on some PCI computers. drive 241 * 0 is the low bit (0x1), and drive 7 is the high bit (0x80). Bits are on if 242 * a drive is allowed. 298 #define UNIT(x) ((x) & 0x03) /* drive on fdc */ 299 #define FDC(x) (((x) & 0x04) >> 2) /* fdc of drive */ 300 /* reverse mapping from unit and fdc to drive */ 308 #define UDP (&drive_params[drive]) 309 #define UDRS (&drive_state[drive]) 310 #define UDRWE (&write_errors[drive]) 311 #define UFDCS (&fdc_state[FDC(drive)]) 601 drive_no_geom(int drive) argument 607 fd_eject(int drive) argument 669 __reschedule_timeout(int drive, const char *message) argument 688 reschedule_timeout(int drive, const char *message) argument 733 disk_change(int drive) argument 792 unsigned char drive; local 836 int drive; local 848 set_fdc(int drive) argument 869 lock_fdc(int drive, bool interruptible) argument 909 floppy_off(unsigned int drive) argument 939 int drive; local 2058 set_floppy(int drive) argument 2172 do_format(int drive, struct format_descr *tmp_format_req) argument 2208 unsigned int drive = (unsigned long)req->rq_disk->private_data; local 2818 int drive; local 2959 user_reset_fdc(int drive, int arg, bool interruptible) argument 2994 drive_name(int type, int drive) argument 3175 int drive; local 3230 set_geometry(unsigned int cmd, struct floppy_struct *g, int drive, int type, struct block_device *bdev) argument 3347 get_floppy_geometry(int drive, int type, struct floppy_struct **g) argument 3366 int drive = (long)bdev->bd_disk->private_data; local 3384 int drive = (long)bdev->bd_disk->private_data; local 3572 int drive; local 3623 int drive = (long)disk->private_data; local 3644 int drive = (long)bdev->bd_disk->private_data; local 3743 int drive = (long)disk->private_data; local 3770 int drive; member in struct:rb0_cbdata 3777 int drive = cbdata->drive; local 3786 __floppy_read_block_0(struct block_device *bdev, int drive) argument 3836 int drive = (long)disk->private_data; local 4107 int drive; local 4144 floppy_available(int drive) argument 4155 int drive = (*part & 3) | ((*part & 0x80) >> 5); local 4166 int i, unit, drive, err; local 4507 int drive; local 4584 int drive; local [all...] |
/drivers/gpu/drm/nouveau/core/subdev/bios/ |
H A D | i2c.c | 83 info->drive = nv_ro08(bios, ent + 0); 87 info->drive = nv_ro08(bios, ent + 1); 91 info->drive = nv_ro08(bios, ent + 0) & 0x0f; 116 info->drive = nv_ro08(bios, ent + 4); 117 if (!info->drive) info->drive = 0x3f; 122 info->drive = nv_ro08(bios, ent + 6); 123 if (!info->drive) info->drive = 0x37;
|