diff mbox

[daisy,1/2] udev: update init script for conditional probing of platform bus

Message ID 1403713196-22214-1-git-send-email-denis@denix.org
State Accepted
Commit 70a695735e0a7d14448f2f5a9986bfe105210a91
Headers show

Commit Message

Denys Dmytriyenko June 25, 2014, 4:19 p.m. UTC
From: Denys Dmytriyenko <denys@ti.com>

Make probing of "platform" bus conditional based on PROBE_PLATFORM_BUS
variable from /etc/default/udev-cache on subsequent boots when udev
cache is used. PROBE_PLATFORM_BUS has to be set to "yes" in order to
force probing on every boot, otherwise it uses the old default behaviour
of probing it just the first time.

This is helpful on modern SoCs where most of the low level peripheral
drivers are registered on the platform bus and need to be probed to load
the necessary modules and enable the connected buses and subsystems.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

[Backport from OE-Core/master 70a695735e0a7d14448f2f5a9986bfe105210a91]
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
 meta/recipes-core/udev/udev/init | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Otavio Salvador June 26, 2014, 5:30 p.m. UTC | #1
On Wed, Jun 25, 2014 at 1:19 PM, Denys Dmytriyenko <denis@denix.org> wrote:
> From: Denys Dmytriyenko <denys@ti.com>
>
> Make probing of "platform" bus conditional based on PROBE_PLATFORM_BUS
> variable from /etc/default/udev-cache on subsequent boots when udev
> cache is used. PROBE_PLATFORM_BUS has to be set to "yes" in order to
> force probing on every boot, otherwise it uses the old default behaviour
> of probing it just the first time.
>
> This is helpful on modern SoCs where most of the low level peripheral
> drivers are registered on the platform bus and need to be probed to load
> the necessary modules and enable the connected buses and subsystems.
>
> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>
> [Backport from OE-Core/master 70a695735e0a7d14448f2f5a9986bfe105210a91]
> Signed-off-by: Denys Dmytriyenko <denys@ti.com>

Acked-by: Otavio Salvador <otavio@ossystems.com.br>
diff mbox

Patch

diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init
index 410a650..f2c84d5 100644
--- a/meta/recipes-core/udev/udev/init
+++ b/meta/recipes-core/udev/udev/init
@@ -102,7 +102,12 @@  case "$1" in
 
     udevadm control --env=STARTUP=1
     if [ "$not_first_boot" != "" ];then
-            udevadm trigger --action=add --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus  --subsystem-nomatch=graphics	 --subsystem-nomatch=backlight --subsystem-nomatch=video4linux	--subsystem-nomatch=platform
+            if [ "$PROBE_PLATFORM_BUS" != "yes" ]; then
+                PLATFORM_BUS_NOMATCH="--subsystem-nomatch=platform"
+            else
+                PLATFORM_BUS_NOMATCH=""
+            fi
+            udevadm trigger --action=add --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus --subsystem-nomatch=graphics --subsystem-nomatch=backlight --subsystem-nomatch=video4linux $PLATFORM_BUS_NOMATCH
             (udevadm settle --timeout=3; udevadm control --env=STARTUP=)&
     else
             udevadm trigger --action=add