git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
arch
/
mips
/
pci
/
ops-titan.c
diff --git
a/arch/mips/pci/ops-titan.c
b/arch/mips/pci/ops-titan.c
index
233ec6f
..
ebf8fc4
100644
(file)
--- a/
arch/mips/pci/ops-titan.c
+++ b/
arch/mips/pci/ops-titan.c
@@
-26,8
+26,19
@@
#include <linux/pci.h>
#include <linux/kernel.h>
#include <linux/pci.h>
#include <linux/kernel.h>
-#include <asm/titan_dep.h>
+#include <asm/pci.h>
+#include <asm/io.h>
+#include <asm/rm9k-ocd.h>
+/*
+ * PCI specific defines
+ */
+#define TITAN_PCI_0_CONFIG_ADDRESS 0x780
+#define TITAN_PCI_0_CONFIG_DATA 0x784
+
+/*
+ * Titan PCI Config Read Byte
+ */
static int titan_read_config(struct pci_bus *bus, unsigned int devfn, int reg,
int size, u32 * val)
{
static int titan_read_config(struct pci_bus *bus, unsigned int devfn, int reg,
int size, u32 * val)
{
@@
-43,8
+54,8
@@
static int titan_read_config(struct pci_bus *bus, unsigned int devfn, int reg,
/* start the configuration cycle */
/* start the configuration cycle */
-
TITAN_WRITE(TITAN_PCI_0_CONFIG_ADDRESS, address
);
- tmp =
TITAN_READ
(TITAN_PCI_0_CONFIG_DATA) >> ((reg & 3) << 3);
+
ocd_writel(address, TITAN_PCI_0_CONFIG_ADDRESS
);
+ tmp =
ocd_readl
(TITAN_PCI_0_CONFIG_DATA) >> ((reg & 3) << 3);
switch (size) {
case 1:
switch (size) {
case 1:
@@
-71,20
+82,20
@@
static int titan_write_config(struct pci_bus *bus, unsigned int devfn, int reg,
(reg & 0xfc) | 0x80000000;
/* start the configuration cycle */
(reg & 0xfc) | 0x80000000;
/* start the configuration cycle */
-
TITAN_WRITE(TITAN_PCI_0_CONFIG_ADDRESS, address
);
+
ocd_writel(address, TITAN_PCI_0_CONFIG_ADDRESS
);
/* write the data */
switch (size) {
case 1:
/* write the data */
switch (size) {
case 1:
-
TITAN_WRITE_8(TITAN_PCI_0_CONFIG_DATA + (~reg & 0x3), val
);
+
ocd_writeb(val, TITAN_PCI_0_CONFIG_DATA + (~reg & 0x3)
);
break;
case 2:
break;
case 2:
-
TITAN_WRITE_16(TITAN_PCI_0_CONFIG_DATA + (~reg & 0x2), val
);
+
ocd_writew(val, TITAN_PCI_0_CONFIG_DATA + (~reg & 0x2)
);
break;
case 4:
break;
case 4:
-
TITAN_WRITE(TITAN_PCI_0_CONFIG_DATA, val
);
+
ocd_writel(val, TITAN_PCI_0_CONFIG_DATA
);
break;
}
break;
}