aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-16 14:33:38 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-16 14:33:38 -0400
commit713a590dea9a61e84f2837e75c5e9429d95908b5 (patch)
tree569c01b8084a9ae3fe27053f7d2b79b3186852d1 /drivers
parent86a0e12fcb590a6a84b90ae00e6d6564ce770749 (diff)
cy82c693: convert to use ide_timing_find_mode()
There should be no functional changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/Kconfig1
-rw-r--r--drivers/ide/pci/cy82c693.c9
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig
index d5526d3af623..7446db649064 100644
--- a/drivers/ide/Kconfig
+++ b/drivers/ide/Kconfig
@@ -510,6 +510,7 @@ config BLK_DEV_TRIFLEX
510 510
511config BLK_DEV_CY82C693 511config BLK_DEV_CY82C693
512 tristate "CY82C693 chipset support" 512 tristate "CY82C693 chipset support"
513 select IDE_TIMINGS
513 select BLK_DEV_IDEDMA_PCI 514 select BLK_DEV_IDEDMA_PCI
514 help 515 help
515 This driver adds detection and support for the CY82C693 chipset 516 This driver adds detection and support for the CY82C693 chipset
diff --git a/drivers/ide/pci/cy82c693.c b/drivers/ide/pci/cy82c693.c
index 8c534afcb6c8..e14ad5530fa4 100644
--- a/drivers/ide/pci/cy82c693.c
+++ b/drivers/ide/pci/cy82c693.c
@@ -133,6 +133,7 @@ static int calc_clk(int time, int bus_speed)
133 */ 133 */
134static void compute_clocks(u8 pio, pio_clocks_t *p_pclk) 134static void compute_clocks(u8 pio, pio_clocks_t *p_pclk)
135{ 135{
136 struct ide_timing *t = ide_timing_find_mode(XFER_PIO_0 + pio);
136 int clk1, clk2; 137 int clk1, clk2;
137 int bus_speed = ide_pci_clk ? ide_pci_clk : 33; 138 int bus_speed = ide_pci_clk ? ide_pci_clk : 33;
138 139
@@ -141,15 +142,13 @@ static void compute_clocks(u8 pio, pio_clocks_t *p_pclk)
141 */ 142 */
142 143
143 /* let's calc the address setup time clocks */ 144 /* let's calc the address setup time clocks */
144 p_pclk->address_time = (u8)calc_clk(ide_pio_timings[pio].setup_time, bus_speed); 145 p_pclk->address_time = (u8)calc_clk(t->setup, bus_speed);
145 146
146 /* let's calc the active and recovery time clocks */ 147 /* let's calc the active and recovery time clocks */
147 clk1 = calc_clk(ide_pio_timings[pio].active_time, bus_speed); 148 clk1 = calc_clk(t->active, bus_speed);
148 149
149 /* calc recovery timing */ 150 /* calc recovery timing */
150 clk2 = ide_pio_timings[pio].cycle_time - 151 clk2 = t->cycle - t->active - t->setup;
151 ide_pio_timings[pio].active_time -
152 ide_pio_timings[pio].setup_time;
153 152
154 clk2 = calc_clk(clk2, bus_speed); 153 clk2 = calc_clk(clk2, bus_speed);
155 154