From: "Alexandros Kostopoulos" <akostop@inaccessnetworks.com>
To: "Scott Wood" <scottwood@freescale.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: pci in arch/powerpc vs arch/ppc
Date: Wed, 8 Aug 2007 22:20:35 -0000 [thread overview]
Message-ID: <twig.1186611635.44657@inaccessnetworks.com> (raw)
In-Reply-To: <46BA1FD2.4000705@freescale.com>
> No, because as I said, res->start is relative to the start of IO-space.
> The in/out functions add isa_io_base to the address.
>
Hi Scott,
please allow me to insist a little bit more on this.
1. As far as the device tree is concerned, it is defined that the first 3
numbers in every line of the ranges property (for our case, with #address-
cells=3) is the PCI address of the device (in this case, host bridge), the
next one is the local bus base address and the last two the local region
size. In the case of memory space, res->start for the host bridge takes as a
value ranges[3], which is actually the local bus base address. Why does the
code for IO space uses ranges[2]. Shouldn't these two use the same field of
the corresponding ranges property line?
2. As far as isa_io_base is concerned: When primary (what does this actually
mean? primary PCI bus ?) is 1, then indeed
isa_io_base=ranges[na+2]=ranges[3] (in this case) as it should (while res-
>start=ranges[2] for some reason I don't understand, as I said earlier). And
this is indeed added in the i/o address of the device during in/out
operations. However, the driver I use, drivers/net/tulip/dmfe.c, actually
checks whether res->start for the PCI device is zero, and if it is so, it
fails. So, assuming that the pci_process_OF_bridges code is correct as is,
then there is some problem with the driver? Because the same driver worked in
arch/ppc, which makes me think that there, res->start was NOT 0, but was
already offset to the actual I/O space of the local bus.
I would really appreciate your comments (and forgive me for insisting on this
:) )
Alex
> > Because, currently, based on what I've
> > described in my previous mail, it gets set to 0. It seems to me like a
matter
> > of incorrect parsing of the device tree from
pci_process_bridge_OF_ranges()
> > for IO space.
>
> It is not, at least not in this case. It does appear to be ignoring the
> possibility that it needs to do further translation of the address
> through parent buses, though.
>
> -Scott
>
--
next prev parent reply other threads:[~2007-08-08 22:20 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-03 14:58 pci in arch/powerpc vs arch/ppc Alexandros Kostopoulos
2007-08-03 20:10 ` Scott Wood
2007-08-04 16:39 ` Kumar Gala
2007-08-07 9:06 ` Alexandros Kostopoulos
2007-08-07 15:20 ` Scott Wood
2007-08-08 11:42 ` Alexandros Kostopoulos
2007-08-08 13:03 ` Alexandros Kostopoulos
2007-08-08 16:24 ` Scott Wood
2007-08-08 14:21 ` Alexandros Kostopoulos
2007-08-08 19:11 ` Scott Wood
2007-08-08 19:46 ` Alexandros Kostopoulos
2007-08-08 19:56 ` Scott Wood
2007-08-08 22:20 ` Alexandros Kostopoulos [this message]
2007-08-09 15:04 ` Scott Wood
2007-08-09 15:56 ` Segher Boessenkool
2007-08-11 23:28 ` Benjamin Herrenschmidt
2007-08-10 4:32 ` Paul Mackerras
2007-08-08 22:55 ` Benjamin Herrenschmidt
2007-08-08 16:29 ` MPC8260 PCI9 erratum Scott Wood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=twig.1186611635.44657@inaccessnetworks.com \
--to=akostop@inaccessnetworks.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=scottwood@freescale.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.