au1500 cache coherency PCI and USB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: pgppJFOsw9cJV.pgp
Description: PGP signature


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux