Re: use IORESOURCE_REG resource type for non-translatable addresses in DT

2014-08-28 Thread Stanimir Varbanov
On 08/27/2014 09:24 PM, Bjorn Andersson wrote: On Tue, Jul 29, 2014 at 11:06 PM, Stephen Boyd sb...@codeaurora.org wrote: On 07/29, Rob Herring wrote: [..] You might as well do of_property_read_u32 in the below example. Fair enough. The example is probably too simple. Things are sometimes

Re: use IORESOURCE_REG resource type for non-translatable addresses in DT

2014-08-28 Thread Bjorn Andersson
On Wed, Aug 27, 2014 at 2:55 PM, Stephen Boyd sb...@codeaurora.org wrote: What's Josh's original proposal? We've already punted on this for SSBI PMICs and just required them to put registers in DT for use some day and I don't see anyone blocking individual SPMI pmic drivers from merging over

Re: use IORESOURCE_REG resource type for non-translatable addresses in DT

2014-08-27 Thread Stanimir Varbanov
On 07/30/2014 09:06 AM, Stephen Boyd wrote: On 07/29, Rob Herring wrote: On Tue, Jul 29, 2014 at 8:07 PM, Stephen Boyd sb...@codeaurora.org wrote: On 07/29/14 16:45, Grant Likely wrote: On Tue, 29 Jul 2014 17:06:42 +0300, Stanimir Varbanov svarba...@mm-sol.com wrote: This was just an

Re: use IORESOURCE_REG resource type for non-translatable addresses in DT

2014-08-27 Thread Bjorn Andersson
On Tue, Jul 29, 2014 at 11:06 PM, Stephen Boyd sb...@codeaurora.org wrote: On 07/29, Rob Herring wrote: [..] You might as well do of_property_read_u32 in the below example. Fair enough. The example is probably too simple. Things are sometimes slightly more complicated and a simple

Re: use IORESOURCE_REG resource type for non-translatable addresses in DT

2014-08-27 Thread Stephen Boyd
On 08/27/14 11:24, Bjorn Andersson wrote: On Tue, Jul 29, 2014 at 11:06 PM, Stephen Boyd sb...@codeaurora.org wrote: On 07/29, Rob Herring wrote: [..] You might as well do of_property_read_u32 in the below example. Fair enough. The example is probably too simple. Things are sometimes

Re: use IORESOURCE_REG resource type for non-translatable addresses in DT

2014-07-30 Thread Stephen Boyd
On 07/29, Rob Herring wrote: On Tue, Jul 29, 2014 at 8:07 PM, Stephen Boyd sb...@codeaurora.org wrote: On 07/29/14 16:45, Grant Likely wrote: On Tue, 29 Jul 2014 17:06:42 +0300, Stanimir Varbanov svarba...@mm-sol.com wrote: This was just an example. Of course it has many issues and

use IORESOURCE_REG resource type for non-translatable addresses in DT

2014-07-29 Thread Stanimir Varbanov
Hi, While looking in MFD drivers I saw that few of them (88pm860x-core, max8925-core and wm831x-core) allow use of IORESOURCE_REG as resource type when calling platform_get_resource() by their child drivers. The resources for these child devices are filled by core MFD driver manually and then

Re: use IORESOURCE_REG resource type for non-translatable addresses in DT

2014-07-29 Thread Arnd Bergmann
On Tuesday 29 July 2014 14:42:31 Stanimir Varbanov wrote: taddr = of_translate_address(dev, addrp); - if (taddr == OF_BAD_ADDR) - return -EINVAL; + /* +* if the address is non-translatable to cpu physical address +* fallback to a

Re: use IORESOURCE_REG resource type for non-translatable addresses in DT

2014-07-29 Thread Stanimir Varbanov
Arnd, thanks for the comments. On 07/29/2014 03:00 PM, Arnd Bergmann wrote: On Tuesday 29 July 2014 14:42:31 Stanimir Varbanov wrote: taddr = of_translate_address(dev, addrp); - if (taddr == OF_BAD_ADDR) - return -EINVAL; + /* +* if the address is

Re: use IORESOURCE_REG resource type for non-translatable addresses in DT

2014-07-29 Thread Rob Herring
On Tue, Jul 29, 2014 at 9:06 AM, Stanimir Varbanov svarba...@mm-sol.com wrote: Arnd, thanks for the comments. On 07/29/2014 03:00 PM, Arnd Bergmann wrote: On Tuesday 29 July 2014 14:42:31 Stanimir Varbanov wrote: taddr = of_translate_address(dev, addrp); - if (taddr ==

Re: use IORESOURCE_REG resource type for non-translatable addresses in DT

2014-07-29 Thread Grant Likely
On Tue, 29 Jul 2014 17:06:42 +0300, Stanimir Varbanov svarba...@mm-sol.com wrote: Arnd, thanks for the comments. On 07/29/2014 03:00 PM, Arnd Bergmann wrote: On Tuesday 29 July 2014 14:42:31 Stanimir Varbanov wrote: taddr = of_translate_address(dev, addrp); - if (taddr ==

Re: use IORESOURCE_REG resource type for non-translatable addresses in DT

2014-07-29 Thread Stephen Boyd
On 07/29/14 16:45, Grant Likely wrote: On Tue, 29 Jul 2014 17:06:42 +0300, Stanimir Varbanov svarba...@mm-sol.com wrote: This was just an example. Of course it has many issues and probaly it is wrong:) The main goal was to understand does IORESOURCE_REG resource type and parsing the *reg*

Re: use IORESOURCE_REG resource type for non-translatable addresses in DT

2014-07-29 Thread Rob Herring
On Tue, Jul 29, 2014 at 8:07 PM, Stephen Boyd sb...@codeaurora.org wrote: On 07/29/14 16:45, Grant Likely wrote: On Tue, 29 Jul 2014 17:06:42 +0300, Stanimir Varbanov svarba...@mm-sol.com wrote: This was just an example. Of course it has many issues and probaly it is wrong:) The main goal