* MPC8360 : PCI resource allocate error @ 2007-02-02 15:04 Russell McGuire 2007-02-02 15:27 ` Kumar Gala 0 siblings, 1 reply; 9+ messages in thread From: Russell McGuire @ 2007-02-02 15:04 UTC (permalink / raw) To: linuxppc-embedded [-- Attachment #1: Type: text/plain, Size: 1363 bytes --] While trying out various of my PCI slots, I ran into this interesting error. If I try to put a sounc card, Audigy SE, into SLOT 1 and 2 this error doesn't occur. But when I place it in the 3rd. I get this: <Note the 02:0b is SLOT 3> <Linux 2.6.20-rc6 compiled for PowerPC / MPC83xx> -------------------------------------- PCI: Probing PCI hardware Try to map irq for 0000:00:19.0... pci_busdev_to_OF_node(0,0xc8) parent is /soc8360@f0000000/pci@8500 result is <NULL> Try to map irq for 0000:00:19.1... pci_busdev_to_OF_node(0,0xc9) parent is /soc8360@f0000000/pci@8500 result is <NULL> Try to map irq for 0000:02:0b.0... pci_busdev_to_OF_node(2,0x58) pci_busdev_to_OF_node(0,0xc9) parent is /soc8360@f0000000/pci@8500 result is <NULL> -> got one, spec 2 cells (0x00000017...) on /soc8360@f0000000/pic@700 PCI: bridge rsrc 0..ffffffff (100), parent c038d184 PCI: bridge rsrc 80000000..8fffffff (1200), parent c038d168 PCI: bridge rsrc 90000000..9fffffff (200), parent c038d168 PCI: bridge rsrc f0302000..f0302fff (101), parent c03da03c PCI:0000:02:0b.0: Resource 0: 0000000000302000-000000000030201f (f=101) PCI: Cannot allocate resource region 0 of device 0000:02:0b.0 PCI: Error while updating region 0000:02:0b.0/0 (f0302001 != 00302001) ------------------------------ What can cause this to not work? -Russ [-- Attachment #2: Type: text/html, Size: 7906 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MPC8360 : PCI resource allocate error 2007-02-02 15:04 MPC8360 : PCI resource allocate error Russell McGuire @ 2007-02-02 15:27 ` Kumar Gala 2007-02-02 16:01 ` Russell McGuire 0 siblings, 1 reply; 9+ messages in thread From: Kumar Gala @ 2007-02-02 15:27 UTC (permalink / raw) To: rmcguire; +Cc: linuxppc-embedded On Feb 2, 2007, at 9:04 AM, Russell McGuire wrote: > While trying out various of my PCI slots, I ran into this =20 > interesting error. > > > > If I try to put a sounc card, Audigy SE, into SLOT 1 and 2 this =20 > error doesn=92t occur. > > But when I place it in the 3rd. I get this: <Note the 02:0b is =20 > SLOT 3> > > > > <Linux 2.6.20-rc6 compiled for PowerPC / MPC83xx> > > > > -------------------------------------- > > PCI: Probing PCI hardware > > Try to map irq for 0000:00:19.0... > > pci_busdev_to_OF_node(0,0xc8) > > parent is /soc8360@f0000000/pci@8500 > > result is <NULL> > > Try to map irq for 0000:00:19.1... > > pci_busdev_to_OF_node(0,0xc9) > > parent is /soc8360@f0000000/pci@8500 > > result is <NULL> > > Try to map irq for 0000:02:0b.0... > > pci_busdev_to_OF_node(2,0x58) > > pci_busdev_to_OF_node(0,0xc9) > > parent is /soc8360@f0000000/pci@8500 > > result is <NULL> > > -> got one, spec 2 cells (0x00000017...) on /soc8360@f0000000/pic@700 > > PCI: bridge rsrc 0..ffffffff (100), parent c038d184 > > PCI: bridge rsrc 80000000..8fffffff (1200), parent c038d168 > > PCI: bridge rsrc 90000000..9fffffff (200), parent c038d168 > > PCI: bridge rsrc f0302000..f0302fff (101), parent c03da03c > > PCI:0000:02:0b.0: Resource 0: 0000000000302000-000000000030201f =20 > (f=3D101) > > PCI: Cannot allocate resource region 0 of device 0000:02:0b.0 > > PCI: Error while updating region 0000:02:0b.0/0 (f0302001 !=3D = 00302001) > > ------------------------------ > > > > What can cause this to not work? The problem is with the IO resource, for some reason the code things =20 your PCI IO space is at f03... instead of 000... Is Slot 3 behind the P2P bridge or directly connected to the 83xx? Also, what's your .dts look like now. - k= ^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: MPC8360 : PCI resource allocate error 2007-02-02 15:27 ` Kumar Gala @ 2007-02-02 16:01 ` Russell McGuire 2007-02-02 16:07 ` Kumar Gala 0 siblings, 1 reply; 9+ messages in thread From: Russell McGuire @ 2007-02-02 16:01 UTC (permalink / raw) To: 'Kumar Gala'; +Cc: linuxppc-embedded Here is the current .dts mapping, though I am beginning to suspect the hardware or a possible U-boot bug on this. U-boot can't see the PCI USB card in SLOT 3, but it can see the all of the other various PCI cards I have <ATI video card, sound card, ATA card, network card> All the cards that are seen by U-boot have the IO resource problem. Only when in Slot 3. I probably need to direct this at the U-boot crowd, but what about these defines in U-boot? Would they have any bearing? I forgot to publish these when I originally had asked the question bout PCI IO space, but they are the only ALL zero's in the mapping. -------------STUFF I FORGET TO PUBLISH ------- #define CFG_PCI_SLV_MEM_LOCAL CFG_SDRAM_BASE //= 0x0000_0000 #define CFG_PCI_SLV_MEM_BUS 0x00000000 #define CFG_PCI_SLV_MEM_SIZE 0x80000000 //Should this be 2GB???? ---------------------------------------------- -------------------- OTHER U-BOOT DEFINES -------- #define CFG_PCI_MEM_BASE 0x80000000 #define CFG_PCI_MEM_PHYS CFG_PCI_MEM_BASE #define CFG_PCI_MEM_SIZE 0x10000000 /* 256M */ #define CFG_PCI_MMIO_BASE 0x90000000 #define CFG_PCI_MMIO_PHYS CFG_PCI_MMIO_BASE #define CFG_PCI_MMIO_SIZE 0x10000000 /* 256M */ #define CFG_PCI_IO_BASE 0xF0300000 #define CFG_PCI_IO_PHYS 0xF0300000 #define CFG_PCI_IO_SIZE 0x00100000 /* 1M */ -------------------------------------------------- Here is the dts section --------------------- pci@8500 { linux,phandle = <8500>; interrupt-map-mask = <3f800 0 0 7>; interrupt-map = < /* IDSEL 0x19 AD25 */ c800 0 0 1 700 14 8 c800 0 0 2 700 15 8 c800 0 0 3 700 16 8 c800 0 0 4 700 17 8 /* IDSEL 0x1B AD27 */ 15800 0 0 1 700 14 8 15800 0 0 2 700 15 8 15800 0 0 3 700 16 8 15800 0 0 4 700 17 8 /* IDSEL 0x1E AD30*/ 17000 0 0 1 700 14 8 17000 0 0 2 700 15 8 17000 0 0 3 700 16 8 17000 0 0 4 700 17 8 /* IDSEL 0x1B AD27 */ 25800 0 0 1 700 14 8 25800 0 0 2 700 15 8 25800 0 0 3 700 16 8 25800 0 0 4 700 17 8 >; interrupt-parent = <700>; interrupts = <42 8>; bus-range = <0 0>; ranges = <42000000 0 80000000 80000000 0 10000000 02000000 0 90000000 90000000 0 10000000 01000000 0 f0300000 f0300000 0 00100000>; clock-frequency = <3f940aa>; #interrupt-cells = <1>; #size-cells = <2>; #address-cells = <3>; reg = <8500 100>; compatible = "83xx"; device_type = "pci"; }; -------------- END DTS -------------- -----Original Message----- From: Kumar Gala [mailto:galak@kernel•crashing.org] Sent: Friday, February 02, 2007 7:28 AM To: rmcguire@videopresence•com Cc: linuxppc-embedded@ozlabs•org Subject: Re: MPC8360 : PCI resource allocate error On Feb 2, 2007, at 9:04 AM, Russell McGuire wrote: > While trying out various of my PCI slots, I ran into this > interesting error. > > > > If I try to put a sounc card, Audigy SE, into SLOT 1 and 2 this > error doesn't occur. > > But when I place it in the 3rd. I get this: <Note the 02:0b is > SLOT 3> > > > > <Linux 2.6.20-rc6 compiled for PowerPC / MPC83xx> > > > > -------------------------------------- > > PCI: Probing PCI hardware > > Try to map irq for 0000:00:19.0... > > pci_busdev_to_OF_node(0,0xc8) > > parent is /soc8360@f0000000/pci@8500 > > result is <NULL> > > Try to map irq for 0000:00:19.1... > > pci_busdev_to_OF_node(0,0xc9) > > parent is /soc8360@f0000000/pci@8500 > > result is <NULL> > > Try to map irq for 0000:02:0b.0... > > pci_busdev_to_OF_node(2,0x58) > > pci_busdev_to_OF_node(0,0xc9) > > parent is /soc8360@f0000000/pci@8500 > > result is <NULL> > > -> got one, spec 2 cells (0x00000017...) on /soc8360@f0000000/pic@700 > > PCI: bridge rsrc 0..ffffffff (100), parent c038d184 > > PCI: bridge rsrc 80000000..8fffffff (1200), parent c038d168 > > PCI: bridge rsrc 90000000..9fffffff (200), parent c038d168 > > PCI: bridge rsrc f0302000..f0302fff (101), parent c03da03c > > PCI:0000:02:0b.0: Resource 0: 0000000000302000-000000000030201f > (f=101) > > PCI: Cannot allocate resource region 0 of device 0000:02:0b.0 > > PCI: Error while updating region 0000:02:0b.0/0 (f0302001 != 00302001) > > ------------------------------ > > > > What can cause this to not work? The problem is with the IO resource, for some reason the code things your PCI IO space is at f03... instead of 000... Is Slot 3 behind the P2P bridge or directly connected to the 83xx? Also, what's your .dts look like now. - k ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MPC8360 : PCI resource allocate error 2007-02-02 16:01 ` Russell McGuire @ 2007-02-02 16:07 ` Kumar Gala 2007-02-03 5:32 ` Russell McGuire 2007-02-06 0:51 ` Russell McGuire 0 siblings, 2 replies; 9+ messages in thread From: Kumar Gala @ 2007-02-02 16:07 UTC (permalink / raw) To: rmcguire; +Cc: linuxppc-embedded On Feb 2, 2007, at 10:01 AM, Russell McGuire wrote: > Here is the current .dts mapping, though I am beginning to suspect the > hardware or a possible U-boot bug on this. > > U-boot can't see the PCI USB card in SLOT 3, but it can see the all > of the > other various PCI cards I have <ATI video card, sound card, ATA card, > network card> Are any cards detected in SLOT 3 with u-boot? If not, I'd think HW as well. > All the cards that are seen by U-boot have the IO resource problem. > Only > when in Slot 3. > > I probably need to direct this at the U-boot crowd, but what about > these > defines in U-boot? Would they have any bearing? I forgot to publish > these > when I originally had asked the question bout PCI IO space, but > they are the > only ALL zero's in the mapping. They shouldn't on just seeing the device. Since PCI config cycles are used and U-boot will scan all busses you should at least see the device. - k ^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: MPC8360 : PCI resource allocate error 2007-02-02 16:07 ` Kumar Gala @ 2007-02-03 5:32 ` Russell McGuire 2007-02-05 16:16 ` Timur Tabi 2007-02-05 16:19 ` Kumar Gala 2007-02-06 0:51 ` Russell McGuire 1 sibling, 2 replies; 9+ messages in thread From: Russell McGuire @ 2007-02-03 5:32 UTC (permalink / raw) To: 'Kumar Gala'; +Cc: linuxppc-embedded Comments in line: > On Feb 2, 2007, at 10:01 AM, Russell McGuire wrote: > > > Here is the current .dts mapping, though I am beginning to suspect the > > hardware or a possible U-boot bug on this. > > > > U-boot can't see the PCI USB card in SLOT 3, but it can see the all > > of the > > other various PCI cards I have <ATI video card, sound card, ATA card, > > network card> > > Are any cards detected in SLOT 3 with u-boot? If not, I'd think HW > as well. Yes, actually of the 6 cards I have, all are seen except the USB card. And the USB card is seen in all other slots. So it appears to be a SLOT issue, but not a card issue. Somehow this card is unique and uncovering an error that I don't know about yet. Perhaps I have a single address line sizzled or something. This is the same slot that has the IO resource allocation problems; I don't think I need to debug that in Linux. OR.. Is there any PCI test code out there??? Maybe I should forego the drivers, and figure out some kind of test. I made a blind assumption in U-boot that if it worked to detect cards that everything was in order. > > > All the cards that are seen by U-boot have the IO resource problem. > > Only > > when in Slot 3. > > > > I probably need to direct this at the U-boot crowd, but what about > > these > > defines in U-boot? Would they have any bearing? I forgot to publish > > these > > when I originally had asked the question bout PCI IO space, but > > they are the > > only ALL zero's in the mapping. > > They shouldn't on just seeing the device. Since PCI config cycles > are used and U-boot will scan all busses you should at least see the > device. > > - k ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MPC8360 : PCI resource allocate error 2007-02-03 5:32 ` Russell McGuire @ 2007-02-05 16:16 ` Timur Tabi 2007-02-05 16:19 ` Kumar Gala 1 sibling, 0 replies; 9+ messages in thread From: Timur Tabi @ 2007-02-05 16:16 UTC (permalink / raw) To: rmcguire; +Cc: linuxppc-embedded Russell McGuire wrote: > Yes, actually of the 6 cards I have, all are seen except the USB card. > And the USB card is seen in all other slots. So it appears to be a SLOT > issue, but not a card issue. Somehow this card is unique and uncovering an > error that I don't know about yet. Perhaps I have a single address line > sizzled or something. This is the same slot that has the IO resource > allocation problems; I don't think I need to debug that in Linux. It could also be a card ordering problem. In the x86 world, I've seen issues where a particular card had to be located at a higher/lower PCI slot than some other card. However, my guess is that the USB card depends on a particular pin that none of your cards uses, and that pin is busted in slot 3. -- Timur Tabi Linux Kernel Developer @ Freescale ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MPC8360 : PCI resource allocate error 2007-02-03 5:32 ` Russell McGuire 2007-02-05 16:16 ` Timur Tabi @ 2007-02-05 16:19 ` Kumar Gala 1 sibling, 0 replies; 9+ messages in thread From: Kumar Gala @ 2007-02-05 16:19 UTC (permalink / raw) To: rmcguire; +Cc: linuxppc-embedded On Feb 2, 2007, at 11:32 PM, Russell McGuire wrote: > Comments in line: > >> On Feb 2, 2007, at 10:01 AM, Russell McGuire wrote: >> >>> Here is the current .dts mapping, though I am beginning to >>> suspect the >>> hardware or a possible U-boot bug on this. >>> >>> U-boot can't see the PCI USB card in SLOT 3, but it can see the all >>> of the >>> other various PCI cards I have <ATI video card, sound card, ATA >>> card, >>> network card> >> >> Are any cards detected in SLOT 3 with u-boot? If not, I'd think HW >> as well. > > Yes, actually of the 6 cards I have, all are seen except the USB card. > And the USB card is seen in all other slots. So it appears to be a > SLOT > issue, but not a card issue. Somehow this card is unique and > uncovering an > error that I don't know about yet. Perhaps I have a single address > line > sizzled or something. This is the same slot that has the IO resource > allocation problems; I don't think I need to debug that in Linux. > > OR.. > > Is there any PCI test code out there??? Maybe I should forego the > drivers, > and figure out some kind of test. I made a blind assumption in U- > boot that > if it worked to detect cards that everything was in order. The only thing that u-boot seeing a card tests is that PCI config cycles are working. It doesn't cover anything like bus mastering, or interrupts, etc. (and there is still a possibility of address/data line problems). - k ^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: MPC8360 : PCI resource allocate error 2007-02-02 16:07 ` Kumar Gala 2007-02-03 5:32 ` Russell McGuire @ 2007-02-06 0:51 ` Russell McGuire 2007-02-06 14:51 ` Kumar Gala 1 sibling, 1 reply; 9+ messages in thread From: Russell McGuire @ 2007-02-06 0:51 UTC (permalink / raw) To: 'Kumar Gala'; +Cc: linuxppc-embedded I think I might be getting someplace on this debugging of the PCI slots. I solved the erratic SLOT 3 issue, it was a hardware problem. A net was unconnected, I should shoot the designer. Anyway, this was fixed that so all slots are 100% consistent. I think general issue is probably a setup problem with the PCI bridge chip. Though I do not know how U-boot and Linux set up the bridge. But after reading through the Bridge documentation, I have learned that each bus must have the memory map declared in it, for all three memory spaces. I.e. the base and the upper limit for each mem, mmio, and IO space. When I boot into Linux, with PCI cards plugged in, and I read these registers it looks as if the base address is correct, but the upper limit is actually set one byte below the base address. To me this effectively prevents all access to the memory region, halting it at the bridge chip. Would explain why the only region I can seem to read is the configuration space. I guess the question is, does Linux only enable these ranges if a card is actively using them. Or is BIOS supposed to have these enabled before the OS gets access to the bridge? > -----Original Message----- > From: Kumar Gala [mailto:galak@kernel•crashing.org] > Sent: Friday, February 02, 2007 8:07 AM > To: rmcguire@videopresence•com > Cc: linuxppc-embedded@ozlabs•org > Subject: Re: MPC8360 : PCI resource allocate error > > > On Feb 2, 2007, at 10:01 AM, Russell McGuire wrote: > > > Here is the current .dts mapping, though I am beginning to suspect the > > hardware or a possible U-boot bug on this. > > > > U-boot can't see the PCI USB card in SLOT 3, but it can see the all > > of the > > other various PCI cards I have <ATI video card, sound card, ATA card, > > network card> > > Are any cards detected in SLOT 3 with u-boot? If not, I'd think HW > as well. > > > All the cards that are seen by U-boot have the IO resource problem. > > Only > > when in Slot 3. > > > > I probably need to direct this at the U-boot crowd, but what about > > these > > defines in U-boot? Would they have any bearing? I forgot to publish > > these > > when I originally had asked the question bout PCI IO space, but > > they are the > > only ALL zero's in the mapping. > > They shouldn't on just seeing the device. Since PCI config cycles > are used and U-boot will scan all busses you should at least see the > device. > > - k ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MPC8360 : PCI resource allocate error 2007-02-06 0:51 ` Russell McGuire @ 2007-02-06 14:51 ` Kumar Gala 0 siblings, 0 replies; 9+ messages in thread From: Kumar Gala @ 2007-02-06 14:51 UTC (permalink / raw) To: rmcguire; +Cc: linuxppc-embedded On Feb 5, 2007, at 6:51 PM, Russell McGuire wrote: > > I think I might be getting someplace on this debugging of the PCI > slots. > > I solved the erratic SLOT 3 issue, it was a hardware problem. A net > was > unconnected, I should shoot the designer. Anyway, this was fixed > that so all > slots are 100% consistent. > > I think general issue is probably a setup problem with the PCI > bridge chip. > Though I do not know how U-boot and Linux set up the bridge. > > But after reading through the Bridge documentation, I have learned > that each > bus must have the memory map declared in it, for all three memory > spaces. > I.e. the base and the upper limit for each mem, mmio, and IO space. > > When I boot into Linux, with PCI cards plugged in, and I read these > registers it looks as if the base address is correct, but the upper > limit is > actually set one byte below the base address. To me this effectively > prevents all access to the memory region, halting it at the bridge > chip. > Would explain why the only region I can seem to read is the > configuration > space. > > I guess the question is, does Linux only enable these ranges if a > card is > actively using them. Or is BIOS supposed to have these enabled > before the OS > gets access to the bridge? In theory Linux should be able to handle this, in practice its easier to have u-boot setup the bridges. I'd ask around on the u-boot list about how to use the u-boot mechanisms to preconfigure devices (if its not obvious from the code). - k ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-02-06 14:52 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-02-02 15:04 MPC8360 : PCI resource allocate error Russell McGuire 2007-02-02 15:27 ` Kumar Gala 2007-02-02 16:01 ` Russell McGuire 2007-02-02 16:07 ` Kumar Gala 2007-02-03 5:32 ` Russell McGuire 2007-02-05 16:16 ` Timur Tabi 2007-02-05 16:19 ` Kumar Gala 2007-02-06 0:51 ` Russell McGuire 2007-02-06 14:51 ` Kumar Gala
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox