* i/o and memory space enable bits in PCI-PCI bridge
@ 2004-12-07 19:48 Pavel Kiryukhin
2004-12-07 20:54 ` Ralf Baechle
0 siblings, 1 reply; 2+ messages in thread
From: Pavel Kiryukhin @ 2004-12-07 19:48 UTC (permalink / raw)
To: linux-mips; +Cc: Pavel Kiryukhin
Hi!
Can somebody give me a hint: - what part of 2.6 (mips) code is
responsible for setting i/o and memory space enable bits in PCI-PCI
bridge config. space command register?
On my board those bits are not set after bridge is configured.
Currently I'm using the following change in "pcibios_enable_resources"
to work with devices behind the bridge.
--- arch/mips/pci/pci.c_org 2004-12-06 18:20:50.000000000 +0300
+++ arch/mips/pci/pci.c 2004-12-06 18:21:22.000000000 +0300
@@ -164,7 +164,7 @@
pci_read_config_word(dev, PCI_COMMAND, &cmd);
old_cmd = cmd;
- for(idx=0; idx<6; idx++) {
+ for(idx=0; idx<=PCI_BRIDGE_RESOURCES; idx++) {
/* Only set up the requested stuff */
if (!(mask & (1<<idx)))
continue;
but I think there should be some legal way I missed.
--
Thank you,
Pavel Kiryukhin.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: i/o and memory space enable bits in PCI-PCI bridge
2004-12-07 19:48 i/o and memory space enable bits in PCI-PCI bridge Pavel Kiryukhin
@ 2004-12-07 20:54 ` Ralf Baechle
0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2004-12-07 20:54 UTC (permalink / raw)
To: Pavel Kiryukhin; +Cc: linux-mips
On Tue, Dec 07, 2004 at 10:48:13PM +0300, Pavel Kiryukhin wrote:
> Can somebody give me a hint: - what part of 2.6 (mips) code is
> responsible for setting i/o and memory space enable bits in PCI-PCI
> bridge config. space command register?
> On my board those bits are not set after bridge is configured.
> Currently I'm using the following change in "pcibios_enable_resources"
> to work with devices behind the bridge.
> --- arch/mips/pci/pci.c_org 2004-12-06 18:20:50.000000000 +0300
> +++ arch/mips/pci/pci.c 2004-12-06 18:21:22.000000000 +0300
> @@ -164,7 +164,7 @@
>
> pci_read_config_word(dev, PCI_COMMAND, &cmd);
> old_cmd = cmd;
> - for(idx=0; idx<6; idx++) {
> + for(idx=0; idx<=PCI_BRIDGE_RESOURCES; idx++) {
> /* Only set up the requested stuff */
> if (!(mask & (1<<idx)))
> continue;
>
> but I think there should be some legal way I missed.
We had a discussion a while ago where somebody did suggest an afair
identical patch a while ago. The problem with this patch is it fixes
things for a few platforms and breaks things for a few others.
Ralf
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-12-07 20:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-07 19:48 i/o and memory space enable bits in PCI-PCI bridge Pavel Kiryukhin
2004-12-07 20:54 ` Ralf Baechle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.