From mboxrd@z Thu Jan 1 00:00:00 1970 From: ezequiel.garcia@free-electrons.com (Ezequiel Garcia) Date: Wed, 12 Jun 2013 18:12:22 -0300 Subject: [PATCH 04/14] bus: mvebu-mbus: Add static window allocation to the DT binding In-Reply-To: <201306122245.55960.arnd@arndb.de> References: <1370623671-7748-1-git-send-email-ezequiel.garcia@free-electrons.com> <4160363.LWJuHATm2F@wuerfel> <20130612111441.E6D603E0A56@localhost> <201306122245.55960.arnd@arndb.de> Message-ID: <20130612211221.GB23012@localhost> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, Jun 12, 2013 at 10:45:55PM +0200, Arnd Bergmann wrote: > On Wednesday 12 June 2013, Grant Likely wrote: > > I think we should have almost everything needed already to do this. > > of_bus allows arbitrary mapping code to be used at any stage in the > > translation. We might need to add some glue so that of_busses[] can > > be assembled by the linker to allow an mbus of_bus stanza to live > > outside of drivers/of/address.c > > > > Actually, the best thing about this solution is that we don't even > have to bother setting up the mappings when loading the mbus driver: > We don't need any ranges (other than internal-regs) in DT, and we > don't need complex logic to search through the child devices to > figure out what the mappings should be. The only thing one needs > to do here is check if a mapping already exists when we get into the > of_bus handler and create one for the device being translated if > there isn't one! > This departs considerably from what I'm aiming right now. Are you suggesting to not put *any* mapping in the mbus 'ranges' node in the DT (other than internal-regs)? In that case, can you explain a bit further how the mbus would decide a base address for each window? I guess you're thinking in a first-fit algorithm, right? -- Ezequiel Garc?a, Free Electrons Embedded Linux, Kernel and Android Engineering http://free-electrons.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ezequiel Garcia Subject: Re: [PATCH 04/14] bus: mvebu-mbus: Add static window allocation to the DT binding Date: Wed, 12 Jun 2013 18:12:22 -0300 Message-ID: <20130612211221.GB23012@localhost> References: <1370623671-7748-1-git-send-email-ezequiel.garcia@free-electrons.com> <4160363.LWJuHATm2F@wuerfel> <20130612111441.E6D603E0A56@localhost> <201306122245.55960.arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Content-Disposition: inline In-Reply-To: <201306122245.55960.arnd-r2nGTMty4D4@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: "devicetree-discuss" To: Arnd Bergmann Cc: Lior Amsalem , Jason Gunthorpe , Jason Cooper , Andrew Lunn , devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Maen Suleiman , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Sebastian Hesselbarth List-Id: devicetree@vger.kernel.org T24gV2VkLCBKdW4gMTIsIDIwMTMgYXQgMTA6NDU6NTVQTSArMDIwMCwgQXJuZCBCZXJnbWFubiB3 cm90ZToKPiBPbiBXZWRuZXNkYXkgMTIgSnVuZSAyMDEzLCBHcmFudCBMaWtlbHkgd3JvdGU6Cj4g PiBJIHRoaW5rIHdlIHNob3VsZCBoYXZlIGFsbW9zdCBldmVyeXRoaW5nIG5lZWRlZCBhbHJlYWR5 IHRvIGRvIHRoaXMuCj4gPiBvZl9idXMgYWxsb3dzIGFyYml0cmFyeSBtYXBwaW5nIGNvZGUgdG8g YmUgdXNlZCBhdCBhbnkgc3RhZ2UgaW4gdGhlCj4gPiB0cmFuc2xhdGlvbi4gV2UgbWlnaHQgbmVl ZCB0byBhZGQgc29tZSBnbHVlIHNvIHRoYXQgb2ZfYnVzc2VzW10gY2FuCj4gPiBiZSBhc3NlbWJs ZWQgYnkgdGhlIGxpbmtlciB0byBhbGxvdyBhbiBtYnVzIG9mX2J1cyBzdGFuemEgdG8gbGl2ZQo+ ID4gb3V0c2lkZSBvZiBkcml2ZXJzL29mL2FkZHJlc3MuYwo+ID4gCj4gCj4gQWN0dWFsbHksIHRo ZSBiZXN0IHRoaW5nIGFib3V0IHRoaX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