linux-mips
[Top] [All Lists]

au1500 cache coherency PCI and USB

To: linux-mips@linux-mips.org
Subject: au1500 cache coherency PCI and USB
From: Bruno Randolf <bruno.randolf@4g-systems.biz>
Date: Thu, 25 Nov 2004 21:04:17 +0100
Cc: Pete Popov <ppopov@embeddedalley.com>
Organization: 4G Systems
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: KMail/1.7.1
hello!

i have previously reported on the problems we have using CONFIG_NONCOHERENT_IO 
on Au1500 AD stepping systems (mtx-1):
* USB host only works reliably if we set CONFIG_NONCOHERENT_IO=y.
* the prims54 wlan driver on PCI only works when we have
  CONFIG_NONCOHERENT_IO=n.
so up to now prism54 and USB were mutually exclusive. 

i have now found a way to use both USB host and a prism54 card at the same 
time with the modifications in the patch at the end of this mail. it sets the 
"NC" bit for PCI only on pre-AC silicon stepping CPUs, as it was already 
mentioned in the comment. but, actually i have to commit, that i'm not 
totally sure of what i am doing and if this would be the right way to do it. 
but it seems to work well...

greetings,
bruno

--- 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);

Attachment: pgpmqjhjEbTf1.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>
  • au1500 cache coherency PCI and USB, Bruno Randolf <=