[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5193704.9YxYic1Nyf@wuerfel>
Date: Mon, 19 May 2014 14:45:47 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Kishon Vijay Abraham I <kishon@...com>
Cc: Jingoo Han <jg1.han@...sung.com>,
'Santosh Shilimkar' <santosh.shilimkar@...com>,
devicetree@...r.kernel.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-omap@...r.kernel.org, linux-pci@...r.kernel.org,
rogerq@...com, balajitk@...com,
'Bjorn Helgaas' <bhelgaas@...gle.com>,
'Marek Vasut' <marex@...x.de>
Subject: Re: [PATCH 06/17] pci: host: pcie-designware: Use *base-mask* for configuring the iATU
On Friday 16 May 2014 14:30:56 Kishon Vijay Abraham I wrote:
> On Wednesday 14 May 2014 06:15 PM, Arnd Bergmann wrote:
> > On Wednesday 14 May 2014 11:14:45 Kishon Vijay Abraham I wrote:
> > / {
> > #address-cells = <1>; // or <2> if you support > 4GB address space
> > #size-cells = <1>;
> >
> > soc {
> > #address-cells <1>;
> > #size-cells = <1>;
> > ranges;
> > dma-ranges;
> >
> > ... // all normal devices
> >
> > axi@...00000 {
> > #size-cells = <1>;
> > #address-cells = <1>;
> > dma-ranges; // can access all 4GB outbound
> > ranges = <0 0x20000000 0x10000000>; // 28-bit bus
> >
> > pci@0 {
> > reg = <0x0 0x1000>, // internal regs
> > <0x1000 0x2000>; // config space
>
> The internal reg address space starts at 0x51000000. By Using this <0
> 0x20000000 0x10000000>; as ranges, we are not able to get the memory resource
> properly. Can we use multiple ranges? how do we specify which ranges the *reg*
> property to use?
Yes, multiple ranges will work fine. You can make up a representation
yourself if you don't know what the hardware really does.
Two possible ways of doing this would be
a)
/* two separate physical connections represented as one logical bus */
axi@...00000 {
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0 0x20000000 0x10000000>, /* configurable registers */
<1 0 0x51000000 0x01000000>; /* PCI host registers */
pci@1.0 {
reg = <1 0 0x01000000>, /* host registers */
<0 0x1000 0x2000>; /* config space */
}
};
b)
/* one physical bus, with some address munging */
axi@...00000 {
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 0x20000000 0x10000000>, /* configurable registers */
<0x51000000 0x51000000 0x01000000>; /* PCI host registers */
pci@1.0 {
reg = <0x51000000 0x01000000>, /* host registers */
<0x1000 0x2000>; /* config space */
}
};
> Btw I was using *simple-bus* as compatible to *axi*. Or should I create a new
> *axi* driver to create the pcie memory resources myself?
simple-bus is best here, since you don't have a complex bus that needs to
be set up using register accesses or that generates interrupts.
Arnd
--
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