sidk_s5jt200: initialize a new ftl partition type at boot
authorJunyeon LEE <junyeon2.lee@samsung.com>
Mon, 27 Mar 2017 07:42:39 +0000 (16:42 +0900)
committerHeesub Shin <heesub.shin@samsung.com>
Tue, 18 Apr 2017 03:02:02 +0000 (12:02 +0900)
This commit adds mtd ftl initialize routine in s5jt200_tash.c. When partition
type specified to a "ftl", the partition is initialized by mtdftl device at boot.

Change-Id: I9e7e262526501d5cb6276525134031e0d52c4ff2
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
os/arch/arm/src/sidk_s5jt200/src/s5jt200_tash.c

index b7ea704..d6ec3c7 100644 (file)
@@ -183,6 +183,13 @@ static void sidk_s5jt200_configure_partitions(void)
                        return;
                }
 
+#if defined(CONFIG_MTD_FTL)
+               if (!strncmp(types, "ftl,", 4)) {
+                       if (ftl_initialize(partno, mtd_part)) {
+                               lldbg("ERROR: failed to initialise mtd ftl errno :%d\n", errno);
+                       }
+               } else
+#endif
 #if defined(CONFIG_MTD_CONFIG)
                if (!strncmp(types, "config,", 7)) {
                        mtdconfig_register(mtd_part);