[PATCH 9/12] opti621: add "pci_clock=" parameter

From: Bartlomiej Zolnierkiewicz
Date: Thu Mar 13 2008 - 18:32:34 EST


Add "pci_clock=" parameter for specifying PCI bus clock frequency (in MHz).

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

Index: b/drivers/ide/pci/opti621.c
===================================================================
--- a/drivers/ide/pci/opti621.c
+++ b/drivers/ide/pci/opti621.c
@@ -123,6 +123,8 @@

static int reg_base;

+static int pci_clock;
+
#define PIO_NOT_EXIST 254
#define PIO_DONT_KNOW 255

@@ -210,7 +212,7 @@ static void compute_clocks(int pio, pio_
{
if (pio != PIO_NOT_EXIST) {
int adr_setup, data_pls;
- int bus_speed = system_bus_clock();
+ int bus_speed = pci_clock ? pci_clock : system_bus_clock();

adr_setup = ide_pio_timings[pio].setup_time;
data_pls = ide_pio_timings[pio].active_time;
@@ -376,6 +378,9 @@ static int __init opti621_ide_init(void)

module_init(opti621_ide_init);

+module_param(pci_clock, int, 0);
+MODULE_PARM_DESC(pci_clock, "PCI bus clock frequency (in MHz)");
+
MODULE_AUTHOR("Jaromir Koutek, Jan Harkes, Mark Lord");
MODULE_DESCRIPTION("PCI driver module for Opti621 IDE");
MODULE_LICENSE("GPL");
--
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/