From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: linux-samsung-soc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Ulf Hansson <ulf.hansson@linaro.org>,
Tomeu Vizoso <tomeu.vizoso@collabora.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Dan Williams <dan.j.williams@intel.com>,
Kukjin Kim <kgene@kernel.org>,
Krzysztof Kozlowski <k.kozlowski@samsung.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: Re: [PATCH v5 RESEND 4/5] ARM: amba: Move reading of periphid to amba_match()
Date: Wed, 17 Feb 2016 08:52:36 +0100 [thread overview]
Message-ID: <56C426C4.7040907@samsung.com> (raw)
In-Reply-To: <20160215175250.GJ10826@n2100.arm.linux.org.uk>
Hello,
On 2016-02-15 18:52, Russell King - ARM Linux wrote:
> On Wed, Feb 10, 2016 at 11:47:29AM +0100, Marek Szyprowski wrote:
>> From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
>>
>> Reading the periphid when the Primecell device is registered means that
>> the apb pclk must be available by then or the device won't be registered
>> at all.
>>
>> By reading the periphid in amba_match() we can return -EPROBE_DEFER if
>> the apb pclk isn't there yet and the device will be retried later.
> I've just realised, we can't do this. We need to read the peripheral
> ID at registration time, because that's published to userspace via
> (a) a sysfs attribute, and (b) as part of the uevent, which will be
> used by udev to locate the driver module.
>
> So, this will have the side effect of breaking systems which have
> AMBA primecell devices configured as modules.
>
> Sorry, I can't apply this. We can't regress existing platforms for
> the sake of introducing new platforms to this code.
Then the only solution right now I see is to get back to v1:
http://lists.infradead.org/pipermail/linux-arm-kernel/2015-November/388199.html
which at least handles correctly device registration when power domain
driver
is available. You pointed that the patch cannot be applied, because failure
of dev_pm_domain_attach() will be fatal for device registration. Right now
lack of such call is fatal for the whole system, so there is really not a
big difference. Please also note that amba_get_enable_pclk() calls
clk_get(),
which also might return -EPROBE_DEFER, which already breaks device
registration the same way.
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
next prev parent reply other threads:[~2016-02-17 7:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-10 10:47 [PATCH v5 RESEND 0/5] AMBA: add complete support for power domains Marek Szyprowski
2016-02-10 10:47 ` [PATCH v5 RESEND 1/5] drivers: nvdimm: ensure no negative value gets returned on positive match Marek Szyprowski
2016-02-10 10:47 ` [PATCH v5 RESEND 2/5] ARM: sa1111: " Marek Szyprowski
2016-02-10 16:39 ` Ulf Hansson
2016-02-10 10:47 ` [PATCH v5 RESEND 3/5] driver core: handle -EPROBE_DEFER from bus_type.match() Marek Szyprowski
2016-02-12 3:19 ` Greg Kroah-Hartman
2016-02-10 10:47 ` [PATCH v5 RESEND 4/5] ARM: amba: Move reading of periphid to amba_match() Marek Szyprowski
2016-02-15 17:52 ` Russell King - ARM Linux
2016-02-16 16:31 ` Russell King - ARM Linux
2016-02-17 7:52 ` Marek Szyprowski [this message]
2016-02-17 20:08 ` Russell King - ARM Linux
2016-03-02 10:16 ` Ulf Hansson
2016-02-10 10:47 ` [PATCH v5 RESEND 5/5] ARM: amba: Properly handle devices with power domains 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=56C426C4.7040907@samsung.com \
--to=m.szyprowski@samsung.com \
--cc=b.zolnierkie@samsung.com \
--cc=dan.j.williams@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=k.kozlowski@samsung.com \
--cc=kgene@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=tomeu.vizoso@collabora.com \
--cc=ulf.hansson@linaro.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