patch-2.4.22 linux-2.4.22/arch/mips/ite-boards/generic/it8172_pci.c
Next file: linux-2.4.22/arch/mips/ite-boards/generic/it8172_rtc.c
Previous file: linux-2.4.22/arch/mips/ite-boards/generic/irq.c
Back to the patch index
Back to the overall index
- Lines: 119
- Date:
2003-08-25 04:44:40.000000000 -0700
- Orig file:
linux-2.4.21/arch/mips/ite-boards/generic/it8172_pci.c
- Orig date:
2002-08-02 17:39:43.000000000 -0700
diff -urN linux-2.4.21/arch/mips/ite-boards/generic/it8172_pci.c linux-2.4.22/arch/mips/ite-boards/generic/it8172_pci.c
@@ -53,15 +53,15 @@
static struct resource pci_mem_resource_1;
static struct resource pci_io_resource = {
- "io pci IO space",
- 0x14000000,
+ "io pci IO space",
+ 0x14018000,
0x17FFFFFF,
IORESOURCE_IO
};
static struct resource pci_mem_resource_0 = {
- "ext pci memory space 0/1",
- 0x0C000000,
+ "ext pci memory space 0/1",
+ 0x10101000,
0x13FFFFFF,
IORESOURCE_MEM,
&pci_mem_resource_0,
@@ -70,7 +70,7 @@
};
static struct resource pci_mem_resource_1 = {
- "ext pci memory space 2/3",
+ "ext pci memory space 2/3",
0x1A000000,
0x1FBFFFFF,
IORESOURCE_MEM,
@@ -82,7 +82,7 @@
extern struct pci_ops it8172_pci_ops;
struct pci_channel mips_pci_channels[] = {
- { &it8172_pci_ops, &pci_io_resource, &pci_mem_resource_0, 0, 0xff },
+ { &it8172_pci_ops, &pci_io_resource, &pci_mem_resource_0, 0x10, 0xff },
{ NULL, NULL, NULL, NULL, NULL}
};
@@ -90,7 +90,7 @@
it8172_pcibios_config_access(unsigned char access_type, struct pci_dev *dev,
unsigned char where, u32 *data)
{
- /*
+ /*
* config cycles are on 4 byte boundary only
*/
unsigned char bus = dev->bus->number;
@@ -100,13 +100,13 @@
access_type, dev, bus, dev_fn, *data);
/* Setup address */
- IT_WRITE(IT_CONFADDR, (bus << IT_BUSNUM_SHF) |
+ IT_WRITE(IT_CONFADDR, (bus << IT_BUSNUM_SHF) |
(dev_fn << IT_FUNCNUM_SHF) | (where & ~0x3));
if (access_type == PCI_ACCESS_WRITE) {
IT_WRITE(IT_CONFDATA, *data);
- }
+ }
else {
IT_READ(IT_CONFDATA, *data);
}
@@ -133,7 +133,7 @@
return -1;
*val = (data >> ((where & 3) << 3)) & 0xff;
- DBG("cfg read byte: bus %d dev_fn %x where %x: val %x\n",
+ DBG("cfg read byte: bus %d dev_fn %x where %x: val %x\n",
dev->bus->number, dev->devfn, where, *val);
return PCIBIOS_SUCCESSFUL;
@@ -152,7 +152,7 @@
return -1;
*val = (data >> ((where & 3) << 3)) & 0xffff;
- DBG("cfg read word: bus %d dev_fn %x where %x: val %x\n",
+ DBG("cfg read word: bus %d dev_fn %x where %x: val %x\n",
dev->bus->number, dev->devfn, where, *val);
return PCIBIOS_SUCCESSFUL;
@@ -165,12 +165,12 @@
if (where & 3)
return PCIBIOS_BAD_REGISTER_NUMBER;
-
+
if (it8172_pcibios_config_access(PCI_ACCESS_READ, dev, where, &data))
return -1;
*val = data;
- DBG("cfg read dword: bus %d dev_fn %x where %x: val %x\n",
+ DBG("cfg read dword: bus %d dev_fn %x where %x: val %x\n",
dev->bus->number, dev->devfn, where, *val);
return PCIBIOS_SUCCESSFUL;
@@ -181,7 +181,7 @@
write_config_byte (struct pci_dev *dev, int where, u8 val)
{
u32 data = 0;
-
+
if (it8172_pcibios_config_access(PCI_ACCESS_READ, dev, where, &data))
return -1;
@@ -201,11 +201,11 @@
if (where & 1)
return PCIBIOS_BAD_REGISTER_NUMBER;
-
+
if (it8172_pcibios_config_access(PCI_ACCESS_READ, dev, where, &data))
return -1;
- data = (data & ~(0xffff << ((where & 3) << 3))) |
+ data = (data & ~(0xffff << ((where & 3) << 3))) |
(val << ((where & 3) << 3));
if (it8172_pcibios_config_access(PCI_ACCESS_WRITE, dev, where, &data))
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)