diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-08-01 17:46:46 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-08-01 17:46:46 -0400 |
commit | 8b6b33be3280fd776335079124ecd176e6a40797 (patch) | |
tree | 74dc598c4e2f94b38ed49c01dcde812a01f5f664 /drivers/ide/pci/jmicron.c | |
parent | 68aaf8150308dbf9d0e5ccd5bc05491ba575f966 (diff) |
jmicron: PIO fixes
* Set transfer mode on the device in jmicron_tuneproc(),
also add pio == 255 == "auto-tune" handling.
* Use jmicron_tuneproc() in jmicron_config_drive_for_dma().
* Remove no longer needed config_jmicron_chipset_for_pio().
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/jmicron.c')
-rw-r--r-- | drivers/ide/pci/jmicron.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/drivers/ide/pci/jmicron.c b/drivers/ide/pci/jmicron.c index d7ce9dd8de16..65a0ff352b98 100644 --- a/drivers/ide/pci/jmicron.c +++ b/drivers/ide/pci/jmicron.c | |||
@@ -83,23 +83,10 @@ static u8 __devinit ata66_jmicron(ide_hwif_t *hwif) | |||
83 | return ATA_CBL_PATA80; | 83 | return ATA_CBL_PATA80; |
84 | } | 84 | } |
85 | 85 | ||
86 | static void jmicron_tuneproc (ide_drive_t *drive, byte mode_wanted) | 86 | static void jmicron_tuneproc(ide_drive_t *drive, u8 pio) |
87 | { | 87 | { |
88 | return; | 88 | pio = ide_get_best_pio_mode(drive, pio, 5); |
89 | } | 89 | ide_config_drive_speed(drive, XFER_PIO_0 + pio); |
90 | |||
91 | /** | ||
92 | * config_jmicron_chipset_for_pio - set drive timings | ||
93 | * @drive: drive to tune | ||
94 | * @speed we want | ||
95 | * | ||
96 | */ | ||
97 | |||
98 | static void config_jmicron_chipset_for_pio (ide_drive_t *drive, byte set_speed) | ||
99 | { | ||
100 | u8 speed = XFER_PIO_0 + ide_get_best_pio_mode(drive, 255, 5); | ||
101 | if (set_speed) | ||
102 | (void) ide_config_drive_speed(drive, speed); | ||
103 | } | 90 | } |
104 | 91 | ||
105 | /** | 92 | /** |
@@ -132,7 +119,7 @@ static int jmicron_config_drive_for_dma (ide_drive_t *drive) | |||
132 | if (ide_tune_dma(drive)) | 119 | if (ide_tune_dma(drive)) |
133 | return 0; | 120 | return 0; |
134 | 121 | ||
135 | config_jmicron_chipset_for_pio(drive, 1); | 122 | jmicron_tuneproc(drive, 255); |
136 | 123 | ||
137 | return -1; | 124 | return -1; |
138 | } | 125 | } |