diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-24 18:22:46 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-24 18:22:46 -0400 |
commit | 7eeaaaa52285d5e6cb79f515e99c591dcb9d04fe (patch) | |
tree | 02513d82b19d9b00faaf268ce60a312cbe3a1389 /include/linux/ide.h | |
parent | 11938c929022bb92b1a42f5e1289524a1e465dc0 (diff) |
ide: move xfer mode tuning code to ide-xfer-mode.c
* Move xfer mode tuning code to ide-xfer-mode.c.
* Add CONFIG_IDE_XFER_MODE config option to be selected by host drivers
that support xfer mode tuning.
* Add CONFIG_IDE_XFER_MODE=n static inline versions of ide_set_pio()
and ide_set_xfer_rate().
* Make IDE_TIMINGS and BLK_DEV_IDEDMA config options select IDE_XFER_MODE,
also add explicit selects for few host drivers that need it.
* Build/link ide-xfer-mode.o and ide-pio-blacklist.o (it is needed only
by ide-xfer-mode.o) only if CONFIG_IDE_XFER_MODE=y.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r-- | include/linux/ide.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h index eca5082c3437..323c3710fbf4 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1531,9 +1531,7 @@ static inline void ide_set_hwifdata (ide_hwif_t * hwif, void *data) | |||
1531 | hwif->hwif_data = data; | 1531 | hwif->hwif_data = data; |
1532 | } | 1532 | } |
1533 | 1533 | ||
1534 | const char *ide_xfer_verbose(u8 mode); | ||
1535 | extern void ide_toggle_bounce(ide_drive_t *drive, int on); | 1534 | extern void ide_toggle_bounce(ide_drive_t *drive, int on); |
1536 | extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); | ||
1537 | 1535 | ||
1538 | u64 ide_get_lba_addr(struct ide_taskfile *, int); | 1536 | u64 ide_get_lba_addr(struct ide_taskfile *, int); |
1539 | u8 ide_dump_status(ide_drive_t *, const char *, u8); | 1537 | u8 ide_dump_status(ide_drive_t *, const char *, u8); |
@@ -1572,14 +1570,18 @@ void ide_timing_merge(struct ide_timing *, struct ide_timing *, | |||
1572 | struct ide_timing *, unsigned int); | 1570 | struct ide_timing *, unsigned int); |
1573 | int ide_timing_compute(ide_drive_t *, u8, struct ide_timing *, int, int); | 1571 | int ide_timing_compute(ide_drive_t *, u8, struct ide_timing *, int, int); |
1574 | 1572 | ||
1573 | #ifdef CONFIG_IDE_XFER_MODE | ||
1575 | int ide_scan_pio_blacklist(char *); | 1574 | int ide_scan_pio_blacklist(char *); |
1576 | 1575 | const char *ide_xfer_verbose(u8); | |
1577 | u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8); | 1576 | u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8); |
1578 | |||
1579 | int ide_set_pio_mode(ide_drive_t *, u8); | 1577 | int ide_set_pio_mode(ide_drive_t *, u8); |
1580 | int ide_set_dma_mode(ide_drive_t *, u8); | 1578 | int ide_set_dma_mode(ide_drive_t *, u8); |
1581 | |||
1582 | void ide_set_pio(ide_drive_t *, u8); | 1579 | void ide_set_pio(ide_drive_t *, u8); |
1580 | int ide_set_xfer_rate(ide_drive_t *, u8); | ||
1581 | #else | ||
1582 | static inline void ide_set_pio(ide_drive_t *drive, u8 pio) { ; } | ||
1583 | static inline int ide_set_xfer_rate(ide_drive_t *drive, u8 rate) { return -1; } | ||
1584 | #endif | ||
1583 | 1585 | ||
1584 | static inline void ide_set_max_pio(ide_drive_t *drive) | 1586 | static inline void ide_set_max_pio(ide_drive_t *drive) |
1585 | { | 1587 | { |