From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932200AbcAMKLE (ORCPT ); Wed, 13 Jan 2016 05:11:04 -0500 Received: from foss.arm.com ([217.140.101.70]:39676 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756461AbcAMKKa (ORCPT ); Wed, 13 Jan 2016 05:10:30 -0500 Date: Wed, 13 Jan 2016 10:10:28 +0000 From: liviu.dudau@arm.com To: Arnd Bergmann Cc: Rongrong Zou , Rongrong Zou , devicetree@vger.kernel.org, Catalin Marinas , Corey Minyard , gregkh@linuxfoundation.org, Will Deacon , linux-kernel@vger.kernel.org, linuxarm@huawei.com, benh@kernel.crashing.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v1 3/3] ARM64 LPC: update binding doc Message-ID: <20160113101028.GV13633@e106497-lin.cambridge.arm.com> References: <568912EE.9030009@huawei.com> <5694E9FF.6030904@huawei.com> <20160112151335.GS13633@e106497-lin.cambridge.arm.com> <4731036.9QlepWb5cE@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4731036.9QlepWb5cE@wuerfel> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 12, 2016 at 11:52:48PM +0100, Arnd Bergmann wrote: > On Tuesday 12 January 2016 15:13:35 liviu.dudau@arm.com wrote: > > > int of_address_to_resource(struct device_node *dev, int index, > > > struct resource *r) > > > { > > > ... > > > /* flags can be get here, without ranges property reqired. > > > * if the reg = <0x0 0xe4 4>, I can get flag of IORESOURCE_MEM, > > > * if the reg = <0x1 0xe4 4>, I can get flag of IORESOURCE_IO, > > > > That is strange, the parent node has #address-cells = <2> so the first two numbers should be part > > of the address and not influence the flags. Can you add some debugging in of_get_address() and > > try to figure out what bus is used in *flags = bus->get_flags(prop) ? > > > > > > This is the standard ISA binding. The first cell is the address space > (IO or MEM), the second cell is the address within that space. This > is similar to how PCI works. OK, but from DT point of view and given the parent's #address-cells = <2> and #size-cells = <1> should the reg not be something like reg = <0x1 0x0 0xe4 4> ? Best regards, Liviu > > Arnd > -- ==================== | I would like to | | fix the world, | | but they're not | | giving me the | \ source code! / --------------- ¯\_(ツ)_/¯