From 4a28ff1abbbc7c40cb05249b1382d8c7410cf235 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 5 Nov 2015 11:26:30 -0600 Subject: [PATCH] SAMV71-XULT: Add support for SmartFS on QuadFLASH --- configs/samv71-xult/src/sam_bringup.c | 14 +++++++++++++- configs/samv71-xult/src/samv71-xult.h | 7 +++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/configs/samv71-xult/src/sam_bringup.c b/configs/samv71-xult/src/sam_bringup.c index 16a62f8335..ec44a81ae5 100644 --- a/configs/samv71-xult/src/sam_bringup.c +++ b/configs/samv71-xult/src/sam_bringup.c @@ -208,8 +208,20 @@ int sam_bringup(void) SYSLOG("ERROR: st25fl1_initialize failed\n"); } +#ifdef HAVE_SMARTFS + /* Configure the device with no partition support */ + + ret = smart_initialize(0, mtd, NULL); + if (ret != OK) + { + SYSLOG("ERROR: Failed to initialize SmartFS: %d\n", ret); + } + +#else /* And now do what with the ST25FL1 MTD device? */ -#warning Missing Logic +# warning Missing Logic + +#endif } #endif diff --git a/configs/samv71-xult/src/samv71-xult.h b/configs/samv71-xult/src/samv71-xult.h index 53c548fa93..7528158ddf 100644 --- a/configs/samv71-xult/src/samv71-xult.h +++ b/configs/samv71-xult/src/samv71-xult.h @@ -62,6 +62,7 @@ #define HAVE_MACADDR 1 #define HAVE_MTDCONFIG 1 #define HAVE_ST25FL1 1 +#define HAVE_SMARTFS 1 #define HAVE_WM8904 1 #define HAVE_AUDIO_NULL 1 @@ -186,10 +187,16 @@ #ifndef CONFIG_MTD_ST25FL1 # undef HAVE_ST25FL1 +# undef HAVE_SMARTFS #endif #ifndef CONFIG_SAMV7_QSPI # undef HAVE_ST25FL1 +# undef HAVE_SMARTFS +#endif + +#if !defined(CONFIG_MTD_SMART) || !defined(CONFIG_FS_SMARTFS) +# undef HAVE_SMARTFS #endif /* Audio */