linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Problems with PCI on 8280
@ 2008-01-17 21:33 Rune Torgersen
  2008-01-17 22:02 ` Scott Wood
  0 siblings, 1 reply; 6+ messages in thread
From: Rune Torgersen @ 2008-01-17 21:33 UTC (permalink / raw)
  To: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 3108 bytes --]

Hi.
 We have e 8280 bioard with PCI. We have three memory ranges set up;
0x8000_0000 to 0x8fff_ffff is prefetchable memory
0x9000_0000 to 0x97ff_ffff is non-prefetchable memory
0x9800_0000 to 0x9800_ffff is IO.

our device tree has
ranges = <42000000 0 80000000 80000000 0 10000000    // Pre-fetch memory
	  02000000 0 90000000 90000000 0 08000000    // Normal Memory
	  01000000 0 98000000 98000000 0 00010000>;  // I/O

for the memory ranges in the PCI node (full node at the end)

Our problem is that we can only access the first 128MB of the prefetchable area.
an access to 0x87ff_ffff works (after ioremap), while an access to 0x8800_0000 causes an bus error.

trying to access 0x87FFFFFC -> 0x00000000
trying to access 0x88000000 ->Machine check in kernel mode.
Caused by (from SRR1=49030): Transfer error ack signal

It is like the prefetch area is not set up correctly for ioremap.

The PCI registers are set up correctly in u-boot, and we can access the whole prefetch area in u-boot without any problems.

pci node in device tree:

	pci@f0010800 {
		device_type = "pci";
		reg = <f0010800 10c f00101ac 8 f00101c4 8>;
		compatible = "fsl,mpc8280-pci", "apmax-pci", "fsl,pq2-pci";
		#interrupt-cells = <1>;
		#size-cells = <2>;
		#address-cells = <3>;
		clock-frequency = <d#49766400>;               // For our board.
		interrupt-map-mask = <f800 0 0 7>;            // Anded with the interrupt-map values
		interrupt-map = <
		                /* IDSEL 0x11 */
		                00008800 0 0 1 &PCI_INT 5>;   // 3 first numbers pci device specifier are: (buss << 16 | id_sel << 11) 0 0
		                                              //    buss = 0, id_sel = 11
		                                              // Next number is interrupt 1-4 mapped A-D (interrupt A for us)
		                                              // Last two numbers are host interrupt specifier (external interrupt 5)

		//interrupt-parent = <&PIC>;
		interrupt-parent = <&PCI_INT>; 
		// interrupts = <12 8>;
               // Mem type 0 Bus Add  Loc. Add 0 Length      <<--- Remember the mem type is little endian
		ranges = <42000000 0 80000000 80000000 0 10000000    // Pre-fetch memory
		          02000000 0 90000000 90000000 0 08000000    // Normal Memory
		          01000000 0 98000000 98000000 0 00010000>;  // I/O
		          
        bus-range = <0 ff>;
        pci@12 {
    		device_type = "pci";
            reg = <9000 0 0 0 0>;
    		#interrupt-cells = <1>;
    		#size-cells = <2>;
    		#address-cells = <3>;
    		interrupt-parent = <&PCI_INT>; 
    		interrupt-map-mask = <0f800 0 0 7>;
    		interrupt-map = <
    		                /* IDSEL 0x10 */
    		                00000000 0 0 1 &PCI_INT 1

    		                /* IDSEL 0x11 */
    		                00000800 0 0 1 &PCI_INT 2
    		                
    		                /* IDSEL 0x12 */
    		                00001000 0 0 1 &PCI_INT 3
    		                
    		                /* IDSEL 0x13 */
    		                00001800 0 0 1 &PCI_INT 4 >;
        };
	};





[-- Attachment #2: Type: text/html, Size: 9417 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-01-18 18:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-17 21:33 Problems with PCI on 8280 Rune Torgersen
2008-01-17 22:02 ` Scott Wood
2008-01-17 23:05   ` Rune Torgersen
2008-01-17 23:18     ` Scott Wood
2008-01-18  0:27       ` Rune Torgersen
2008-01-18 17:07         ` Scott Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).