summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Suvorov <oleksandr.suvorov@toradex.com>2021-06-02 12:07:07 +0300
committerMax Krummenacher <max.krummenacher@toradex.com>2021-07-08 14:15:13 +0200
commit693b194e8202e8d3b87f7bbb7ee0a038f3f08c96 (patch)
treec6ab739c651c695e358755fe28a7aa0e55c8e0f1
parent90b27b19f9e2f83efcc9294450ad05b8d5839593 (diff)
udev: colibri-imx7: sync emmc and nand udev rules
TEZI uses the same machine colibri-imx7 for both eMMC and NAND variants of the module. For correct work with Colibri iMX7 eMMC TEZI requires symlinks emmc* generated by toradex udev rules - it allows TEZI to unblock boot-partitions for writing operations on start. The udev "emmc*" rules are triggered by the block instances of the device usdhc@30b60000. The usdhc@30b60000 device disabled by default in the device tree for Colibri-iMX7 NAND SoM, so that the "emmc*" doesn't affect the NAND module. Adding "emmc*" rules to the 99-toradex.rules for colibri-imx7 machine fixes several TEZI issues for Colibri iMX7 eMMC, i.e. this one: Processing blockdev: "mmcblk0boot0" Running Command: "/usr/sbin/blkdiscard" ("/dev/mmcblk0boot0") Progress: "Toradex Embedded Linux Reference Minimal Image (UPSTREAM): Erasing partition" Output: "blkdiscard: /dev/mmcblk0boot0: BLKDISCARD ioctl failed: Operation not permitted\n" Finished with exit code: 1 Related-to: TEI-851 Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com> (cherry picked from commit c60d660b6dcd398136df80e6b26f31fc3a4cc8e3)
-rw-r--r--recipes-core/udev/files/colibri-imx7/99-toradex.rules3
1 files changed, 3 insertions, 0 deletions
diff --git a/recipes-core/udev/files/colibri-imx7/99-toradex.rules b/recipes-core/udev/files/colibri-imx7/99-toradex.rules
index 56f454f..ae80f8b 100644
--- a/recipes-core/udev/files/colibri-imx7/99-toradex.rules
+++ b/recipes-core/udev/files/colibri-imx7/99-toradex.rules
@@ -5,6 +5,9 @@ ACTION=="add", ATTRS{iomem_base}=="0x30890000", SYMLINK+="colibri-uartb"
ACTION=="add", ATTRS{iomem_base}=="0x30880000", SYMLINK+="colibri-uartc"
ACTION=="add", KERNEL=="watchdog", DRIVERS=="rn5t618-wdt", SYMLINK+="colibri-watchdog"
ACTION=="add", SUBSYSTEM=="spidev", KERNELS=="30840000.*spi", SYMLINK+="colibri-spi-cs%n"
+KERNEL=="mmcblk[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="30b60000.usdhc", SYMLINK+="emmc"
+KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="30b60000.usdhc", SYMLINK+="emmc-boot%n"
+KERNEL=="mmcblk[0-9]p[0-9]", ENV{DEVTYPE}=="partition", KERNELS=="30b60000.usdhc", SYMLINK+="emmc-part%n"
SUBSYSTEM=="iio", KERNELS=="iio:device0", RUN+="/etc/udev/scripts/toradex-adc.sh"
ACTION=="add|change", KERNEL=="mmcblk[0-9]", ENV{DEVTYPE}=="disk", KERNELS=="30b40000.usdhc", SYMLINK+="colibri-sd"
ACTION=="add|change", KERNEL=="mmcblk[0-9]p[0-9]*", ENV{DEVTYPE}=="partition", KERNELS=="30b40000.usdhc", SYMLINK+="colibri-sd-part%n"