From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: linux-ide@vger.kernel.org
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 15/21] opti621: convert to use ide_timing_find_mode()
Date: Wed, 28 May 2008 23:42:51 +0200 [thread overview]
Message-ID: <20080528214251.16327.69202.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20080528213944.16327.92950.sendpatchset@localhost.localdomain>
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/Kconfig | 1 +
drivers/ide/pci/opti621.c | 10 +++++-----
2 files changed, 6 insertions(+), 5 deletions(-)
Index: b/drivers/ide/Kconfig
===================================================================
--- a/drivers/ide/Kconfig
+++ b/drivers/ide/Kconfig
@@ -426,6 +426,7 @@ config BLK_DEV_GENERIC
config BLK_DEV_OPTI621
tristate "OPTi 82C621 chipset enhanced support (EXPERIMENTAL)"
depends on EXPERIMENTAL
+ select IDE_TIMINGS
select BLK_DEV_IDEPCI
help
This is a driver for the OPTi 82C621 EIDE controller.
Index: b/drivers/ide/pci/opti621.c
===================================================================
--- a/drivers/ide/pci/opti621.c
+++ b/drivers/ide/pci/opti621.c
@@ -208,15 +208,15 @@ typedef struct pio_clocks_s {
static void compute_clocks(int pio, pio_clocks_t *clks)
{
if (pio != PIO_NOT_EXIST) {
- int adr_setup, data_pls;
+ struct ide_timing *t = ide_timing_find_mode(XFER_PIO_0 + pio);
+ int adr_setup = t->setup, data_pls = t->active;
int bus_speed = ide_pci_clk ? ide_pci_clk : 33;
- adr_setup = ide_pio_timings[pio].setup_time;
- data_pls = ide_pio_timings[pio].active_time;
clks->address_time = cmpt_clk(adr_setup, bus_speed);
clks->data_time = cmpt_clk(data_pls, bus_speed);
- clks->recovery_time = cmpt_clk(ide_pio_timings[pio].cycle_time
- - adr_setup-data_pls, bus_speed);
+ clks->recovery_time = cmpt_clk(t->cycle - adr_setup - data_pls,
+ bus_speed);
+
if (clks->address_time < 1)
clks->address_time = 1;
if (clks->address_time > 4)
next prev parent reply other threads:[~2008-05-28 21:45 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-28 21:39 [PATCH 00/21] ide: convert ide-timing.h to ide-timings.c library Bartlomiej Zolnierkiewicz
2008-05-28 21:39 ` [PATCH 01/21] ide: remove needless includes from ide-lib.c Bartlomiej Zolnierkiewicz
2008-05-28 21:40 ` [PATCH 02/21] ide: remove unused XFER_UDMA_SLOW Bartlomiej Zolnierkiewicz
2008-06-02 11:43 ` Sergei Shtylyov
2008-05-28 21:40 ` [PATCH 03/21] ide: use u8 for xfer modes in ide-timing.h Bartlomiej Zolnierkiewicz
2008-06-02 11:43 ` Sergei Shtylyov
2008-05-28 21:40 ` [PATCH 04/21] ide: move some bits from ide-timing.h to <linux/ide.h> Bartlomiej Zolnierkiewicz
2008-05-30 11:45 ` Sergei Shtylyov
2008-05-28 21:40 ` [PATCH 05/21] ide: remove XFER_* masks from ide-timing.h Bartlomiej Zolnierkiewicz
2008-05-30 11:46 ` Sergei Shtylyov
2008-05-28 21:40 ` [PATCH 06/21] ide: checkpatch.pl fixes for ide-timing.h Bartlomiej Zolnierkiewicz
2008-05-30 11:46 ` Sergei Shtylyov
2008-05-28 21:40 ` [PATCH 07/21] ide: convert ide-timing.h to ide-timings.c library Bartlomiej Zolnierkiewicz
2008-05-28 21:40 ` [PATCH 08/21] ali14xx: convert to use ide_timing_find_mode() Bartlomiej Zolnierkiewicz
2008-06-02 11:38 ` Sergei Shtylyov
2008-05-28 21:41 ` [PATCH 09/21] ht6560b: " Bartlomiej Zolnierkiewicz
2008-06-02 11:38 ` Sergei Shtylyov
2008-05-28 21:42 ` [PATCH 10/21] qd65xx: " Bartlomiej Zolnierkiewicz
2008-06-02 11:38 ` Sergei Shtylyov
2008-05-28 21:42 ` [PATCH 11/21] alim15x3: " Bartlomiej Zolnierkiewicz
2008-06-02 11:39 ` Sergei Shtylyov
2008-05-28 21:42 ` [PATCH 12/21] cmd640: " Bartlomiej Zolnierkiewicz
2008-06-02 11:40 ` Sergei Shtylyov
2008-06-02 11:40 ` Sergei Shtylyov
2008-05-28 21:42 ` [PATCH 13/21] cmd64x: " Bartlomiej Zolnierkiewicz
2008-06-02 11:40 ` Sergei Shtylyov
2008-05-28 21:42 ` [PATCH 14/21] cy82c693: " Bartlomiej Zolnierkiewicz
2008-06-02 11:40 ` Sergei Shtylyov
2008-05-28 21:42 ` Bartlomiej Zolnierkiewicz [this message]
2008-06-02 11:41 ` [PATCH 15/21] opti621: " Sergei Shtylyov
2008-05-28 21:42 ` [PATCH 16/21] sl82c105: " Bartlomiej Zolnierkiewicz
2008-06-02 11:41 ` Sergei Shtylyov
2008-05-28 21:43 ` [PATCH 17/21] ide-mpc8xx: " Bartlomiej Zolnierkiewicz
2008-05-28 21:43 ` [PATCH 18/21] ide-pmac: " Bartlomiej Zolnierkiewicz
2008-06-02 11:41 ` Sergei Shtylyov
2008-05-28 21:43 ` [PATCH 19/21] ide: move ide_pio_cycle_time() to ide-timings.c Bartlomiej Zolnierkiewicz
2008-06-02 11:49 ` Sergei Shtylyov
2008-05-28 21:43 ` [PATCH 20/21] ide: remove no longer used ide_pio_timings[] Bartlomiej Zolnierkiewicz
2008-06-02 11:42 ` Sergei Shtylyov
2008-05-28 21:43 ` [PATCH 21/21] ide: move PIO blacklist to ide-pio-blacklist.c Bartlomiej Zolnierkiewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080528214251.16327.69202.sendpatchset@localhost.localdomain \
--to=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).