* [PATCH 1/12] ali14xx: add "vlb_clock=" parameter
@ 2008-03-13 22:43 Bartlomiej Zolnierkiewicz
2008-03-13 22:43 ` [PATCH 2/12] ht6560b: " Bartlomiej Zolnierkiewicz
` (11 more replies)
0 siblings, 12 replies; 14+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-03-13 22:43 UTC (permalink / raw)
To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel
Add "vlb_clock=" parameter for specifying VLB clock frequency (in MHz).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/legacy/ali14xx.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
Index: b/drivers/ide/legacy/ali14xx.c
===================================================================
--- a/drivers/ide/legacy/ali14xx.c
+++ b/drivers/ide/legacy/ali14xx.c
@@ -51,6 +51,8 @@
#define DRV_NAME "ali14xx"
+static int vlb_clock;
+
/* port addresses for auto-detection */
#define ALI_NUM_PORTS 4
static const int ports[ALI_NUM_PORTS] __initdata =
@@ -116,7 +118,7 @@ static void ali14xx_set_pio_mode(ide_dri
int time1, time2;
u8 param1, param2, param3, param4;
unsigned long flags;
- int bus_speed = system_bus_clock();
+ int bus_speed = vlb_clock ? vlb_clock : system_bus_clock();
/* calculate timing, according to PIO mode */
time1 = ide_pio_cycle_time(drive, pio);
@@ -225,6 +227,9 @@ static int probe_ali14xx;
module_param_named(probe, probe_ali14xx, bool, 0);
MODULE_PARM_DESC(probe, "probe for ALI M14xx chipsets");
+module_param(vlb_clock, int, 0);
+MODULE_PARM_DESC(vlb_clock, "VLB clock frequency (in MHz)");
+
static int __init ali14xx_init(void)
{
if (probe_ali14xx == 0)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 2/12] ht6560b: add "vlb_clock=" parameter
2008-03-13 22:43 [PATCH 1/12] ali14xx: add "vlb_clock=" parameter Bartlomiej Zolnierkiewicz
@ 2008-03-13 22:43 ` Bartlomiej Zolnierkiewicz
2008-03-13 22:44 ` [PATCH 3/12] qd65xx: " Bartlomiej Zolnierkiewicz
` (10 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-03-13 22:43 UTC (permalink / raw)
To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel
Add "vlb_clock=" parameter for specifying VLB clock frequency (in MHz).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
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,
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 3/12] qd65xx: add "vlb_clock=" parameter
2008-03-13 22:43 [PATCH 1/12] ali14xx: add "vlb_clock=" parameter Bartlomiej Zolnierkiewicz
2008-03-13 22:43 ` [PATCH 2/12] ht6560b: " Bartlomiej Zolnierkiewicz
@ 2008-03-13 22:44 ` Bartlomiej Zolnierkiewicz
2008-03-13 22:44 ` [PATCH 4/12] aec62xx: add "pci_clock=" parameter Bartlomiej Zolnierkiewicz
` (9 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-03-13 22:44 UTC (permalink / raw)
To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel
Add "vlb_clock=" parameter for specifying VLB clock frequency (in MHz).
Also rename {active,recovery}_cycle variables to {act,rec}_cyc while at it.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/legacy/qd65xx.c | 29 +++++++++++++++++++----------
1 file changed, 19 insertions(+), 10 deletions(-)
Index: b/drivers/ide/legacy/qd65xx.c
===================================================================
--- a/drivers/ide/legacy/qd65xx.c
+++ b/drivers/ide/legacy/qd65xx.c
@@ -41,6 +41,8 @@
#include "qd65xx.h"
+static int vlb_clock;
+
/*
* I/O ports are 0x30-0x31 (and 0x32-0x33 for qd6580)
* or 0xb0-0xb1 (and 0xb2-0xb3 for qd6580)
@@ -114,17 +116,18 @@ static void qd65xx_select(ide_drive_t *d
static u8 qd6500_compute_timing (ide_hwif_t *hwif, int active_time, int recovery_time)
{
- u8 active_cycle,recovery_cycle;
+ int clk = vlb_clock ? vlb_clock : system_bus_clock();
+ u8 act_cyc, rec_cyc;
- if (system_bus_clock()<=33) {
- active_cycle = 9 - IDE_IN(active_time * system_bus_clock() / 1000 + 1, 2, 9);
- recovery_cycle = 15 - IDE_IN(recovery_time * system_bus_clock() / 1000 + 1, 0, 15);
+ if (clk <= 33) {
+ act_cyc = 9 - IDE_IN(active_time * clk / 1000 + 1, 2, 9);
+ rec_cyc = 15 - IDE_IN(recovery_time * clk / 1000 + 1, 0, 15);
} else {
- active_cycle = 8 - IDE_IN(active_time * system_bus_clock() / 1000 + 1, 1, 8);
- recovery_cycle = 18 - IDE_IN(recovery_time * system_bus_clock() / 1000 + 1, 3, 18);
+ act_cyc = 8 - IDE_IN(active_time * clk / 1000 + 1, 1, 8);
+ rec_cyc = 18 - IDE_IN(recovery_time * clk / 1000 + 1, 3, 18);
}
- return((recovery_cycle<<4) | 0x08 | active_cycle);
+ return (rec_cyc << 4) | 0x08 | act_cyc;
}
/*
@@ -135,10 +138,13 @@ static u8 qd6500_compute_timing (ide_hwi
static u8 qd6580_compute_timing (int active_time, int recovery_time)
{
- u8 active_cycle = 17 - IDE_IN(active_time * system_bus_clock() / 1000 + 1, 2, 17);
- u8 recovery_cycle = 15 - IDE_IN(recovery_time * system_bus_clock() / 1000 + 1, 2, 15);
+ int clk = vlb_clock ? vlb_clock : system_bus_clock();
+ u8 act_cyc, rec_cyc;
+
+ act_cyc = 17 - IDE_IN(active_time * clk / 1000 + 1, 2, 17);
+ rec_cyc = 15 - IDE_IN(recovery_time * clk / 1000 + 1, 2, 15);
- return((recovery_cycle<<4) | active_cycle);
+ return (rec_cyc << 4) | act_cyc;
}
/*
@@ -404,6 +410,9 @@ static int probe_qd65xx;
module_param_named(probe, probe_qd65xx, bool, 0);
MODULE_PARM_DESC(probe, "probe for QD65xx chipsets");
+module_param(vlb_clock, int, 0);
+MODULE_PARM_DESC(vlb_clock, "VLB clock frequency (in MHz)");
+
static int __init qd65xx_init(void)
{
int rc1, rc2 = -ENODEV;
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 4/12] aec62xx: add "pci_clock=" parameter
2008-03-13 22:43 [PATCH 1/12] ali14xx: add "vlb_clock=" parameter Bartlomiej Zolnierkiewicz
2008-03-13 22:43 ` [PATCH 2/12] ht6560b: " Bartlomiej Zolnierkiewicz
2008-03-13 22:44 ` [PATCH 3/12] qd65xx: " Bartlomiej Zolnierkiewicz
@ 2008-03-13 22:44 ` Bartlomiej Zolnierkiewicz
2008-03-13 22:44 ` [PATCH 5/12] alim15x3: " Bartlomiej Zolnierkiewicz
` (8 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-03-13 22:44 UTC (permalink / raw)
To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel
Add "pci_clock=" parameter for specifying PCI bus clock frequency (in MHz).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/pci/aec62xx.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
Index: b/drivers/ide/pci/aec62xx.c
===================================================================
--- a/drivers/ide/pci/aec62xx.c
+++ b/drivers/ide/pci/aec62xx.c
@@ -13,6 +13,8 @@
#include <asm/io.h>
+static int pci_clock;
+
struct chipset_bus_clock_list_entry {
u8 xfer_speed;
u8 chipset_settings;
@@ -140,7 +142,7 @@ static void aec_set_pio_mode(ide_drive_t
static unsigned int __devinit init_chipset_aec62xx(struct pci_dev *dev, const char *name)
{
- int bus_speed = system_bus_clock();
+ int bus_speed = pci_clock ? pci_clock : system_bus_clock();
if (bus_speed <= 33)
pci_set_drvdata(dev, (void *) aec6xxx_33_base);
@@ -308,6 +310,9 @@ static int __init aec62xx_ide_init(void)
module_init(aec62xx_ide_init);
+module_param(pci_clock, int, 0);
+MODULE_PARM_DESC(pci_clock, "PCI bus clock frequency (in MHz)");
+
MODULE_AUTHOR("Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for ARTOP AEC62xx IDE");
MODULE_LICENSE("GPL");
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 5/12] alim15x3: add "pci_clock=" parameter
2008-03-13 22:43 [PATCH 1/12] ali14xx: add "vlb_clock=" parameter Bartlomiej Zolnierkiewicz
` (2 preceding siblings ...)
2008-03-13 22:44 ` [PATCH 4/12] aec62xx: add "pci_clock=" parameter Bartlomiej Zolnierkiewicz
@ 2008-03-13 22:44 ` Bartlomiej Zolnierkiewicz
2008-03-13 22:44 ` [PATCH 6/12] amd74xx: " Bartlomiej Zolnierkiewicz
` (7 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-03-13 22:44 UTC (permalink / raw)
To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel
Add "pci_clock=" parameter for specifying PCI bus clock frequency (in MHz).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/pci/alim15x3.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
Index: b/drivers/ide/pci/alim15x3.c
===================================================================
--- a/drivers/ide/pci/alim15x3.c
+++ b/drivers/ide/pci/alim15x3.c
@@ -40,6 +40,8 @@
#define DISPLAY_ALI_TIMINGS
+static int pci_clock;
+
/*
* ALi devices are not plug in. Otherwise these static values would
* need to go. They ought to go away anyway
@@ -294,7 +296,7 @@ static void ali_set_pio_mode(ide_drive_t
int s_time, a_time, c_time;
u8 s_clc, a_clc, r_clc;
unsigned long flags;
- int bus_speed = system_bus_clock();
+ int bus_speed = pci_clock ? pci_clock : system_bus_clock();
int port = hwif->channel ? 0x5c : 0x58;
int portFIFO = hwif->channel ? 0x55 : 0x54;
u8 cd_dma_fifo = 0;
@@ -839,6 +841,9 @@ static int __init ali15x3_ide_init(void)
module_init(ali15x3_ide_init);
+module_param(pci_clock, int, 0);
+MODULE_PARM_DESC(pci_clock, "PCI bus clock frequency (in MHz)");
+
MODULE_AUTHOR("Michael Aubry, Andrzej Krzysztofowicz, CJ, Andre Hedrick, Alan Cox");
MODULE_DESCRIPTION("PCI driver module for ALi 15x3 IDE");
MODULE_LICENSE("GPL");
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 6/12] amd74xx: add "pci_clock=" parameter
2008-03-13 22:43 [PATCH 1/12] ali14xx: add "vlb_clock=" parameter Bartlomiej Zolnierkiewicz
` (3 preceding siblings ...)
2008-03-13 22:44 ` [PATCH 5/12] alim15x3: " Bartlomiej Zolnierkiewicz
@ 2008-03-13 22:44 ` Bartlomiej Zolnierkiewicz
2008-03-13 22:44 ` [PATCH 7/12] cmd64x: " Bartlomiej Zolnierkiewicz
` (6 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-03-13 22:44 UTC (permalink / raw)
To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel
Add "pci_clock=" parameter for specifying PCI bus clock frequency (in MHz).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/pci/amd74xx.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
Index: b/drivers/ide/pci/amd74xx.c
===================================================================
--- a/drivers/ide/pci/amd74xx.c
+++ b/drivers/ide/pci/amd74xx.c
@@ -32,6 +32,8 @@ enum {
AMD_UDMA_TIMING = 0x50,
};
+static int pci_clock;
+
static unsigned int amd_80w;
static unsigned int amd_clock;
@@ -179,7 +181,7 @@ static unsigned int __devinit init_chips
* Determine the system bus clock.
*/
- amd_clock = system_bus_clock() * 1000;
+ amd_clock = (pci_clock ? pci_clock : system_bus_clock()) * 1000;
switch (amd_clock) {
case 33000: amd_clock = 33333; break;
@@ -353,6 +355,9 @@ static int __init amd74xx_ide_init(void)
module_init(amd74xx_ide_init);
+module_param(pci_clock, int, 0);
+MODULE_PARM_DESC(pci_clock, "PCI bus clock frequency (in MHz)");
+
MODULE_AUTHOR("Vojtech Pavlik");
MODULE_DESCRIPTION("AMD PCI IDE driver");
MODULE_LICENSE("GPL");
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 7/12] cmd64x: add "pci_clock=" parameter
2008-03-13 22:43 [PATCH 1/12] ali14xx: add "vlb_clock=" parameter Bartlomiej Zolnierkiewicz
` (4 preceding siblings ...)
2008-03-13 22:44 ` [PATCH 6/12] amd74xx: " Bartlomiej Zolnierkiewicz
@ 2008-03-13 22:44 ` Bartlomiej Zolnierkiewicz
2008-03-13 22:44 ` [PATCH 8/12] cy82c693: " Bartlomiej Zolnierkiewicz
` (5 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-03-13 22:44 UTC (permalink / raw)
To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel
Add "pci_clock=" parameter for specifying PCI bus clock frequency (in MHz).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/pci/cmd64x.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
Index: b/drivers/ide/pci/cmd64x.c
===================================================================
--- a/drivers/ide/pci/cmd64x.c
+++ b/drivers/ide/pci/cmd64x.c
@@ -57,6 +57,8 @@
#define UDIDETCR1 0x7B
#define DTPR1 0x7C
+static int pci_clock;
+
static u8 quantize_timing(int timing, int quant)
{
return (timing + quant - 1) / quant;
@@ -68,8 +70,8 @@ static u8 quantize_timing(int timing, in
*/
static void program_cycle_times (ide_drive_t *drive, int cycle_time, int active_time)
{
- struct pci_dev *dev = to_pci_dev(drive->hwif->dev);
- int clock_time = 1000 / system_bus_clock();
+ struct pci_dev *dev = to_pci_dev(drive->hwif->dev);
+ int clock_time = 1000 / (pci_clock ? pci_clock : system_bus_clock());
u8 cycle_count, active_count, recovery_count, drwtim;
static const u8 recovery_values[] =
{15, 15, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0};
@@ -128,7 +130,7 @@ static void cmd64x_tune_pio(ide_drive_t
ide_pio_timings[pio].active_time);
setup_count = quantize_timing(ide_pio_timings[pio].setup_time,
- 1000 / system_bus_clock());
+ 1000 / (pci_clock ? pci_clock : system_bus_clock()));
/*
* The primary channel has individual address setup timing registers
@@ -532,6 +534,9 @@ static int __init cmd64x_ide_init(void)
module_init(cmd64x_ide_init);
+module_param(pci_clock, int, 0);
+MODULE_PARM_DESC(pci_clock, "PCI bus clock frequency (in MHz)");
+
MODULE_AUTHOR("Eddie Dost, David Miller, Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for CMD64x IDE");
MODULE_LICENSE("GPL");
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 8/12] cy82c693: add "pci_clock=" parameter
2008-03-13 22:43 [PATCH 1/12] ali14xx: add "vlb_clock=" parameter Bartlomiej Zolnierkiewicz
` (5 preceding siblings ...)
2008-03-13 22:44 ` [PATCH 7/12] cmd64x: " Bartlomiej Zolnierkiewicz
@ 2008-03-13 22:44 ` Bartlomiej Zolnierkiewicz
2008-03-13 22:44 ` [PATCH 9/12] opti621: " Bartlomiej Zolnierkiewicz
` (4 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-03-13 22:44 UTC (permalink / raw)
To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel
Add "pci_clock=" parameter for specifying PCI bus clock frequency (in MHz).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/pci/cy82c693.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
Index: b/drivers/ide/pci/cy82c693.c
===================================================================
--- a/drivers/ide/pci/cy82c693.c
+++ b/drivers/ide/pci/cy82c693.c
@@ -98,6 +98,8 @@
#define CY82C963_MIN_BUS_SPEED 25
#define CY82C963_MAX_BUS_SPEED 33
+static int pci_clock;
+
/* the struct for the PIO mode timings */
typedef struct pio_clocks_s {
u8 address_time; /* Address setup (clocks) */
@@ -136,7 +138,7 @@ static int calc_clk(int time, int bus_sp
static void compute_clocks(u8 pio, pio_clocks_t *p_pclk)
{
int clk1, clk2;
- int bus_speed = system_bus_clock(); /* get speed of PCI bus */
+ int bus_speed = pci_clock ? pci_clock : system_bus_clock();
/* we don't check against CY82C693's min and max speed,
* so you can play with the idebus=xx parameter
@@ -447,6 +449,9 @@ static int __init cy82c693_ide_init(void
module_init(cy82c693_ide_init);
+module_param(pci_clock, int, 0);
+MODULE_PARM_DESC(pci_clock, "PCI bus clock frequency (in MHz)");
+
MODULE_AUTHOR("Andreas Krebs, Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for the Cypress CY82C693 IDE");
MODULE_LICENSE("GPL");
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 9/12] opti621: add "pci_clock=" parameter
2008-03-13 22:43 [PATCH 1/12] ali14xx: add "vlb_clock=" parameter Bartlomiej Zolnierkiewicz
` (6 preceding siblings ...)
2008-03-13 22:44 ` [PATCH 8/12] cy82c693: " Bartlomiej Zolnierkiewicz
@ 2008-03-13 22:44 ` Bartlomiej Zolnierkiewicz
2008-03-13 22:44 ` [PATCH 10/12] via82cxxx: " Bartlomiej Zolnierkiewicz
` (3 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-03-13 22:44 UTC (permalink / raw)
To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel
Add "pci_clock=" parameter for specifying PCI bus clock frequency (in MHz).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
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");
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 10/12] via82cxxx: add "pci_clock=" parameter
2008-03-13 22:43 [PATCH 1/12] ali14xx: add "vlb_clock=" parameter Bartlomiej Zolnierkiewicz
` (7 preceding siblings ...)
2008-03-13 22:44 ` [PATCH 9/12] opti621: " Bartlomiej Zolnierkiewicz
@ 2008-03-13 22:44 ` Bartlomiej Zolnierkiewicz
2008-03-13 22:45 ` [PATCH 11/12] cmd640: add "cmd_clock=" parameter Bartlomiej Zolnierkiewicz
` (2 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-03-13 22:44 UTC (permalink / raw)
To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel
Add "pci_clock=" parameter for specifying PCI bus clock frequency (in MHz).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/pci/via82cxxx.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
Index: b/drivers/ide/pci/via82cxxx.c
===================================================================
--- a/drivers/ide/pci/via82cxxx.c
+++ b/drivers/ide/pci/via82cxxx.c
@@ -94,6 +94,8 @@ static struct via_isa_bridge {
{ NULL }
};
+static int pci_clock;
+
static unsigned int via_clock;
static char *via_dma[] = { "16", "25", "33", "44", "66", "100", "133" };
@@ -340,7 +342,7 @@ static unsigned int __devinit init_chips
* Determine system bus clock.
*/
- via_clock = system_bus_clock() * 1000;
+ via_clock = (pci_clock ? pci_clock : system_bus_clock()) * 1000;
switch (via_clock) {
case 33000: via_clock = 33333; break;
@@ -495,6 +497,9 @@ static int __init via_ide_init(void)
module_init(via_ide_init);
+module_param(pci_clock, int, 0);
+MODULE_PARM_DESC(pci_clock, "PCI bus clock frequency (in MHz)");
+
MODULE_AUTHOR("Vojtech Pavlik, Michel Aubry, Jeff Garzik, Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for VIA IDE");
MODULE_LICENSE("GPL");
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 11/12] cmd640: add "cmd_clock=" parameter
2008-03-13 22:43 [PATCH 1/12] ali14xx: add "vlb_clock=" parameter Bartlomiej Zolnierkiewicz
` (8 preceding siblings ...)
2008-03-13 22:44 ` [PATCH 10/12] via82cxxx: " Bartlomiej Zolnierkiewicz
@ 2008-03-13 22:45 ` Bartlomiej Zolnierkiewicz
2008-03-13 22:45 ` [PATCH 12/12] ide: mark "idebus=" kernel parameter as obsoleted Bartlomiej Zolnierkiewicz
2008-03-15 12:36 ` [PATCH 1/12] ali14xx: add "vlb_clock=" parameter Alan Cox
11 siblings, 0 replies; 14+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-03-13 22:45 UTC (permalink / raw)
To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel
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);
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 12/12] ide: mark "idebus=" kernel parameter as obsoleted
2008-03-13 22:43 [PATCH 1/12] ali14xx: add "vlb_clock=" parameter Bartlomiej Zolnierkiewicz
` (9 preceding siblings ...)
2008-03-13 22:45 ` [PATCH 11/12] cmd640: add "cmd_clock=" parameter Bartlomiej Zolnierkiewicz
@ 2008-03-13 22:45 ` Bartlomiej Zolnierkiewicz
2008-03-15 12:36 ` [PATCH 1/12] ali14xx: add "vlb_clock=" parameter Alan Cox
11 siblings, 0 replies; 14+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-03-13 22:45 UTC (permalink / raw)
To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel
We have per host driver "vlb|pci|cmd_clock=" parameters now.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
Documentation/ide/ide.txt | 10 ----------
drivers/ide/ide.c | 2 +-
2 files changed, 1 insertion(+), 11 deletions(-)
Index: b/Documentation/ide/ide.txt
===================================================================
--- a/Documentation/ide/ide.txt
+++ b/Documentation/ide/ide.txt
@@ -214,16 +214,6 @@ Summary of ide driver parameters for ker
"hdx=nodma" : disallow DMA
- "idebus=xx" : inform IDE driver of VESA/PCI bus speed in MHz,
- where "xx" is between 20 and 66 inclusive,
- used when tuning chipset PIO modes.
- For PCI bus, 25 is correct for a P75 system,
- 30 is correct for P90,P120,P180 systems,
- and 33 is used for P100,P133,P166 systems.
- If in doubt, use idebus=33 for PCI.
- As for VLB, it is safest to not specify it.
- Bigger values are safer than smaller ones.
-
"ide=reverse" : formerly called to pci sub-system, but now local.
The following are valid ONLY on ide0, which usually corresponds
Index: b/drivers/ide/ide.c
===================================================================
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -979,7 +979,7 @@ static int __init ide_setup(char *s)
idebus_parameter = vals[0];
} else
printk(" -- BAD BUS SPEED! Expected value from 20 to 66");
- goto done;
+ goto obsolete_option;
}
bad_option:
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/12] ali14xx: add "vlb_clock=" parameter
2008-03-13 22:43 [PATCH 1/12] ali14xx: add "vlb_clock=" parameter Bartlomiej Zolnierkiewicz
` (10 preceding siblings ...)
2008-03-13 22:45 ` [PATCH 12/12] ide: mark "idebus=" kernel parameter as obsoleted Bartlomiej Zolnierkiewicz
@ 2008-03-15 12:36 ` Alan Cox
2008-03-15 21:44 ` Bartlomiej Zolnierkiewicz
11 siblings, 1 reply; 14+ messages in thread
From: Alan Cox @ 2008-03-15 12:36 UTC (permalink / raw)
Cc: linux-ide, Bartlomiej Zolnierkiewicz, linux-kernel
On Thu, 13 Mar 2008 23:43:52 +0100
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:
> Add "vlb_clock=" parameter for specifying VLB clock frequency (in MHz).
>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Surely this value should be set once per system (ditto for PCI) not
something you have to set in each specific driver on the box ?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/12] ali14xx: add "vlb_clock=" parameter
2008-03-15 12:36 ` [PATCH 1/12] ali14xx: add "vlb_clock=" parameter Alan Cox
@ 2008-03-15 21:44 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 14+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-03-15 21:44 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-ide, linux-kernel
On Saturday 15 March 2008, Alan Cox wrote:
> On Thu, 13 Mar 2008 23:43:52 +0100
> Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:
>
> > Add "vlb_clock=" parameter for specifying VLB clock frequency (in MHz).
> >
> > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
>
> Surely this value should be set once per system (ditto for PCI) not
> something you have to set in each specific driver on the box ?
Yeah, I'll re-do the patches. Thanks for pointing this out.
Bart
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2008-03-15 21:30 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-13 22:43 [PATCH 1/12] ali14xx: add "vlb_clock=" parameter Bartlomiej Zolnierkiewicz
2008-03-13 22:43 ` [PATCH 2/12] ht6560b: " Bartlomiej Zolnierkiewicz
2008-03-13 22:44 ` [PATCH 3/12] qd65xx: " Bartlomiej Zolnierkiewicz
2008-03-13 22:44 ` [PATCH 4/12] aec62xx: add "pci_clock=" parameter Bartlomiej Zolnierkiewicz
2008-03-13 22:44 ` [PATCH 5/12] alim15x3: " Bartlomiej Zolnierkiewicz
2008-03-13 22:44 ` [PATCH 6/12] amd74xx: " Bartlomiej Zolnierkiewicz
2008-03-13 22:44 ` [PATCH 7/12] cmd64x: " Bartlomiej Zolnierkiewicz
2008-03-13 22:44 ` [PATCH 8/12] cy82c693: " Bartlomiej Zolnierkiewicz
2008-03-13 22:44 ` [PATCH 9/12] opti621: " Bartlomiej Zolnierkiewicz
2008-03-13 22:44 ` [PATCH 10/12] via82cxxx: " Bartlomiej Zolnierkiewicz
2008-03-13 22:45 ` [PATCH 11/12] cmd640: add "cmd_clock=" parameter Bartlomiej Zolnierkiewicz
2008-03-13 22:45 ` [PATCH 12/12] ide: mark "idebus=" kernel parameter as obsoleted Bartlomiej Zolnierkiewicz
2008-03-15 12:36 ` [PATCH 1/12] ali14xx: add "vlb_clock=" parameter Alan Cox
2008-03-15 21:44 ` Bartlomiej Zolnierkiewicz
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).