From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753128AbcAMGe7 (ORCPT ); Wed, 13 Jan 2016 01:34:59 -0500 Received: from mail-pa0-f67.google.com ([209.85.220.67]:35148 "EHLO mail-pa0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751142AbcAMGe5 (ORCPT ); Wed, 13 Jan 2016 01:34:57 -0500 Subject: Re: [PATCH v1 3/3] ARM64 LPC: update binding doc To: Benjamin Herrenschmidt , Arnd Bergmann , liviu.dudau@arm.com References: <568912EE.9030009@huawei.com> <5694E9FF.6030904@huawei.com> <20160112151335.GS13633@e106497-lin.cambridge.arm.com> <4731036.9QlepWb5cE@wuerfel> <1452664413.2403.20.camel@kernel.crashing.org> Cc: Rongrong Zou , devicetree@vger.kernel.org, Catalin Marinas , Corey Minyard , gregkh@linuxfoundation.org, Will Deacon , linux-kernel@vger.kernel.org, linuxarm@huawei.com, linux-arm-kernel@lists.infradead.org From: Rongrong Zou Message-ID: <5695F007.3070005@gmail.com> Date: Wed, 13 Jan 2016 14:34:47 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <1452664413.2403.20.camel@kernel.crashing.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016/1/13 13:53, Benjamin Herrenschmidt wrote: > On Tue, 2016-01-12 at 23:52 +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. > > Picking up that mid-way, I have LPC busses on power and am using a > similar binding. I'll try to grab some examples and review the > document tomorrow (only just noticed it while unpiling emails post- > vacation). Hi Ben, Thanks for reviewing this, I found a similar implementation at arch/powerpc/ platform/powernv/opal-lpc.c and I had get some ideas from your work. It is nice to me. I'm expecting your suggestion.Thanks in advance. > > Cheers, > Ben. > Regards, Rongrong