From 2d842705523b63a0c4ea6b22c5a18a9bab0a8c7f Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 31 Aug 2015 09:25:14 -0600 Subject: [PATCH] ST25FL1: Correct some compile problems when file system debug is enabled --- arch | 2 +- configs | 2 +- drivers/mtd/st25fl1.c | 13 ++++++++----- include/nuttx/mtd/mtd.h | 12 ++++++++++++ 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/arch b/arch index e076ee09c2..eaba40bd73 160000 --- a/arch +++ b/arch @@ -1 +1 @@ -Subproject commit e076ee09c276733d56014afa87c19c077b8f9385 +Subproject commit eaba40bd7303c737a812e307e2b687cd473d90da diff --git a/configs b/configs index 0198c46e0b..08a06b5db2 160000 --- a/configs +++ b/configs @@ -1 +1 @@ -Subproject commit 0198c46e0bd38d2a7fada9e4a1ea445218284c61 +Subproject commit 08a06b5db223a973e8f25b092f787e27ccc7b400 diff --git a/drivers/mtd/st25fl1.c b/drivers/mtd/st25fl1.c index 1342235111..85cc495ae7 100644 --- a/drivers/mtd/st25fl1.c +++ b/drivers/mtd/st25fl1.c @@ -908,7 +908,7 @@ static int st25fl1_read_byte(FAR struct st25fl1_dev_s *priv, FAR uint8_t *buffer { struct qspi_meminfo_s meminfo; - fvdbg("address: %08lx nbytes: %d\n", (long)address, (int)nbytes); + fvdbg("address: %08lx nbytes: %d\n", (long)address, (int)buflen); #ifdef CONFIG_ST25FL1_SCRAMBLE meminfo.flags = QSPIMEM_READ | QSPIMEM_QUADIO | QSPIMEM_SCRAMBLE; @@ -977,7 +977,7 @@ static int st25fl1_write_page(struct st25fl1_dev_s *priv, FAR const uint8_t *buf if (ret < 0) { fdbg("ERROR: QSPI_MEMORY failed writing address=%06x\n", - address) + address); return ret; } @@ -1423,9 +1423,12 @@ static int st25fl1_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) * Name: st25fl1_initialize * * Description: - * Create an initialize MTD device instance. MTD devices are not registered - * in the file system, but are created as instances that can be bound to - * other functions (such as a block or character driver front end). + * Create an initialize MTD device instance for the QuadSPI-based ST24FL1 + * FLASH part. + * + * MTD devices are not registered in the file system, but are created as instances + * that can be bound to other functions (such as a block or character driver front + * end). * ************************************************************************************/ diff --git a/include/nuttx/mtd/mtd.h b/include/nuttx/mtd/mtd.h index b25f5585c0..976b47a367 100644 --- a/include/nuttx/mtd/mtd.h +++ b/include/nuttx/mtd/mtd.h @@ -474,6 +474,18 @@ FAR struct mtd_dev_s *sst39vf_initialize(void); FAR struct mtd_dev_s *w25_initialize(FAR struct spi_dev_s *dev); +/**************************************************************************** + * Name: st25fl1_initialize + * + * Description: + * Create an initialize MTD device instance for the QuadSPI-based ST24FL1 + * FLASH part. + * + ****************************************************************************/ + +struct qspi_dev_s; /* Forward reference */ +FAR struct mtd_dev_s *st25fl1_initialize(FAR struct qspi_dev_s *qspi); + /**************************************************************************** * Name: up_flashinitialize *