Skip to contentSkip to conversation

udev: update init script for conditional probing of platform bus

PATCH In review Denys Dmytriyenko 2 participants 4 messages Jun 25, 2014 – Jun 26, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 udev: update init script for conditional probing of platform bus

From: Denys Dmytriyenko <[email protected]>

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.

[Backport from OE-Core/master 70a695735e0a7d14448f2f5a9986bfe105210a91]
---
 meta/recipes-core/udev/udev/init | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
meta/recipes-core/udev/udev/init +6 -1
index 410a650..f2c84d5 100644
@@ -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
Signature · 1 line
2.0.0
#1 lore raw

PATCH 2/2 udev-cache.default: set PROBE_PLATFORM_BUS to "yes" by default

From: Denys Dmytriyenko <[email protected]>

Force probing of "platform" bus by default.

[Backport from OE-Core/master 6aae37c66fb6e7153b829ad860b7e7f94e804bd4]
---
 meta/recipes-core/udev/udev/udev-cache.default | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/udev/udev/udev-cache.default +1 -0
index 5c4937a..2093336 100644
@@ -2,3 +2,4 @@
 
 # Comment this out to disable device cache
 DEVCACHE="/etc/dev.tar"
+PROBE_PLATFORM_BUS="yes"
Signature · 1 line
2.0.0
Acked-by on v1 2/2
#2 lore raw

Re: [daisy][PATCH 2/2] udev-cache.default: set PROBE_PLATFORM_BUS to "yes" by default

Quoted 9 lines · Denys Dmytriyenko

From: Denys Dmytriyenko <[email protected]>

Force probing of "platform" bus by default.

[Backport from OE-Core/master 6aae37c66fb6e7153b829ad860b7e7f94e804bd4]
Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
Acked-by on v1 1/2
#3 lore raw
In reply to Denys Dmytriyenko
Quoted 12 lines · Denys Dmytriyenko

From: Denys Dmytriyenko <[email protected]>

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.

Quoted 5 lines
[Backport from OE-Core/master 70a695735e0a7d14448f2f5a9986bfe105210a91]
Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750