summaryrefslogtreecommitdiff
path: root/nuttx/configs/sama5d3x-ek/src/sam_at25.c
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-08-07 11:31:31 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-08-07 11:31:31 -0600
commit7848ded204d5ba4607f9fff39eba86a67b6dab42 (patch)
treef814f1947e41758dc25e7d8fb5c32f0b5e42cba3 /nuttx/configs/sama5d3x-ek/src/sam_at25.c
parent2ba66ac0d2d6d7aa2ab16a8da4d65aa35522314a (diff)
downloadpx4-nuttx-7848ded204d5ba4607f9fff39eba86a67b6dab42.tar.gz
px4-nuttx-7848ded204d5ba4607f9fff39eba86a67b6dab42.tar.bz2
px4-nuttx-7848ded204d5ba4607f9fff39eba86a67b6dab42.zip
Change setup logic to hand MTD minor numbers for AT24, HSMCI0, and HSMCI1
Diffstat (limited to 'nuttx/configs/sama5d3x-ek/src/sam_at25.c')
-rw-r--r--nuttx/configs/sama5d3x-ek/src/sam_at25.c37
1 files changed, 3 insertions, 34 deletions
diff --git a/nuttx/configs/sama5d3x-ek/src/sam_at25.c b/nuttx/configs/sama5d3x-ek/src/sam_at25.c
index 4f4d19cf0..637603ea2 100644
--- a/nuttx/configs/sama5d3x-ek/src/sam_at25.c
+++ b/nuttx/configs/sama5d3x-ek/src/sam_at25.c
@@ -56,40 +56,12 @@
#include "sama5d3x-ek.h"
+#ifdef CONFIG_MTD_AT25
+
/****************************************************************************
* Pre-Processor Definitions
****************************************************************************/
-/* Configuration ************************************************************/
-/* Can't support the AT25 device if it SPI0 or AT25 support are not enabled */
-
-#define HAVE_AT25 1
-#if !defined(CONFIG_SAMA5_SPI0) || !defined(CONFIG_MTD_AT25)
-# undef HAVE_AT25
-#endif
-
-/* Can't support AT25 features if mountpoints are disabled or if we were not
- * asked to mount the AT25 part
- */
-
-#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_SAMA5_AT25_AUTOMOUNT)
-# undef HAVE_AT25
-#endif
-
-/* If we are going to mount the AT25, then they user must also have told
- * us what to do with it by setting one of these.
- */
-
-#if !defined(CONFIG_SAMA5_AT25_FTL) && !defined(CONFIG_SAMA5_AT25_NXFFS)
-# undef HAVE_AT25
-#endif
-
-#if defined(CONFIG_SAMA5_AT25_FTL) && defined(CONFIG_SAMA5_AT25_NXFFS)
-# warning Both CONFIG_SAMA5_AT25_FTL and CONFIG_SAMA5_AT25_NXFFS are set
-# warning Ignoring CONFIG_SAMA5_AT25_NXFFS
-# undef CONFIG_SAMA5_AT25_NXFFS
-#endif
-
/****************************************************************************
* Public Functions
****************************************************************************/
@@ -102,10 +74,8 @@
*
****************************************************************************/
-#ifdef CONFIG_MTD_AT25
int sam_at25_initialize(int minor)
{
-#ifdef HAVE_AT25
FAR struct spi_dev_s *spi;
FAR struct mtd_dev_s *mtd;
int ret;
@@ -158,9 +128,8 @@ int sam_at25_initialize(int minor)
}
#endif
-#endif
return OK;
}
-#endif
+#endif /* HAVE_AT25_MTD */