lkml.org 
[lkml]   [2008]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH 11/12] cmd640: add "cmd_clock=" parameter
Add "cmd_clock=" parameter for specifying VLB or PCI bus clock frequency
(in MHz).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/pci/cmd640.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

Index: b/drivers/ide/pci/cmd640.c
===================================================================
--- a/drivers/ide/pci/cmd640.c
+++ b/drivers/ide/pci/cmd640.c
@@ -157,6 +157,8 @@ static int cmd640_vlb;
#define DRWTIM23 0x58
#define BRST 0x59

+static int cmd_clock;
+
/*
* Registers and masks for easy access by drive index:
*/
@@ -552,7 +554,7 @@ static void cmd640_set_mode(ide_drive_t
{
int setup_time, active_time, recovery_time, clock_time;
u8 setup_count, active_count, recovery_count, recovery_count2, cycle_count;
- int bus_speed = system_bus_clock();
+ int bus_speed = cmd_clock ? cmd_clock : system_bus_clock();

if (pio_mode > 5)
pio_mode = 5;
@@ -904,4 +906,7 @@ static int __init cmd640x_init(void)
module_param_named(probe_vlb, cmd640_vlb, bool, 0);
MODULE_PARM_DESC(probe_vlb, "probe for VLB version of CMD640 chipset");

+module_param(cmd_clock, int, 0);
+MODULE_PARM_DESC(cmd_clock, "VLB or PCI bus clock frequency (in MHz)");
+
module_init(cmd640x_init);

\
 
 \ /
  Last update: 2008-03-13 23:35    [W:0.090 / U:0.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site