[PATCH 2/12] ht6560b: add "vlb_clock=" parameter
From: Bartlomiej Zolnierkiewicz
Date: Thu Mar 13 2008 - 18:29:41 EST
Add "vlb_clock=" parameter for specifying VLB clock frequency (in MHz).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@xxxxxxxxx>
---
drivers/ide/legacy/ht6560b.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
Index: b/drivers/ide/legacy/ht6560b.c
===================================================================
--- a/drivers/ide/legacy/ht6560b.c
+++ b/drivers/ide/legacy/ht6560b.c
@@ -116,6 +116,8 @@
#define HT_TIMING(drivea) (u8)((drivea)->drive_data & 0x00ff)
#define HT_TIMING_DEFAULT 0xff
+static int vlb_clock;
+
/*
* This routine handles interface switching for the peculiar hardware design
* on the F.G.I./Holtek HT-6560B VLB IDE interface.
@@ -212,8 +214,8 @@ static u8 ht_pio2timings(ide_drive_t *dr
{
int active_time, recovery_time;
int active_cycles, recovery_cycles;
- int bus_speed = system_bus_clock();
-
+ int bus_speed = vlb_clock ? vlb_clock : system_bus_clock();
+
if (pio) {
unsigned int cycle_time;
@@ -328,6 +330,9 @@ static int probe_ht6560b;
module_param_named(probe, probe_ht6560b, bool, 0);
MODULE_PARM_DESC(probe, "probe for HT6560B chipset");
+module_param(vlb_clock, int, 0);
+MODULE_PARM_DESC(vlb_clock, "VLB clock frequency (in MHz)");
+
static const struct ide_port_ops ht6560b_port_ops = {
.port_init_devs = ht6560b_port_init_devs,
.set_pio_mode = ht6560b_set_pio_mode,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/