From: Kishon Vijay Abraham I <kishon@ti.com>
To: Mark Brown <broonie@kernel.org>
Cc: tony@atomide.com, lgirdwood@gmail.com,
linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
grygorii.strashko@ti.com, nsekhar@ti.com, stable@vger.kernel.org,
Tero Kristo <t-kristo@ti.com>
Subject: Re: [PATCH 1/2] regulator: pbias: use untranslated address to program pbias regulator
Date: Tue, 18 Aug 2015 11:23:54 +0530 [thread overview]
Message-ID: <55D2C872.9000400@ti.com> (raw)
In-Reply-To: <20150814180006.GB10748@sirena.org.uk>
Hi Mark Brown,
On Friday 14 August 2015 11:30 PM, Mark Brown wrote:
> On Mon, Jul 27, 2015 at 04:54:09PM +0530, Kishon Vijay Abraham I wrote:
>
>> vsel_reg and enable_reg of the pbias regulator descriptor should actually
>> have the offset from syscon. However after the pbias device tree node
>
> I'm having a hard time understanding this statement, sorry. What makes
> you say that they "shouild actually have the offset from syscon"? What
> is the problem that this is supposed to fix?
The register to program pbias regulator is 0x4A002E00. The syscon base address
is 0x4a002000. So the vsel_reg and enable_reg should have the offset from
syscon base address. regulator_enable_regmap gets the base address from
'regmap' and offset from 'enable_reg' in order to program the pbias regulator.
But without this patch vsel_reg and enable_reg have the absolute address
instead of just the offset.
>
>> is moved as a child node of syscon, vsel_reg and enable_reg has the
>> absolute address because of the address translation that happens while
>> creating device from device tree node.
>> So avoid using platform_get_resource and use of_get_address in order to
>> get only the offset (untranslated address) and populate these in
>> vsel_reg and enable_reg.
>
> This sounds like we're going in the wrong direction, we're moving from a
> more generic API to a firmware specific one. Why is this a good fix?
platform_get_resource can be used if we need the absolute address but here we
need only the offset.
Thanks
Kishon
WARNING: multiple messages have this Message-ID (diff)
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Mark Brown <broonie@kernel.org>
Cc: <tony@atomide.com>, <lgirdwood@gmail.com>,
<linux-omap@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<grygorii.strashko@ti.com>, <nsekhar@ti.com>,
<stable@vger.kernel.org>, Tero Kristo <t-kristo@ti.com>
Subject: Re: [PATCH 1/2] regulator: pbias: use untranslated address to program pbias regulator
Date: Tue, 18 Aug 2015 11:23:54 +0530 [thread overview]
Message-ID: <55D2C872.9000400@ti.com> (raw)
In-Reply-To: <20150814180006.GB10748@sirena.org.uk>
Hi Mark Brown,
On Friday 14 August 2015 11:30 PM, Mark Brown wrote:
> On Mon, Jul 27, 2015 at 04:54:09PM +0530, Kishon Vijay Abraham I wrote:
>
>> vsel_reg and enable_reg of the pbias regulator descriptor should actually
>> have the offset from syscon. However after the pbias device tree node
>
> I'm having a hard time understanding this statement, sorry. What makes
> you say that they "shouild actually have the offset from syscon"? What
> is the problem that this is supposed to fix?
The register to program pbias regulator is 0x4A002E00. The syscon base address
is 0x4a002000. So the vsel_reg and enable_reg should have the offset from
syscon base address. regulator_enable_regmap gets the base address from
'regmap' and offset from 'enable_reg' in order to program the pbias regulator.
But without this patch vsel_reg and enable_reg have the absolute address
instead of just the offset.
>
>> is moved as a child node of syscon, vsel_reg and enable_reg has the
>> absolute address because of the address translation that happens while
>> creating device from device tree node.
>> So avoid using platform_get_resource and use of_get_address in order to
>> get only the offset (untranslated address) and populate these in
>> vsel_reg and enable_reg.
>
> This sounds like we're going in the wrong direction, we're moving from a
> more generic API to a firmware specific one. Why is this a good fix?
platform_get_resource can be used if we need the absolute address but here we
need only the offset.
Thanks
Kishon
next prev parent reply other threads:[~2015-08-18 5:53 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-27 11:24 [PATCH 0/2] pbias regulator fixes Kishon Vijay Abraham I
2015-07-27 11:24 ` Kishon Vijay Abraham I
2015-07-27 11:24 ` [PATCH 1/2] regulator: pbias: use untranslated address to program pbias regulator Kishon Vijay Abraham I
2015-07-27 11:24 ` Kishon Vijay Abraham I
2015-07-29 8:57 ` Grygorii Strashko
2015-07-29 8:57 ` Grygorii Strashko
2015-08-05 9:47 ` Tony Lindgren
2015-08-05 14:56 ` Kishon Vijay Abraham I
2015-08-05 14:56 ` Kishon Vijay Abraham I
2015-08-06 6:26 ` Tony Lindgren
2015-08-06 9:58 ` Grygorii Strashko
2015-08-06 9:58 ` Grygorii Strashko
2015-08-14 18:00 ` Mark Brown
2015-08-18 5:53 ` Kishon Vijay Abraham I [this message]
2015-08-18 5:53 ` Kishon Vijay Abraham I
2015-08-19 18:11 ` Mark Brown
2015-08-20 5:51 ` Kishon Vijay Abraham I
2015-08-20 5:51 ` Kishon Vijay Abraham I
2015-08-20 17:42 ` Mark Brown
2015-08-25 10:03 ` Grygorii Strashko
2015-08-25 10:03 ` Grygorii Strashko
2015-08-25 13:50 ` Mark Brown
2015-08-31 10:44 ` Kishon Vijay Abraham I
2015-08-31 10:44 ` Kishon Vijay Abraham I
2015-08-31 14:52 ` Mark Brown
2015-09-01 9:40 ` Kishon Vijay Abraham I
2015-09-01 9:40 ` Kishon Vijay Abraham I
2015-09-01 11:31 ` Kishon Vijay Abraham I
2015-09-01 11:31 ` Kishon Vijay Abraham I
2015-09-01 14:17 ` Tony Lindgren
2015-09-01 18:36 ` Mark Brown
2015-09-01 18:56 ` Tony Lindgren
2015-09-02 11:15 ` Mark Brown
2015-07-27 11:24 ` [PATCH 2/2] regulator: pbias: Fix broken pbias disable functionality Kishon Vijay Abraham I
2015-07-27 11:24 ` Kishon Vijay Abraham I
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55D2C872.9000400@ti.com \
--to=kishon@ti.com \
--cc=broonie@kernel.org \
--cc=grygorii.strashko@ti.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=nsekhar@ti.com \
--cc=stable@vger.kernel.org \
--cc=t-kristo@ti.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.