[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [U-Boot] [PATCH v2 5/6] PPC 85xx: Find PCI host controlle
From: |
Scott Wood |
Subject: |
Re: [Qemu-ppc] [U-Boot] [PATCH v2 5/6] PPC 85xx: Find PCI host controllers on ppce500 from device tree |
Date: |
Fri, 7 Feb 2014 12:46:30 -0600 |
On Fri, 2014-02-07 at 16:00 +0100, Alexander Graf wrote:
> On 07.02.2014, at 15:54, Alexander Graf <address@hidden> wrote:
>
> >
> > On 06.02.2014, at 23:52, Scott Wood <address@hidden> wrote:
> >
> >> On Thu, 2014-02-06 at 14:26 +0100, Alexander Graf wrote:
> >>>>
> >>>> How about using fdt_translate_address() or other existing functionality?
> >>>
> >>> Mind to show exactly how?
> >>
> >> I guess you can't use that when you don't know the bus address, but
> >> still this is the wrong place to implement it. If getting PCI range
> >> info from the device tree is something we want to do, then it should be
> >> a new common code helper.
> >
> > The more I think about this the less of an idea I have how to do any
> > generic API for this at all. And I'm not convinced anything generic is
> > going to help anyone. Do a git grep on fdt_translate_address over the code
> > base and you will find a _single_ caller.
> >
> > So even if we come up with something now, nobody's going to use it.
>
> Hrm. Maybe fdt_get_base_address() is the answer?
Yes, that looks close to what you want. It'd have to be extended to
look for the various types of PCI ranges and return a (cpu address, bus
address, size) tuple rather than just a base address.
It's moot though if we can reprogram the PCI windows.
-Scott