SAMV71-XULT: Add logic to initialize the ST24FL1 QuadSPI FLASH
This commit is contained in:
parent
00f8521e57
commit
34cb87bfd0
@ -55,6 +55,12 @@
|
||||
|
||||
#include "samv71-xult.h"
|
||||
|
||||
#ifdef HAVE_ST25FL1
|
||||
#include <nuttx/spi/qspi.h>
|
||||
#include <nuttx/mtd/mtd.h>
|
||||
#include "sam_qspi.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ROMFS
|
||||
# include <arch/board/boot_romfsimg.h>
|
||||
#endif
|
||||
@ -89,6 +95,10 @@
|
||||
|
||||
int sam_bringup(void)
|
||||
{
|
||||
#ifdef HAVE_ST25FL1
|
||||
FAR struct qspi_dev_s *qspi;
|
||||
FAR struct mtd_dev_s *mtd;
|
||||
#endif
|
||||
int ret;
|
||||
|
||||
#ifdef HAVE_MACADDR
|
||||
@ -178,6 +188,31 @@ int sam_bringup(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ST25FL1
|
||||
/* Create an instance of the SAMV71 QSPI device driver */
|
||||
|
||||
qspi = sam_qspi_initialize(0);
|
||||
if (!qspi)
|
||||
{
|
||||
SYSLOG("ERROR: sam_qspi_initialize failed\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Use the QSPI device instance to initialize the
|
||||
* ST25FL1 device.
|
||||
*/
|
||||
|
||||
mtd = st25fl1_initialize(qspi);
|
||||
if (!mtd)
|
||||
{
|
||||
SYSLOG("ERROR: st25fl1_initialize failed\n");
|
||||
}
|
||||
|
||||
/* And now do what with the ST25FL1 MTD device? */
|
||||
#warning Missing Logic
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_USBHOST
|
||||
/* Initialize USB host operation. sam_usbhost_initialize() starts a thread
|
||||
* will monitor for USB connection and disconnection events.
|
||||
|
@ -61,6 +61,7 @@
|
||||
#define HAVE_NETWORK 1
|
||||
#define HAVE_MACADDR 1
|
||||
#define HAVE_MTDCONFIG 1
|
||||
#define HAVE_ST25FL1 1
|
||||
#define HAVE_WM8904 1
|
||||
#define HAVE_AUDIO_NULL 1
|
||||
|
||||
@ -181,6 +182,16 @@
|
||||
# undef HAVE_MTDCONFIG
|
||||
#endif
|
||||
|
||||
/* ST25FL1 QuadSPI FLASH */
|
||||
|
||||
#ifndef CONFIG_MTD_ST25FL1
|
||||
# undef HAVE_ST25FL1
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_SAMV7_QSPI
|
||||
# undef HAVE_ST25FL1
|
||||
#endif
|
||||
|
||||
/* Audio */
|
||||
/* PCM/WM8904 driver */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user