From: m.szyprowski@samsung.com (Marek Szyprowski)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] drivers: amba: properly handle devices with power domains
Date: Wed, 25 Nov 2015 14:34:46 +0100 [thread overview]
Message-ID: <5655B8F6.1070104@samsung.com> (raw)
In-Reply-To: <20151125132458.GL8644@n2100.arm.linux.org.uk>
Hello,
On 2015-11-25 14:24, Russell King - ARM Linux wrote:
> On Wed, Nov 25, 2015 at 01:58:09PM +0100, Marek Szyprowski wrote:
>> To read pid/cid registers, the probed device need to be properly turned on.
>> When it is inside a power domain, the bus code should ensure that the
>> given power domain is enabled before trying to access device's registers.
>>
>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> ---
>> drivers/amba/bus.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
>> index f009936..25715cb 100644
>> --- a/drivers/amba/bus.c
>> +++ b/drivers/amba/bus.c
>> @@ -373,6 +373,12 @@ int amba_device_add(struct amba_device *dev, struct resource *parent)
>> goto err_release;
>> }
>>
>> + ret = dev_pm_domain_attach(&dev->dev, true);
>> + if (ret) {
>> + iounmap(tmp);
>> + goto err_release;
>> + }
>> +
> NAK. If dev_pm_domain_attach() returns an error, even -EPROBE_DEFER,
> the result will be a missing device that has no way to be recovered.
> This is too fragile.
Then how the problem of accessing registers in turned-off device should
be solved?
Is ignoring dev_pm_domain_attach() return value a solution for you?
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
next prev parent reply other threads:[~2015-11-25 13:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-25 12:55 [PATCH 0/2] Exynos4210: fix power domain for MDMA1 device Marek Szyprowski
2015-11-25 12:55 ` [PATCH] ARM: dts: exynos4210: Add power domain to G2D device Marek Szyprowski
2015-11-25 23:55 ` Krzysztof Kozlowski
2015-11-26 7:35 ` Krzysztof Kozlowski
2015-11-25 12:55 ` [PATCH 2/2] ARM: dts: exynos4210: MDMA1 device belongs to LCD0 power domain Marek Szyprowski
2015-11-25 12:58 ` [PATCH 1/2] drivers: amba: properly handle devices with power domains Marek Szyprowski
2015-11-25 13:24 ` Russell King - ARM Linux
2015-11-25 13:34 ` Marek Szyprowski [this message]
2015-11-25 13:56 ` Ulf Hansson
2015-11-25 14:43 ` Marek Szyprowski
2015-11-25 18:09 ` Russell King - ARM Linux
2015-11-26 8:39 ` Marek Szyprowski
2015-11-26 10:24 ` Ulf Hansson
2015-11-26 10:59 ` Russell King - ARM Linux
2015-11-26 12:33 ` Marek Szyprowski
2015-11-26 12:55 ` Marek Szyprowski
2015-11-26 15:04 ` Mathieu Poirier
2015-11-27 7:42 ` Marek Szyprowski
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=5655B8F6.1070104@samsung.com \
--to=m.szyprowski@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).