colibri_vf: set the devices serial number in the device tree
authorStefan Agner <stefan.agner@toradex.com>
Thu, 23 Apr 2015 15:17:03 +0000 (17:17 +0200)
committerStefan Agner <stefan.agner@toradex.com>
Thu, 23 Apr 2015 15:23:44 +0000 (17:23 +0200)
Use the proposed format to transport the device's serial number
to the kernel:
http://www.spinics.net/lists/devicetree/msg76756.html

board/toradex/colibri_vf/colibri_vf.c

index 42de260661d272e8491ad650d56dc3b9c72e7596..59c8c5bddfea530420a65f9c8e7f8a22e7811493 100644 (file)
@@ -495,6 +495,11 @@ int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name)
 #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
 int ft_board_setup(void *blob, bd_t *bd)
 {
+#ifdef CONFIG_TRDX_CFG_BLOCK
+       fdt_setprop(blob, 0, "serial-number", getenv("serial#"),
+                   strlen(getenv("serial#")) + 1);
+#endif
+
        return fsl_dcu_fixedfb_setup(blob);
 }
 #endif