summaryrefslogtreecommitdiff
path: root/packages/linux/linux-mtx-1-2.4.27/15-au1000-pci-fixup-non-coherent-pre-ac.diff
blob: 0a3896433afcab33dd4fe48fef69fd7620f361a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- linux/arch/mips/au1000/common/pci_fixup.c.orig	2004-11-25 20:14:24.907902616 +0100
+++ linux/arch/mips/au1000/common/pci_fixup.c	2004-11-25 20:27:08.842766864 +0100
@@ -75,10 +75,13 @@
 
 #ifdef CONFIG_NONCOHERENT_IO
 	/* 
-	 *  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);