summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/examples/configdata/configdata_main.c2
-rw-r--r--apps/examples/flash_test/flash_test.c2
-rw-r--r--apps/examples/mtdpart/mtdpart_main.c2
-rw-r--r--apps/examples/nxffs/nxffs_main.c2
-rw-r--r--apps/examples/smart/smart_main.c2
-rw-r--r--apps/system/flash_eraseall/flash_eraseall.c2
-rw-r--r--apps/system/ramtron/ramtron.c2
-rw-r--r--nuttx/ChangeLog7
-rw-r--r--nuttx/Documentation/NuttxPortingGuide.html2
-rw-r--r--nuttx/arch/arm/src/lm/lm_flash.c2
-rw-r--r--nuttx/arch/arm/src/lpc43xx/lpc43_spifi.c2
-rw-r--r--nuttx/arch/arm/src/lpc43xx/lpc43_spifi.h2
-rw-r--r--nuttx/arch/arm/src/sama5/Kconfig8
-rw-r--r--nuttx/arch/arm/src/sama5/sam_nand.c15
-rw-r--r--nuttx/configs/cloudctrl/src/up_w25.c2
-rw-r--r--nuttx/configs/ea3131/src/up_fillpage.c2
-rw-r--r--nuttx/configs/ea3152/src/up_fillpage.c2
-rw-r--r--nuttx/configs/fire-stm32v2/src/up_w25.c2
-rw-r--r--nuttx/configs/hymini-stm32v/src/up_nsh.c2
-rw-r--r--nuttx/configs/lpc4330-xplorer/src/up_nsh.c2
-rw-r--r--nuttx/configs/mikroe-stm32f4/src/up_nsh.c2
-rw-r--r--nuttx/configs/mirtoo/src/up_nsh.c2
-rw-r--r--nuttx/configs/sama5d3x-ek/src/sam_at24.c2
-rw-r--r--nuttx/configs/sama5d3x-ek/src/sam_at25.c2
-rw-r--r--nuttx/configs/shenzhou/src/up_w25.c2
-rw-r--r--nuttx/configs/spark/src/up_composite.c2
-rw-r--r--nuttx/configs/spark/src/up_nsh.c2
-rw-r--r--nuttx/configs/stm3210e-eval/src/up_nsh.c2
-rw-r--r--nuttx/configs/stm3220g-eval/src/up_nsh.c2
-rw-r--r--nuttx/configs/stm3240g-eval/src/up_nsh.c2
-rw-r--r--nuttx/drivers/Kconfig2
-rw-r--r--nuttx/drivers/README.txt2
-rw-r--r--nuttx/drivers/mtd/Kconfig11
-rw-r--r--nuttx/drivers/mtd/at24xx.c2
-rw-r--r--nuttx/drivers/mtd/at25.c2
-rw-r--r--nuttx/drivers/mtd/at45db.c2
-rw-r--r--nuttx/drivers/mtd/flash_eraseall.c2
-rw-r--r--nuttx/drivers/mtd/ftl.c2
-rw-r--r--nuttx/drivers/mtd/m25px.c2
-rw-r--r--nuttx/drivers/mtd/mtd_config.c2
-rw-r--r--nuttx/drivers/mtd/mtd_partition.c2
-rw-r--r--nuttx/drivers/mtd/rammtd.c2
-rw-r--r--nuttx/drivers/mtd/ramtron.c2
-rw-r--r--nuttx/drivers/mtd/skeleton.c2
-rw-r--r--nuttx/drivers/mtd/smart.c2
-rw-r--r--nuttx/drivers/mtd/sst25.c2
-rw-r--r--nuttx/drivers/mtd/sst39vf.c2
-rw-r--r--nuttx/drivers/mtd/w25.c2
-rw-r--r--nuttx/fs/nxffs/nxffs.h2
-rw-r--r--nuttx/fs/nxffs/nxffs_block.c2
-rw-r--r--nuttx/fs/nxffs/nxffs_blockstats.c2
-rw-r--r--nuttx/fs/nxffs/nxffs_cache.c2
-rw-r--r--nuttx/fs/nxffs/nxffs_dirent.c2
-rw-r--r--nuttx/fs/nxffs/nxffs_dump.c2
-rw-r--r--nuttx/fs/nxffs/nxffs_initialize.c2
-rw-r--r--nuttx/fs/nxffs/nxffs_inode.c2
-rw-r--r--nuttx/fs/nxffs/nxffs_ioctl.c2
-rw-r--r--nuttx/fs/nxffs/nxffs_open.c2
-rw-r--r--nuttx/fs/nxffs/nxffs_read.c2
-rw-r--r--nuttx/fs/nxffs/nxffs_reformat.c2
-rw-r--r--nuttx/fs/nxffs/nxffs_stat.c2
-rw-r--r--nuttx/fs/nxffs/nxffs_unlink.c2
-rw-r--r--nuttx/fs/nxffs/nxffs_write.c2
-rw-r--r--nuttx/fs/smartfs/smartfs.h2
-rw-r--r--nuttx/fs/smartfs/smartfs_smart.c2
-rw-r--r--nuttx/include/nuttx/mtd/mtd.h (renamed from nuttx/include/nuttx/mtd.h)8
66 files changed, 100 insertions, 71 deletions
diff --git a/apps/examples/configdata/configdata_main.c b/apps/examples/configdata/configdata_main.c
index d20bffd38..e9e730889 100644
--- a/apps/examples/configdata/configdata_main.c
+++ b/apps/examples/configdata/configdata_main.c
@@ -49,7 +49,7 @@
#include <crc32.h>
#include <debug.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include <nuttx/configdata.h>
#include <nuttx/fs/ioctl.h>
#include <sys/ioctl.h>
diff --git a/apps/examples/flash_test/flash_test.c b/apps/examples/flash_test/flash_test.c
index 105950557..e6c339990 100644
--- a/apps/examples/flash_test/flash_test.c
+++ b/apps/examples/flash_test/flash_test.c
@@ -45,7 +45,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include <nuttx/smart.h>
#include <nuttx/fs/ioctl.h>
diff --git a/apps/examples/mtdpart/mtdpart_main.c b/apps/examples/mtdpart/mtdpart_main.c
index 9fcd2a76d..3c1e98437 100644
--- a/apps/examples/mtdpart/mtdpart_main.c
+++ b/apps/examples/mtdpart/mtdpart_main.c
@@ -46,7 +46,7 @@
#include <errno.h>
#include <debug.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include <nuttx/fs/fs.h>
#include <nuttx/fs/ioctl.h>
diff --git a/apps/examples/nxffs/nxffs_main.c b/apps/examples/nxffs/nxffs_main.c
index 23b02cc16..a52afea39 100644
--- a/apps/examples/nxffs/nxffs_main.c
+++ b/apps/examples/nxffs/nxffs_main.c
@@ -52,7 +52,7 @@
#include <crc32.h>
#include <debug.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include <nuttx/fs/nxffs.h>
/****************************************************************************
diff --git a/apps/examples/smart/smart_main.c b/apps/examples/smart/smart_main.c
index ce303caa7..114fb041a 100644
--- a/apps/examples/smart/smart_main.c
+++ b/apps/examples/smart/smart_main.c
@@ -52,7 +52,7 @@
#include <crc32.h>
#include <debug.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include <nuttx/smart.h>
#include <nuttx/fs/ioctl.h>
#include <nuttx/fs/mksmartfs.h>
diff --git a/apps/system/flash_eraseall/flash_eraseall.c b/apps/system/flash_eraseall/flash_eraseall.c
index e6eebad0c..824360c33 100644
--- a/apps/system/flash_eraseall/flash_eraseall.c
+++ b/apps/system/flash_eraseall/flash_eraseall.c
@@ -44,7 +44,7 @@
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
/****************************************************************************
* Pre-processor Definitions
diff --git a/apps/system/ramtron/ramtron.c b/apps/system/ramtron/ramtron.c
index 46915db46..2e1632cf1 100644
--- a/apps/system/ramtron/ramtron.c
+++ b/apps/system/ramtron/ramtron.c
@@ -45,7 +45,7 @@
#include <string.h>
#include <nuttx/spi/spi.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
FAR struct mtd_dev_s *ramtron_initialize(FAR struct spi_dev_s *dev);
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index d1705043b..6c13b6e14 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -6059,6 +6059,9 @@
compilation for the set of writable file systems. Noted by
Daniel Palmer (2013-11-15).
* arch/arm/src/sama5/sam_nand.c and .h: Framework for an MTD driver
- that will provide raw access to NAND (2013-11015).
+ that will provide raw access to NAND (2013-11-15).
* configs/sama5d3x-ek/src/sam_nandflash.c: Provides board-specific
- memory controller initialize for NAND flash (2013-11015).
+ memory controller initialize for NAND flash (2013-11-15).
+ * include/nuttx/mtd/mtd.h: Move include/nutt/mtd.h to
+ include/nuttx/mtd/mtd.h where it will, hopefully, soon be joined by
+ other MTD-related header files (2013-11-15).
diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html
index 9e5c8122a..65f4820bf 100644
--- a/nuttx/Documentation/NuttxPortingGuide.html
+++ b/nuttx/Documentation/NuttxPortingGuide.html
@@ -3246,7 +3246,7 @@ extern void up_ledoff(int led);
<ul>
<li>
<p>
- <b><code>include/nuttx/mtd.h</code></b>.
+ <b><code>include/nuttx/mtd/mtd.h</code></b>.
All structures and APIs needed to work with MTD drivers are provided in this header file.
</p>
</li>
diff --git a/nuttx/arch/arm/src/lm/lm_flash.c b/nuttx/arch/arm/src/lm/lm_flash.c
index ca14f45d5..1a5490525 100644
--- a/nuttx/arch/arm/src/lm/lm_flash.c
+++ b/nuttx/arch/arm/src/lm/lm_flash.c
@@ -52,7 +52,7 @@
#include <debug.h>
#include <nuttx/fs/ioctl.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include "up_arch.h"
#include "chip.h"
diff --git a/nuttx/arch/arm/src/lpc43xx/lpc43_spifi.c b/nuttx/arch/arm/src/lpc43xx/lpc43_spifi.c
index ad6ce0ad5..f7a7e41b7 100644
--- a/nuttx/arch/arm/src/lpc43xx/lpc43_spifi.c
+++ b/nuttx/arch/arm/src/lpc43xx/lpc43_spifi.c
@@ -51,7 +51,7 @@
#include <nuttx/kmalloc.h>
#include <nuttx/fs/ioctl.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include <arch/irq.h>
#include <arch/board/board.h>
diff --git a/nuttx/arch/arm/src/lpc43xx/lpc43_spifi.h b/nuttx/arch/arm/src/lpc43xx/lpc43_spifi.h
index f7cc0d775..2193a3b2f 100644
--- a/nuttx/arch/arm/src/lpc43xx/lpc43_spifi.h
+++ b/nuttx/arch/arm/src/lpc43xx/lpc43_spifi.h
@@ -41,7 +41,7 @@
****************************************************************************/
#include <nuttx/config.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include "chip.h"
#include "chip/lpc43_spifi.h"
diff --git a/nuttx/arch/arm/src/sama5/Kconfig b/nuttx/arch/arm/src/sama5/Kconfig
index 813c7baae..acc34bee1 100644
--- a/nuttx/arch/arm/src/sama5/Kconfig
+++ b/nuttx/arch/arm/src/sama5/Kconfig
@@ -3033,6 +3033,8 @@ config SAMA5_EBICS0_NOR
config SAMA5_EBICS0_NAND
bool "NAND Flash"
+ select MTD
+ select MTD_NAND
endchoice # CS0 Memory Type
endif # SAMA5_EBICS0
@@ -3082,6 +3084,8 @@ config SAMA5_EBICS1_NOR
config SAMA5_EBICS1_NAND
bool "NAND Flash"
+ select MTD
+ select MTD_NAND
endchoice # CS1 Memory Type
endif # SAMA5_EBICS1
@@ -3131,6 +3135,8 @@ config SAMA5_EBICS2_NOR
config SAMA5_EBICS2_NAND
bool "NAND Flash"
+ select MTD
+ select MTD_NAND
endchoice # CS2 Memory Type
endif # SAMA5_EBICS2
@@ -3180,6 +3186,8 @@ config SAMA5_EBICS3_NOR
config SAMA5_EBICS3_NAND
bool "NAND Flash"
+ select MTD
+ select MTD_NAND
endchoice # CS3 Memory Type
endif # SAMA5_EBICS3
diff --git a/nuttx/arch/arm/src/sama5/sam_nand.c b/nuttx/arch/arm/src/sama5/sam_nand.c
index 4e3b910d6..819134a7f 100644
--- a/nuttx/arch/arm/src/sama5/sam_nand.c
+++ b/nuttx/arch/arm/src/sama5/sam_nand.c
@@ -4,6 +4,15 @@
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
+ * References:
+ * SAMA5D3 Series Data Sheet
+ * Atmel NoOS sample code.
+ *
+ * The Atmel sample code has a BSD compatibile license that requires this
+ * copyright notice:
+ *
+ * Copyright (c) 2011, 2012, Atmel Corporation
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -14,8 +23,8 @@
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
+ * 3. Neither the names NuttX nor Atmel nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
@@ -46,7 +55,7 @@
#include <debug.h>
#include <nuttx/fs/ioctl.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include "sam_nand.h"
diff --git a/nuttx/configs/cloudctrl/src/up_w25.c b/nuttx/configs/cloudctrl/src/up_w25.c
index e4df22a17..b9e018a90 100644
--- a/nuttx/configs/cloudctrl/src/up_w25.c
+++ b/nuttx/configs/cloudctrl/src/up_w25.c
@@ -50,7 +50,7 @@
#ifdef CONFIG_STM32_SPI1
# include <nuttx/spi/spi.h>
-# include <nuttx/mtd.h>
+# include <nuttx/mtd/mtd.h>
# include <nuttx/fs/nxffs.h>
#endif
diff --git a/nuttx/configs/ea3131/src/up_fillpage.c b/nuttx/configs/ea3131/src/up_fillpage.c
index eaed9a8a2..35ba20656 100644
--- a/nuttx/configs/ea3131/src/up_fillpage.c
+++ b/nuttx/configs/ea3131/src/up_fillpage.c
@@ -66,7 +66,7 @@
# include <sys/ioctl.h>
# include <nuttx/fs/ioctl.h>
# include <nuttx/spi/spi.h>
-# include <nuttx/mtd.h>
+# include <nuttx/mtd/mtd.h>
#endif
/****************************************************************************
diff --git a/nuttx/configs/ea3152/src/up_fillpage.c b/nuttx/configs/ea3152/src/up_fillpage.c
index 9f470ee32..3b9f02a88 100644
--- a/nuttx/configs/ea3152/src/up_fillpage.c
+++ b/nuttx/configs/ea3152/src/up_fillpage.c
@@ -66,7 +66,7 @@
# include <sys/ioctl.h>
# include <nuttx/fs/ioctl.h>
# include <nuttx/spi/spi.h>
-# include <nuttx/mtd.h>
+# include <nuttx/mtd/mtd.h>
#endif
/****************************************************************************
diff --git a/nuttx/configs/fire-stm32v2/src/up_w25.c b/nuttx/configs/fire-stm32v2/src/up_w25.c
index 56bbde634..bfd27cd1f 100644
--- a/nuttx/configs/fire-stm32v2/src/up_w25.c
+++ b/nuttx/configs/fire-stm32v2/src/up_w25.c
@@ -49,7 +49,7 @@
#ifdef CONFIG_STM32_SPI1
# include <nuttx/spi/spi.h>
-# include <nuttx/mtd.h>
+# include <nuttx/mtd/mtd.h>
# include <nuttx/fs/nxffs.h>
#endif
diff --git a/nuttx/configs/hymini-stm32v/src/up_nsh.c b/nuttx/configs/hymini-stm32v/src/up_nsh.c
index e8019ae08..a28ffb0e9 100644
--- a/nuttx/configs/hymini-stm32v/src/up_nsh.c
+++ b/nuttx/configs/hymini-stm32v/src/up_nsh.c
@@ -47,7 +47,7 @@
#ifdef CONFIG_STM32_SPI1
# include <nuttx/spi/spi.h>
-# include <nuttx/mtd.h>
+# include <nuttx/mtd/mtd.h>
#endif
#ifdef CONFIG_STM32_SDIO
diff --git a/nuttx/configs/lpc4330-xplorer/src/up_nsh.c b/nuttx/configs/lpc4330-xplorer/src/up_nsh.c
index a09acd771..3a7fa83cd 100644
--- a/nuttx/configs/lpc4330-xplorer/src/up_nsh.c
+++ b/nuttx/configs/lpc4330-xplorer/src/up_nsh.c
@@ -47,7 +47,7 @@
#include "chip.h"
#ifdef CONFIG_LPC43_SPIFI
-# include <nuttx/mtd.h>
+# include <nuttx/mtd/mtd.h>
# include "lpc43_spifi.h"
# ifdef CONFIG_SPFI_NXFFS
diff --git a/nuttx/configs/mikroe-stm32f4/src/up_nsh.c b/nuttx/configs/mikroe-stm32f4/src/up_nsh.c
index cfb41a283..9abd86054 100644
--- a/nuttx/configs/mikroe-stm32f4/src/up_nsh.c
+++ b/nuttx/configs/mikroe-stm32f4/src/up_nsh.c
@@ -52,7 +52,7 @@
#endif
#ifdef CONFIG_MTD_M25P
-# include <nuttx/mtd.h>
+# include <nuttx/mtd/mtd.h>
#endif
#ifdef CONFIG_SYSTEM_USBMONITOR
diff --git a/nuttx/configs/mirtoo/src/up_nsh.c b/nuttx/configs/mirtoo/src/up_nsh.c
index 482e91445..f81104c2b 100644
--- a/nuttx/configs/mirtoo/src/up_nsh.c
+++ b/nuttx/configs/mirtoo/src/up_nsh.c
@@ -49,7 +49,7 @@
#ifdef CONFIG_PIC32MX_SPI2
# include <nuttx/spi/spi.h>
-# include <nuttx/mtd.h>
+# include <nuttx/mtd/mtd.h>
# include <nuttx/fs/nxffs.h>
#endif
diff --git a/nuttx/configs/sama5d3x-ek/src/sam_at24.c b/nuttx/configs/sama5d3x-ek/src/sam_at24.c
index 961b3d787..e935672ca 100644
--- a/nuttx/configs/sama5d3x-ek/src/sam_at24.c
+++ b/nuttx/configs/sama5d3x-ek/src/sam_at24.c
@@ -65,7 +65,7 @@
#include <debug.h>
#include <nuttx/i2c.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include <nuttx/fs/nxffs.h>
#include "sama5d3x-ek.h"
diff --git a/nuttx/configs/sama5d3x-ek/src/sam_at25.c b/nuttx/configs/sama5d3x-ek/src/sam_at25.c
index 680c11c0f..4ecef3cf1 100644
--- a/nuttx/configs/sama5d3x-ek/src/sam_at25.c
+++ b/nuttx/configs/sama5d3x-ek/src/sam_at25.c
@@ -47,7 +47,7 @@
#include <debug.h>
#include <nuttx/spi/spi.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include <nuttx/fs/nxffs.h>
#include "sam_spi.h"
diff --git a/nuttx/configs/shenzhou/src/up_w25.c b/nuttx/configs/shenzhou/src/up_w25.c
index dfbb18ef9..6dcfe093a 100644
--- a/nuttx/configs/shenzhou/src/up_w25.c
+++ b/nuttx/configs/shenzhou/src/up_w25.c
@@ -49,7 +49,7 @@
#ifdef CONFIG_STM32_SPI1
# include <nuttx/spi/spi.h>
-# include <nuttx/mtd.h>
+# include <nuttx/mtd/mtd.h>
# include <nuttx/fs/nxffs.h>
#endif
diff --git a/nuttx/configs/spark/src/up_composite.c b/nuttx/configs/spark/src/up_composite.c
index 8cb347057..a82ad75dc 100644
--- a/nuttx/configs/spark/src/up_composite.c
+++ b/nuttx/configs/spark/src/up_composite.c
@@ -50,7 +50,7 @@
#ifdef CONFIG_MTD_SST25
# include <nuttx/spi/spi.h>
-# include <nuttx/mtd.h>
+# include <nuttx/mtd/mtd.h>
# include <sys/mount.h>
#endif
diff --git a/nuttx/configs/spark/src/up_nsh.c b/nuttx/configs/spark/src/up_nsh.c
index 1fb2b4846..45bd8f5e4 100644
--- a/nuttx/configs/spark/src/up_nsh.c
+++ b/nuttx/configs/spark/src/up_nsh.c
@@ -50,7 +50,7 @@
#ifdef CONFIG_MTD_SST25
# include <nuttx/spi/spi.h>
-# include <nuttx/mtd.h>
+# include <nuttx/mtd/mtd.h>
# include <sys/mount.h>
#endif
diff --git a/nuttx/configs/stm3210e-eval/src/up_nsh.c b/nuttx/configs/stm3210e-eval/src/up_nsh.c
index 95f919fac..6caa12dbd 100644
--- a/nuttx/configs/stm3210e-eval/src/up_nsh.c
+++ b/nuttx/configs/stm3210e-eval/src/up_nsh.c
@@ -47,7 +47,7 @@
#ifdef CONFIG_STM32_SPI1
# include <nuttx/spi/spi.h>
-# include <nuttx/mtd.h>
+# include <nuttx/mtd/mtd.h>
#endif
#ifdef CONFIG_STM32_SDIO
diff --git a/nuttx/configs/stm3220g-eval/src/up_nsh.c b/nuttx/configs/stm3220g-eval/src/up_nsh.c
index afdd01798..37becd242 100644
--- a/nuttx/configs/stm3220g-eval/src/up_nsh.c
+++ b/nuttx/configs/stm3220g-eval/src/up_nsh.c
@@ -47,7 +47,7 @@
#ifdef CONFIG_STM32_SPI1
# include <nuttx/spi/spi.h>
-# include <nuttx/mtd.h>
+# include <nuttx/mtd/mtd.h>
#endif
#ifdef CONFIG_STM32_SDIO
diff --git a/nuttx/configs/stm3240g-eval/src/up_nsh.c b/nuttx/configs/stm3240g-eval/src/up_nsh.c
index 3b1038747..a0add13b4 100644
--- a/nuttx/configs/stm3240g-eval/src/up_nsh.c
+++ b/nuttx/configs/stm3240g-eval/src/up_nsh.c
@@ -47,7 +47,7 @@
#ifdef CONFIG_STM32_SPI1
# include <nuttx/spi/spi.h>
-# include <nuttx/mtd.h>
+# include <nuttx/mtd/mtd.h>
#endif
#ifdef CONFIG_STM32_SDIO
diff --git a/nuttx/drivers/Kconfig b/nuttx/drivers/Kconfig
index fa32c2b6e..03577be3c 100644
--- a/nuttx/drivers/Kconfig
+++ b/nuttx/drivers/Kconfig
@@ -327,7 +327,7 @@ menuconfig MTD
---help---
Memory Technology Device (MTD) drivers. Some simple drivers for
memory technologies like FLASH, EEPROM, NVRAM, etc. See
- include/nuttx/mtd.h
+ include/nuttx/mtd/mtd.h
(Note: This is a simple memory interface and should not be
confused with the "real" MTD developed at infradead.org. This
diff --git a/nuttx/drivers/README.txt b/nuttx/drivers/README.txt
index e27e8c583..d4c3982e3 100644
--- a/nuttx/drivers/README.txt
+++ b/nuttx/drivers/README.txt
@@ -85,7 +85,7 @@ mmcsd/
mtd/
Memory Technology Device (MTD) drivers. Some simple drivers for
memory technologies like FLASH, EEPROM, NVRAM, etc. See
- include/nuttx/mtd.h
+ include/nuttx/mtd/mtd.h
(Note: This is a simple memory interface and should not be
confused with the "real" MTD developed at infradead.org. This
diff --git a/nuttx/drivers/mtd/Kconfig b/nuttx/drivers/mtd/Kconfig
index 0d703ed51..c86935249 100644
--- a/nuttx/drivers/mtd/Kconfig
+++ b/nuttx/drivers/mtd/Kconfig
@@ -19,7 +19,7 @@ config MTD_PARTITION
each managed by a separate MTD driver. The MTD parition interface
is described in:
- include/nuttx/mtd.h
+ include/nuttx/mtd/mtd.h
FAR struct mtd_dev_s *mtd_partition(FAR struct mtd_dev_s *mtd, off_t offset, off_t nblocks);
Each call to mtd_partition() will create a new MTD driver instance
@@ -75,6 +75,15 @@ config MTD_CONFIG_ERASEDVALUE
comment "MTD Device Drivers"
+config MTD_NAND
+ bool "Enable NAND support"
+ default n
+ ---help---
+ Enable support for NAND FLASH devices.
+
+if MTD_NAND
+endif # MTD_NAND
+
config RAMMTD
bool "RAM-based MTD driver"
default n
diff --git a/nuttx/drivers/mtd/at24xx.c b/nuttx/drivers/mtd/at24xx.c
index 326c6f86b..abf4d84d8 100644
--- a/nuttx/drivers/mtd/at24xx.c
+++ b/nuttx/drivers/mtd/at24xx.c
@@ -60,7 +60,7 @@
#include <nuttx/kmalloc.h>
#include <nuttx/fs/ioctl.h>
#include <nuttx/i2c.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#ifdef CONFIG_MTD_AT24XX
diff --git a/nuttx/drivers/mtd/at25.c b/nuttx/drivers/mtd/at25.c
index 86556ac33..880398aa1 100644
--- a/nuttx/drivers/mtd/at25.c
+++ b/nuttx/drivers/mtd/at25.c
@@ -52,7 +52,7 @@
#include <nuttx/kmalloc.h>
#include <nuttx/fs/ioctl.h>
#include <nuttx/spi/spi.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
/************************************************************************************
* Pre-processor Definitions
diff --git a/nuttx/drivers/mtd/at45db.c b/nuttx/drivers/mtd/at45db.c
index 9b9f9ead7..372e6be57 100644
--- a/nuttx/drivers/mtd/at45db.c
+++ b/nuttx/drivers/mtd/at45db.c
@@ -63,7 +63,7 @@
#include <nuttx/arch.h>
#include <nuttx/fs/ioctl.h>
#include <nuttx/spi/spi.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
/************************************************************************************
* Pre-processor Definitions
diff --git a/nuttx/drivers/mtd/flash_eraseall.c b/nuttx/drivers/mtd/flash_eraseall.c
index ce0cfe649..67e93f0ef 100644
--- a/nuttx/drivers/mtd/flash_eraseall.c
+++ b/nuttx/drivers/mtd/flash_eraseall.c
@@ -44,7 +44,7 @@
#include <nuttx/fs/fs.h>
#include <nuttx/fs/ioctl.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
/****************************************************************************
* Private Definitions
diff --git a/nuttx/drivers/mtd/ftl.c b/nuttx/drivers/mtd/ftl.c
index d3d62c655..cffede20b 100644
--- a/nuttx/drivers/mtd/ftl.c
+++ b/nuttx/drivers/mtd/ftl.c
@@ -52,7 +52,7 @@
#include <nuttx/kmalloc.h>
#include <nuttx/fs/fs.h>
#include <nuttx/fs/ioctl.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include <nuttx/rwbuffer.h>
/****************************************************************************
diff --git a/nuttx/drivers/mtd/m25px.c b/nuttx/drivers/mtd/m25px.c
index 02aad5e7c..3268a9f9f 100644
--- a/nuttx/drivers/mtd/m25px.c
+++ b/nuttx/drivers/mtd/m25px.c
@@ -52,7 +52,7 @@
#include <nuttx/kmalloc.h>
#include <nuttx/fs/ioctl.h>
#include <nuttx/spi/spi.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
/************************************************************************************
* Pre-processor Definitions
diff --git a/nuttx/drivers/mtd/mtd_config.c b/nuttx/drivers/mtd/mtd_config.c
index 73112d803..4fa7b15d5 100644
--- a/nuttx/drivers/mtd/mtd_config.c
+++ b/nuttx/drivers/mtd/mtd_config.c
@@ -58,7 +58,7 @@
#include <nuttx/kmalloc.h>
#include <nuttx/fs/ioctl.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include <nuttx/configdata.h>
#ifdef CONFIG_MTD_CONFIG
diff --git a/nuttx/drivers/mtd/mtd_partition.c b/nuttx/drivers/mtd/mtd_partition.c
index 91ccdc74f..550a775c8 100644
--- a/nuttx/drivers/mtd/mtd_partition.c
+++ b/nuttx/drivers/mtd/mtd_partition.c
@@ -46,7 +46,7 @@
#include <assert.h>
#include <debug.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include <nuttx/kmalloc.h>
#include <nuttx/fs/ioctl.h>
diff --git a/nuttx/drivers/mtd/rammtd.c b/nuttx/drivers/mtd/rammtd.c
index 575c3fb31..c901499bc 100644
--- a/nuttx/drivers/mtd/rammtd.c
+++ b/nuttx/drivers/mtd/rammtd.c
@@ -48,7 +48,7 @@
#include <nuttx/kmalloc.h>
#include <nuttx/fs/ioctl.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
/****************************************************************************
* Pre-processor Definitions
diff --git a/nuttx/drivers/mtd/ramtron.c b/nuttx/drivers/mtd/ramtron.c
index d2180c91a..a77d7d82b 100644
--- a/nuttx/drivers/mtd/ramtron.c
+++ b/nuttx/drivers/mtd/ramtron.c
@@ -69,7 +69,7 @@
#include <nuttx/kmalloc.h>
#include <nuttx/fs/ioctl.h>
#include <nuttx/spi/spi.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
/************************************************************************************
* Pre-processor Definitions
diff --git a/nuttx/drivers/mtd/skeleton.c b/nuttx/drivers/mtd/skeleton.c
index fe550f55e..ebb128030 100644
--- a/nuttx/drivers/mtd/skeleton.c
+++ b/nuttx/drivers/mtd/skeleton.c
@@ -44,7 +44,7 @@
#include <errno.h>
#include <nuttx/fs/ioctl.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
/****************************************************************************
* Pre-processor Definitions
diff --git a/nuttx/drivers/mtd/smart.c b/nuttx/drivers/mtd/smart.c
index 35a367e5b..a6c8fa2c2 100644
--- a/nuttx/drivers/mtd/smart.c
+++ b/nuttx/drivers/mtd/smart.c
@@ -55,7 +55,7 @@
#include <nuttx/kmalloc.h>
#include <nuttx/fs/fs.h>
#include <nuttx/fs/ioctl.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include <nuttx/smart.h>
/****************************************************************************
diff --git a/nuttx/drivers/mtd/sst25.c b/nuttx/drivers/mtd/sst25.c
index 923eea670..358a7763f 100644
--- a/nuttx/drivers/mtd/sst25.c
+++ b/nuttx/drivers/mtd/sst25.c
@@ -59,7 +59,7 @@
#include <nuttx/kmalloc.h>
#include <nuttx/fs/ioctl.h>
#include <nuttx/spi/spi.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
/************************************************************************************
* Pre-processor Definitions
diff --git a/nuttx/drivers/mtd/sst39vf.c b/nuttx/drivers/mtd/sst39vf.c
index 7c0bac786..0f7f49cf6 100644
--- a/nuttx/drivers/mtd/sst39vf.c
+++ b/nuttx/drivers/mtd/sst39vf.c
@@ -51,7 +51,7 @@
#include <nuttx/clock.h>
#include <nuttx/arch.h>
#include <nuttx/fs/ioctl.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
/****************************************************************************
* Pre-processor Definitions
diff --git a/nuttx/drivers/mtd/w25.c b/nuttx/drivers/mtd/w25.c
index b87dba044..097662d09 100644
--- a/nuttx/drivers/mtd/w25.c
+++ b/nuttx/drivers/mtd/w25.c
@@ -54,7 +54,7 @@
#include <nuttx/kmalloc.h>
#include <nuttx/fs/ioctl.h>
#include <nuttx/spi/spi.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
/************************************************************************************
* Pre-processor Definitions
diff --git a/nuttx/fs/nxffs/nxffs.h b/nuttx/fs/nxffs/nxffs.h
index b2ac44b9c..f434fa4c9 100644
--- a/nuttx/fs/nxffs/nxffs.h
+++ b/nuttx/fs/nxffs/nxffs.h
@@ -49,7 +49,7 @@
#include <stdbool.h>
#include <semaphore.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include <nuttx/fs/nxffs.h>
/****************************************************************************
diff --git a/nuttx/fs/nxffs/nxffs_block.c b/nuttx/fs/nxffs/nxffs_block.c
index a0f76766a..4cc2ac263 100644
--- a/nuttx/fs/nxffs/nxffs_block.c
+++ b/nuttx/fs/nxffs/nxffs_block.c
@@ -46,7 +46,7 @@
#include <assert.h>
#include <debug.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include "nxffs.h"
diff --git a/nuttx/fs/nxffs/nxffs_blockstats.c b/nuttx/fs/nxffs/nxffs_blockstats.c
index 348374e67..f345b19b4 100644
--- a/nuttx/fs/nxffs/nxffs_blockstats.c
+++ b/nuttx/fs/nxffs/nxffs_blockstats.c
@@ -45,7 +45,7 @@
#include <errno.h>
#include <debug.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include "nxffs.h"
diff --git a/nuttx/fs/nxffs/nxffs_cache.c b/nuttx/fs/nxffs/nxffs_cache.c
index 059c1e729..2f328aac7 100644
--- a/nuttx/fs/nxffs/nxffs_cache.c
+++ b/nuttx/fs/nxffs/nxffs_cache.c
@@ -45,7 +45,7 @@
#include <errno.h>
#include <debug.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include "nxffs.h"
diff --git a/nuttx/fs/nxffs/nxffs_dirent.c b/nuttx/fs/nxffs/nxffs_dirent.c
index 221549438..2afc694e5 100644
--- a/nuttx/fs/nxffs/nxffs_dirent.c
+++ b/nuttx/fs/nxffs/nxffs_dirent.c
@@ -48,7 +48,7 @@
#include <debug.h>
#include <nuttx/fs/fs.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include <nuttx/fs/dirent.h>
#include "nxffs.h"
diff --git a/nuttx/fs/nxffs/nxffs_dump.c b/nuttx/fs/nxffs/nxffs_dump.c
index 3201a68f9..032c5f875 100644
--- a/nuttx/fs/nxffs/nxffs_dump.c
+++ b/nuttx/fs/nxffs/nxffs_dump.c
@@ -48,7 +48,7 @@
#include <nuttx/kmalloc.h>
#include <nuttx/fs/ioctl.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include "nxffs.h"
diff --git a/nuttx/fs/nxffs/nxffs_initialize.c b/nuttx/fs/nxffs/nxffs_initialize.c
index 83596ee17..8cf2edcdb 100644
--- a/nuttx/fs/nxffs/nxffs_initialize.c
+++ b/nuttx/fs/nxffs/nxffs_initialize.c
@@ -47,7 +47,7 @@
#include <debug.h>
#include <nuttx/kmalloc.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include <nuttx/fs/fs.h>
#include <nuttx/fs/ioctl.h>
diff --git a/nuttx/fs/nxffs/nxffs_inode.c b/nuttx/fs/nxffs/nxffs_inode.c
index 505a6c686..bf21eafcd 100644
--- a/nuttx/fs/nxffs/nxffs_inode.c
+++ b/nuttx/fs/nxffs/nxffs_inode.c
@@ -48,7 +48,7 @@
#include <debug.h>
#include <nuttx/kmalloc.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include "nxffs.h"
diff --git a/nuttx/fs/nxffs/nxffs_ioctl.c b/nuttx/fs/nxffs/nxffs_ioctl.c
index 332878eb0..a6d85bf4e 100644
--- a/nuttx/fs/nxffs/nxffs_ioctl.c
+++ b/nuttx/fs/nxffs/nxffs_ioctl.c
@@ -48,7 +48,7 @@
#include <nuttx/fs/fs.h>
#include <nuttx/fs/ioctl.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include "nxffs.h"
diff --git a/nuttx/fs/nxffs/nxffs_open.c b/nuttx/fs/nxffs/nxffs_open.c
index 4d8f62c84..4e5fe3cae 100644
--- a/nuttx/fs/nxffs/nxffs_open.c
+++ b/nuttx/fs/nxffs/nxffs_open.c
@@ -51,7 +51,7 @@
#include <nuttx/kmalloc.h>
#include <nuttx/fs/fs.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include "nxffs.h"
diff --git a/nuttx/fs/nxffs/nxffs_read.c b/nuttx/fs/nxffs/nxffs_read.c
index a97c09263..315b41e88 100644
--- a/nuttx/fs/nxffs/nxffs_read.c
+++ b/nuttx/fs/nxffs/nxffs_read.c
@@ -49,7 +49,7 @@
#include <debug.h>
#include <nuttx/fs/fs.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include "nxffs.h"
diff --git a/nuttx/fs/nxffs/nxffs_reformat.c b/nuttx/fs/nxffs/nxffs_reformat.c
index f77a40e06..3453b387d 100644
--- a/nuttx/fs/nxffs/nxffs_reformat.c
+++ b/nuttx/fs/nxffs/nxffs_reformat.c
@@ -45,7 +45,7 @@
#include <errno.h>
#include <debug.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include "nxffs.h"
diff --git a/nuttx/fs/nxffs/nxffs_stat.c b/nuttx/fs/nxffs/nxffs_stat.c
index d4d58a72c..0d232226e 100644
--- a/nuttx/fs/nxffs/nxffs_stat.c
+++ b/nuttx/fs/nxffs/nxffs_stat.c
@@ -50,7 +50,7 @@
#include <debug.h>
#include <nuttx/fs/fs.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include "nxffs.h"
diff --git a/nuttx/fs/nxffs/nxffs_unlink.c b/nuttx/fs/nxffs/nxffs_unlink.c
index 8c8553025..36bc50796 100644
--- a/nuttx/fs/nxffs/nxffs_unlink.c
+++ b/nuttx/fs/nxffs/nxffs_unlink.c
@@ -47,7 +47,7 @@
#include <debug.h>
#include <nuttx/fs/fs.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include "nxffs.h"
diff --git a/nuttx/fs/nxffs/nxffs_write.c b/nuttx/fs/nxffs/nxffs_write.c
index 756ac7467..3a95e82a7 100644
--- a/nuttx/fs/nxffs/nxffs_write.c
+++ b/nuttx/fs/nxffs/nxffs_write.c
@@ -49,7 +49,7 @@
#include <debug.h>
#include <nuttx/fs/fs.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include "nxffs.h"
diff --git a/nuttx/fs/smartfs/smartfs.h b/nuttx/fs/smartfs/smartfs.h
index d1d3928c4..6ff07ad64 100644
--- a/nuttx/fs/smartfs/smartfs.h
+++ b/nuttx/fs/smartfs/smartfs.h
@@ -49,7 +49,7 @@
#include <stdbool.h>
#include <semaphore.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include <nuttx/smart.h>
/****************************************************************************
diff --git a/nuttx/fs/smartfs/smartfs_smart.c b/nuttx/fs/smartfs/smartfs_smart.c
index accf1b04e..43c241374 100644
--- a/nuttx/fs/smartfs/smartfs_smart.c
+++ b/nuttx/fs/smartfs/smartfs_smart.c
@@ -57,7 +57,7 @@
#include <nuttx/fs/fat.h>
#include <nuttx/fs/dirent.h>
#include <nuttx/fs/ioctl.h>
-#include <nuttx/mtd.h>
+#include <nuttx/mtd/mtd.h>
#include <nuttx/smart.h>
#include "smartfs.h"
diff --git a/nuttx/include/nuttx/mtd.h b/nuttx/include/nuttx/mtd/mtd.h
index cf6945dfb..ab3f4608b 100644
--- a/nuttx/include/nuttx/mtd.h
+++ b/nuttx/include/nuttx/mtd/mtd.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * include/nuttx/mtd.h
+ * include/nuttx/mtd/mtd.h
* Memory Technology Device (MTD) interface
*
* Copyright (C) 2009-2013 Gregory Nutt. All rights reserved.
@@ -34,8 +34,8 @@
*
****************************************************************************/
-#ifndef __INCLUDE_NUTTX_MTD_H
-#define __INCLUDE_NUTTX_MTD_H
+#ifndef __INCLUDE_NUTTX_MTD_MTD_H
+#define __INCLUDE_NUTTX_MTD_MTD_H
/****************************************************************************
* Included Files
@@ -346,4 +346,4 @@ FAR struct mtd_dev_s *up_flashinitialize(void);
#endif
#endif /* __ASSEMBLY__ */
-#endif /* __INCLUDE_NUTTX_MTD_H */
+#endif /* __INCLUDE_NUTTX_MTD_MTD_H */