Skip to contentSkip to conversation

pci_0 pci_1 mixup in ppc/platforms/chestnut.c

RFC PATCH In review Eric Sesterhenn / snakebyte 2 participants 2 messages Jan 19, 2006

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 pci_0 pci_1 mixup in ppc/platforms/chestnut.c

hi,

i am currently toying around with cp-miner
( http://opera.cs.uiuc.edu/Projects/ARTS/CP-Miner.htm ) and came across chesnut.c

        /* setup only PCI bus 0 (bus 1 not used) */
        si.pci_0.enable_bus = 1;
        si.pci_0.pci_io.cpu_base = CHESTNUT_PCI0_IO_PROC_ADDR;
        si.pci_0.pci_io.pci_base_hi = 0;
        si.pci_0.pci_io.pci_base_lo = CHESTNUT_PCI0_IO_PCI_ADDR;
        si.pci_0.pci_io.size = CHESTNUT_PCI0_IO_SIZE;

[...SNIP ... ]

                si.pci_1.acc_cntl_options[i] =
                    MV64360_PCI_ACC_CNTL_SNOOP_NONE |
                    MV64360_PCI_ACC_CNTL_SWAP_NONE |

[...]

since the commentary clearly states that only pci_0 is used i assume this is a bug and the si.pci_0.acc_cntl_options should be set?
Please cc me on replies since i am not subscribed.

arch/ppc/platforms/chestnut.c renamed from arch/ppc/platforms/chestnut.c.orig +1 -1
@@ -199,7 +199,7 @@ chestnut_setup_bridge(void)
 		si.mpsc_options[i] = MV64360_MPSC2MEM_SNOOP_NONE;
 		si.idma_options[i] = MV64360_IDMA2MEM_SNOOP_NONE;
 
-		si.pci_1.acc_cntl_options[i] =
+		si.pci_0.acc_cntl_options[i] =
 		    MV64360_PCI_ACC_CNTL_SNOOP_NONE |
 		    MV64360_PCI_ACC_CNTL_SWAP_NONE |
 		    MV64360_PCI_ACC_CNTL_MBURST_128_BYTES |
#1 lore raw

On Thu, Jan 19, 2006 at 02:59:19PM +0100, Eric Sesterhenn / snakebyte wrote:

<snip>

arch/ppc/platforms/chestnut.c chestnut_setup_bridge(void) · line 205

Quoted 12 lines
arch/ppc/platforms/chestnut.c renamed from arch/ppc/platforms/chestnut.c.orig +1 -1
@@ -199,7 +199,7 @@ chestnut_setup_bridge(void)
 		si.mpsc_options[i] = MV64360_MPSC2MEM_SNOOP_NONE;
 		si.idma_options[i] = MV64360_IDMA2MEM_SNOOP_NONE;
 
-		si.pci_1.acc_cntl_options[i] =
+		si.pci_0.acc_cntl_options[i] =
 		    MV64360_PCI_ACC_CNTL_SNOOP_NONE |
 		    MV64360_PCI_ACC_CNTL_SWAP_NONE |
 		    MV64360_PCI_ACC_CNTL_MBURST_128_BYTES |

Good catch. Note that the tree you should be submitting patches against is the powerpc.git tree. In this case, though, I expect the patch to apply cleanly to that tree.

Also, there are 2 place where that occurs. Mind fixing both?

Mark