[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <540FAFA4.1080008@huawei.com>
Date: Wed, 10 Sep 2014 09:55:48 +0800
From: Yijing Wang <wangyijing@...wei.com>
To: Bjorn Helgaas <bhelgaas@...gle.com>
CC: Liviu Dudau <Liviu.Dudau@....com>,
Rob Herring <robherring2@...il.com>,
Arnd Bergmann <arnd@...db.de>,
Rob Herring <robh+dt@...nel.org>,
"Jason Gunthorpe" <jgunthorpe@...idianresearch.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Catalin Marinas <Catalin.Marinas@....com>,
"Will Deacon" <Will.Deacon@....com>,
Russell King <linux@....linux.org.uk>,
linux-pci <linux-pci@...r.kernel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Tanmay Inamdar <tinamdar@....com>,
Grant Likely <grant.likely@...retlab.ca>,
Sinan Kaya <okaya@...eaurora.org>,
Jingoo Han <jg1.han@...sung.com>,
Kukjin Kim <kgene.kim@...sung.com>,
"Suravee Suthikulanit" <suravee.suthikulpanit@....com>,
linux-arch <linux-arch@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
"Device Tree ML" <devicetree@...r.kernel.org>,
LAKML <linux-arm-kernel@...ts.infradead.org>,
"grant.likely@...aro.org" <grant.likely@...aro.org>
Subject: Re: [PATCH v10 07/10] OF: Introduce helper function for getting PCI
domain_nr
>> OK. Sorry, I have one last question, because domain will be used to calculate the address used to
>> access PCI hardware config registers. So if DTS file doesn't report the domain, how do we know
>> we would access the right registers when we use the auto increment domain vaule ?
>> Has there a mechanism to make sure system can access the correct registers by the domain ?
>
> I think you're referring to config access via ECAM (PCIe r3.0, sec
> 7.2.2). In that case, I don't think the domain should be used to
> compute the memory-mapped configuration address. Each host bridge is
> in exactly one domain, and each host bridge has an associated ECAM
> area base. The address calculation uses the bus number, device
> number, function number, and register number to compute an offset into
> the ECAM area.
>
> So as long as the DT tells you the ECAM information for each host
> bridge, that should be sufficient. The domain number is then just a
> Linux convenience and is not tied to the platform as it is on ia64.
Hi Bjorn, you are right, thanks for your detailed explanation! :)
Thanks!
Yijing.
>
> Bjorn
>
> .
>
--
Thanks!
Yijing
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists