ide: turn selectproc() method into dev_select() method (take 5)
Turn selectproc() method into dev_select() method by teaching it to write to the device register and moving it from 'struct ide_port_ops' to 'struct ide_tp_ops'. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: benh@kernel.crashing.org Cc: petkovbb@gmail.com [bart: add ->dev_select to at91_ide.c and tx4939.c (__BIG_ENDIAN case)] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
parent
0f861e8c47
commit
abb596b25e
17 changed files with 139 additions and 48 deletions
|
@ -603,7 +603,7 @@ struct ide_drive_s {
|
|||
|
||||
unsigned int bios_cyl; /* BIOS/fdisk/LILO number of cyls */
|
||||
unsigned int cyl; /* "real" number of cyls */
|
||||
unsigned int drive_data; /* used by set_pio_mode/selectproc */
|
||||
unsigned int drive_data; /* used by set_pio_mode/dev_select() */
|
||||
unsigned int failures; /* current failure count */
|
||||
unsigned int max_failures; /* maximum allowed failure count */
|
||||
u64 probed_capacity;/* initial reported media capacity (ide-cd only currently) */
|
||||
|
@ -661,6 +661,7 @@ struct ide_tp_ops {
|
|||
u8 (*read_altstatus)(struct hwif_s *);
|
||||
void (*write_devctl)(struct hwif_s *, u8);
|
||||
|
||||
void (*dev_select)(ide_drive_t *);
|
||||
void (*tf_load)(ide_drive_t *, struct ide_cmd *);
|
||||
void (*tf_read)(ide_drive_t *, struct ide_cmd *);
|
||||
|
||||
|
@ -678,7 +679,6 @@ extern const struct ide_tp_ops default_tp_ops;
|
|||
* @init_dev: host specific initialization of a device
|
||||
* @set_pio_mode: routine to program host for PIO mode
|
||||
* @set_dma_mode: routine to program host for DMA mode
|
||||
* @selectproc: tweaks hardware to select drive
|
||||
* @reset_poll: chipset polling based on hba specifics
|
||||
* @pre_reset: chipset specific changes to default for device-hba resets
|
||||
* @resetproc: routine to reset controller after a disk reset
|
||||
|
@ -695,7 +695,6 @@ struct ide_port_ops {
|
|||
void (*init_dev)(ide_drive_t *);
|
||||
void (*set_pio_mode)(ide_drive_t *, const u8);
|
||||
void (*set_dma_mode)(ide_drive_t *, const u8);
|
||||
void (*selectproc)(ide_drive_t *);
|
||||
int (*reset_poll)(ide_drive_t *);
|
||||
void (*pre_reset)(ide_drive_t *);
|
||||
void (*resetproc)(ide_drive_t *);
|
||||
|
@ -1170,6 +1169,7 @@ u8 ide_read_status(ide_hwif_t *);
|
|||
u8 ide_read_altstatus(ide_hwif_t *);
|
||||
void ide_write_devctl(ide_hwif_t *, u8);
|
||||
|
||||
void ide_dev_select(ide_drive_t *);
|
||||
void ide_tf_load(ide_drive_t *, struct ide_cmd *);
|
||||
void ide_tf_read(ide_drive_t *, struct ide_cmd *);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue