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
/
au1000
/
common
/
pci.c
diff --git
a/arch/mips/au1000/common/pci.c
b/arch/mips/au1000/common/pci.c
index
d5ccbd2
..
9f8ce08
100644
(file)
--- a/
arch/mips/au1000/common/pci.c
+++ b/
arch/mips/au1000/common/pci.c
@@
-6,6
+6,8
@@
* Author: MontaVista Software, Inc.
* ppopov@mvista.com or source@mvista.com
*
* Author: MontaVista Software, Inc.
* ppopov@mvista.com or source@mvista.com
*
+ * Copyright (C) 2004 by Ralf Baechle (ralf@linux-mips.org)
+ *
* Support for all devices (greater than 16) added by David Gathright.
*
* This program is free software; you can redistribute it and/or modify it
* Support for all devices (greater than 16) added by David Gathright.
*
* This program is free software; you can redistribute it and/or modify it
@@
-28,28
+30,26
@@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
* with this program; if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <linux/config.h>
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <asm/mach-au1x00/au1000.h>
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <asm/mach-au1x00/au1000.h>
-#include <asm/pci_channel.h>
/* TBD */
static struct resource pci_io_resource = {
/* TBD */
static struct resource pci_io_resource = {
- "pci IO space",
-
(u32)PCI_IO_START
,
-
(u32)PCI_IO_END
,
- IORESOURCE_IO
+ .start = (resource_size_t)PCI_IO_START,
+
.end = (resource_size_t)PCI_IO_END
,
+
.name = "PCI IO space"
,
+
.flags =
IORESOURCE_IO
};
static struct resource pci_mem_resource = {
};
static struct resource pci_mem_resource = {
- "pci memory space",
-
(u32)PCI_MEM_START
,
-
(u32)PCI_MEM_END
,
- IORESOURCE_MEM
+ .start = (resource_size_t)PCI_MEM_START,
+
.end = (resource_size_t)PCI_MEM_END
,
+
.name = "PCI memory space"
,
+
.flags =
IORESOURCE_MEM
};
extern struct pci_ops au1x_pci_ops;
};
extern struct pci_ops au1x_pci_ops;
@@
-67,23
+67,23
@@
static unsigned long virt_io_addr;
static int __init au1x_pci_setup(void)
{
#if defined(CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1550)
static int __init au1x_pci_setup(void)
{
#if defined(CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1550)
- int i;
- struct pci_dev *dev;
-
- virt_io_addr = (unsigned long)ioremap(Au1500_PCI_IO_START,
+ virt_io_addr = (unsigned long)ioremap(Au1500_PCI_IO_START,
Au1500_PCI_IO_END - Au1500_PCI_IO_START + 1);
if (!virt_io_addr) {
printk(KERN_ERR "Unable to ioremap pci space\n");
Au1500_PCI_IO_END - Au1500_PCI_IO_START + 1);
if (!virt_io_addr) {
printk(KERN_ERR "Unable to ioremap pci space\n");
- return;
+ return
1
;
}
#ifdef CONFIG_DMA_NONCOHERENT
}
#ifdef CONFIG_DMA_NONCOHERENT
- /*
-
* Set the NC bit in controller for
pre-AC silicon
+ /*
+
* Set the NC bit in controller for Au1500
pre-AC silicon
*/
*/
- au_writel( 1<<16 | au_readl(Au1500_PCI_CFG), Au1500_PCI_CFG);
- printk("Non-coherent PCI accesses enabled\n");
+ u32 prid = read_c0_prid();
+ if ( (prid & 0xFF000000) == 0x01000000 && prid < 0x01030202) {
+ au_writel( 1<<16 | au_readl(Au1500_PCI_CFG), Au1500_PCI_CFG);
+ printk("Non-coherent PCI accesses enabled\n");
+ }
#endif
set_io_port_base(virt_io_addr);
#endif
set_io_port_base(virt_io_addr);