Trying a Promise Ultra/66 on powerpc
Quoted 6 lines · Michel Lanners
It seems that OpenFirmware is not doing its job well in initializing all PCI devices.For the planb driver, which uses an onboard PCI device (video input) known to OF (i.e Apple device), I need to set
PCI_COMMAND_MEMORY|PCI_COMMAND_MASTER|PCI_COMMAND_INVALIDATE. Or is it just a problem with IO space enabling, and memory is already switched on by OF?
OF will not enable memory space if there's no OF boot code on the board. I beleive it doesn the same with IO space (but I didn't check). The lack of PCI_COMMAND_INVALIDATE can be considered as an OF bug if the card already has PCI_COMMAND_MASTER set as a default. I think the kernel should add this to all devices at fixup time. (It should be harmless for non-master devices anyway).
Signature · 11 lines
Perso. e-mail: <mailto:[email protected]> Work e-mail: <mailto:[email protected]> BenH. Web : <http://calvaweb.calvacom.fr/bh40/> [[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. Please check http://lists.linuxppc.org/ ]] [[ and http://www.linuxppc.org/ for useful information before posting. ]]
On 29 Jul, this message from Benjamin Herrenschmidt echoed through cyberspace:
Quoted 9 lines · Michel Lanners
Quoted 7 lines
It seems that OpenFirmware is not doing its job well in initializing all PCI devices.For the planb driver, which uses an onboard PCI device (video input) known to OF (i.e Apple device), I need to set
PCI_COMMAND_MEMORY|PCI_COMMAND_MASTER|PCI_COMMAND_INVALIDATE. Or is it just a problem with IO space enabling, and memory is already switched on by OF?
Quoted 6 lines
OF will not enable memory space if there's no OF boot code on the board. I beleive it doesn the same with IO space (but I didn't check). The lack of
PCI_COMMAND_INVALIDATEcan be considered as an OF bug if the card already hasPCI_COMMAND_MASTERset as a default. I think the kernel should add this to all devices at fixup time. (It should be harmless for non-master devices anyway).
Right, according to 'Designing PCI cards and Drivers..', OF never enables neither memory space, nor IO space, neither ROM. It should, however, set both PCI_COMMAND_MASTER and PCI_COMMAND_INVALIDATE. I didn't chek, though...
I'm getting a patch ready that fixes this on the PMac plkatform. Geert, how about OF in your CHRP box? Does it need the enable fix as well?
Michel
-------------------------------------------------------------------------
Michel Lanners | " Read Philosophy. Study Art. 23, Rue Paul Henkes | Ask Questions. Make Mistakes. L-1710 Luxembourg | email [email protected] | http://www.cpu.lu/~mlan | Learn Always. "
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
Quoted 17 lines · Michel Lanners
On 29 Jul, this message from Benjamin Herrenschmidt echoed through cyberspace:
Quoted 9 lines · Michel Lanners
Quoted 7 lines
It seems that OpenFirmware is not doing its job well in initializing all PCI devices.For the planb driver, which uses an onboard PCI device (video input) known to OF (i.e Apple device), I need to set
PCI_COMMAND_MEMORY|PCI_COMMAND_MASTER|PCI_COMMAND_INVALIDATE. Or is it just a problem with IO space enabling, and memory is already switched on by OF?Quoted 6 lines
OF will not enable memory space if there's no OF boot code on the board. I beleive it doesn the same with IO space (but I didn't check). The lack of
PCI_COMMAND_INVALIDATEcan be considered as an OF bug if the card already hasPCI_COMMAND_MASTERset as a default. I think the kernel should add this to all devices at fixup time. (It should be harmless for non-master devices anyway).
Quoted 7 lines
Right, according to 'Designing PCI cards and Drivers..', OF never enables neither memory space, nor IO space, neither ROM. It should, however, set both
PCI_COMMAND_MASTERandPCI_COMMAND_INVALIDATE. I didn't chek, though...I'm getting a patch ready that fixes this on the PMac plkatform. Geert, how about OF in your CHRP box? Does it need the enable fix as well?
Yep, my OF neither enables memory spaces on devices it doesn't have a driver for. It even doesn't allocate space to them.
Greetings,
Geert
--
Geert Uytterhoeven [email protected]
Wavelets, Linux/{m68k~Amiga,PPC~CHRP} http://www.cs.kuleuven.ac.be/~geert/
Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
On 8 Aug, this message from Geert Uytterhoeven echoed through cyberspace:
Quoted 11 lines · Michel Lanners
Quoted 7 lines
Right, according to 'Designing PCI cards and Drivers..', OF never enables neither memory space, nor IO space, neither ROM. It should, however, set both
PCI_COMMAND_MASTERandPCI_COMMAND_INVALIDATE. I didn't chek, though...I'm getting a patch ready that fixes this on the PMac plkatform. Geert, how about OF in your CHRP box? Does it need the enable fix as well?
Yep, my OF neither enables memory spaces on devices it doesn't have a driver for. It even doesn't allocate space to them.
That's even worse.... Might be one more reason for Martin to get the dynamic resource allocation stuff for PCI devices into the kernel ;-)
Michel
PS Geert, don't stay up too long ;-)
-------------------------------------------------------------------------
Michel Lanners | " Read Philosophy. Study Art. 23, Rue Paul Henkes | Ask Questions. Make Mistakes. L-1710 Luxembourg | email [email protected] | http://www.cpu.lu/~mlan | Learn Always. "
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
Quoted 1 line · Michel Lanners
PS Geert, don't stay up too long ;-)
Why not? I've sent only two patches to Linus today. One more to follow soon :-)
Greetings,
Geert
--
Geert Uytterhoeven [email protected]
Wavelets, Linux/{m68k~Amiga,PPC~CHRP} http://www.cs.kuleuven.ac.be/~geert/
Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
Hello,
Quoted 2 lines
That's even worse.... Might be one more reason for Martin to get the dynamic resource allocation stuff for PCI devices into the kernel ;-)
;-)) I'm working on that, the most problematic bit is currently
to get Linus at least reply to my patches :|
On the PPC, do you have enough information about host bridges, so
that you can re-address all the devices? Whereever this way is possible, I'd prefer it over mixing addresses assigned by the firmware and the kernel as it's hard to get right if there are any PCI to PCI bridges.
I'll probably add a generic helper function for the whole address
assignment / card enabling business.
Have a nice fortnight
Signature · 8 lines
Martin `MJ' Mares <[email protected]> http://atrey.karlin.mff.cuni.cz/~mj/ Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth "f u cn rd ths, u cn gt a gd jb n cmptr prgrmmng." [[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. Please check http://lists.linuxppc.org/ ]] [[ and http://www.linuxppc.org/ for useful information before posting. ]]