mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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>
This commit is contained in:
parent
11938c9290
commit
7eeaaaa522
5 changed files with 263 additions and 247 deletions
|
@ -1531,9 +1531,7 @@ static inline void ide_set_hwifdata (ide_hwif_t * hwif, void *data)
|
|||
hwif->hwif_data = data;
|
||||
}
|
||||
|
||||
const char *ide_xfer_verbose(u8 mode);
|
||||
extern void ide_toggle_bounce(ide_drive_t *drive, int on);
|
||||
extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate);
|
||||
|
||||
u64 ide_get_lba_addr(struct ide_taskfile *, int);
|
||||
u8 ide_dump_status(ide_drive_t *, const char *, u8);
|
||||
|
@ -1572,14 +1570,18 @@ void ide_timing_merge(struct ide_timing *, struct ide_timing *,
|
|||
struct ide_timing *, unsigned int);
|
||||
int ide_timing_compute(ide_drive_t *, u8, struct ide_timing *, int, int);
|
||||
|
||||
#ifdef CONFIG_IDE_XFER_MODE
|
||||
int ide_scan_pio_blacklist(char *);
|
||||
|
||||
const char *ide_xfer_verbose(u8);
|
||||
u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8);
|
||||
|
||||
int ide_set_pio_mode(ide_drive_t *, u8);
|
||||
int ide_set_dma_mode(ide_drive_t *, u8);
|
||||
|
||||
void ide_set_pio(ide_drive_t *, u8);
|
||||
int ide_set_xfer_rate(ide_drive_t *, u8);
|
||||
#else
|
||||
static inline void ide_set_pio(ide_drive_t *drive, u8 pio) { ; }
|
||||
static inline int ide_set_xfer_rate(ide_drive_t *drive, u8 rate) { return -1; }
|
||||
#endif
|
||||
|
||||
static inline void ide_set_max_pio(ide_drive_t *drive)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue