aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ide.h
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-24 18:22:46 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-24 18:22:46 -0400
commit7eeaaaa52285d5e6cb79f515e99c591dcb9d04fe (patch)
tree02513d82b19d9b00faaf268ce60a312cbe3a1389 /include/linux/ide.h
parent11938c929022bb92b1a42f5e1289524a1e465dc0 (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.h12
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
1534const char *ide_xfer_verbose(u8 mode);
1535extern void ide_toggle_bounce(ide_drive_t *drive, int on); 1534extern void ide_toggle_bounce(ide_drive_t *drive, int on);
1536extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate);
1537 1535
1538u64 ide_get_lba_addr(struct ide_taskfile *, int); 1536u64 ide_get_lba_addr(struct ide_taskfile *, int);
1539u8 ide_dump_status(ide_drive_t *, const char *, u8); 1537u8 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);
1573int ide_timing_compute(ide_drive_t *, u8, struct ide_timing *, int, int); 1571int ide_timing_compute(ide_drive_t *, u8, struct ide_timing *, int, int);
1574 1572
1573#ifdef CONFIG_IDE_XFER_MODE
1575int ide_scan_pio_blacklist(char *); 1574int ide_scan_pio_blacklist(char *);
1576 1575const char *ide_xfer_verbose(u8);
1577u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8); 1576u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8);
1578
1579int ide_set_pio_mode(ide_drive_t *, u8); 1577int ide_set_pio_mode(ide_drive_t *, u8);
1580int ide_set_dma_mode(ide_drive_t *, u8); 1578int ide_set_dma_mode(ide_drive_t *, u8);
1581
1582void ide_set_pio(ide_drive_t *, u8); 1579void ide_set_pio(ide_drive_t *, u8);
1580int ide_set_xfer_rate(ide_drive_t *, u8);
1581#else
1582static inline void ide_set_pio(ide_drive_t *drive, u8 pio) { ; }
1583static inline int ide_set_xfer_rate(ide_drive_t *drive, u8 rate) { return -1; }
1584#endif
1583 1585
1584static inline void ide_set_max_pio(ide_drive_t *drive) 1586static inline void ide_set_max_pio(ide_drive_t *drive)
1585{ 1587{