patch-2.4.25 linux-2.4.25/arch/mips/vr41xx/common/pciu.c
Next file: linux-2.4.25/arch/mips/vr41xx/common/pciu.h
Previous file: linux-2.4.25/arch/mips/vr41xx/common/ksyms.c
Back to the patch index
Back to the overall index
- Lines: 42
- Date:
2004-02-18 05:36:30.000000000 -0800
- Orig file:
linux-2.4.24/arch/mips/vr41xx/common/pciu.c
- Orig date:
2003-08-25 04:44:40.000000000 -0700
diff -urN linux-2.4.24/arch/mips/vr41xx/common/pciu.c linux-2.4.25/arch/mips/vr41xx/common/pciu.c
@@ -51,8 +51,6 @@
#include "pciu.h"
-extern unsigned long vr41xx_vtclock;
-
static inline int vr41xx_pci_config_access(struct pci_dev *dev, int where)
{
unsigned char bus = dev->bus->number;
@@ -74,7 +72,7 @@
/*
* Type 1 configuration
*/
- if (bus > 255 || PCI_SLOT(dev_fn) > 31 || where > 255)
+ if (PCI_SLOT(dev_fn) > 31 || where > 255)
return -1;
writel((bus << 16) |
@@ -196,6 +194,7 @@
void __init vr41xx_pciu_init(struct vr41xx_pci_address_map *map)
{
struct vr41xx_pci_address_space *s;
+ unsigned long vtclock;
u32 config;
int n;
@@ -215,11 +214,12 @@
udelay(1);
/* Select PCI clock */
- if (vr41xx_vtclock < MAX_PCI_CLOCK)
+ vtclock = vr41xx_get_vtclock_frequency();
+ if (vtclock < MAX_PCI_CLOCK)
writel(EQUAL_VTCLOCK, PCICLKSELREG);
- else if ((vr41xx_vtclock / 2) < MAX_PCI_CLOCK)
+ else if ((vtclock / 2) < MAX_PCI_CLOCK)
writel(HALF_VTCLOCK, PCICLKSELREG);
- else if ((vr41xx_vtclock / 4) < MAX_PCI_CLOCK)
+ else if ((vtclock / 4) < MAX_PCI_CLOCK)
writel(QUARTER_VTCLOCK, PCICLKSELREG);
else
printk(KERN_INFO "Warning: PCI Clock is over 33MHz.\n");
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)