summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nuttx/drivers/mtd/ramtron.c26
-rw-r--r--nuttx/include/nuttx/fs/ioctl.h10
-rw-r--r--nuttx/include/nuttx/mtd/mtd.h14
3 files changed, 32 insertions, 18 deletions
diff --git a/nuttx/drivers/mtd/ramtron.c b/nuttx/drivers/mtd/ramtron.c
index 6f287b74e..03e2b2b35 100644
--- a/nuttx/drivers/mtd/ramtron.c
+++ b/nuttx/drivers/mtd/ramtron.c
@@ -41,11 +41,11 @@
* must be enabled with the CONFIG_RAMTRON_FRAM_NON_JEDEC=y
*
* NOTE:
- * - frequency is fixed to desired max by RAMTRON_INIT_CLK_MAX
- * if new devices with different speed arrive, then SETFREQUENCY()
- * needs to handle freq changes and INIT_CLK_MAX must be reduced
- * to fit all devices. Note that STM32_SPI driver is prone to
- * too high freq. parameters and limit it within physical constraints.
+ * - frequency is fixed to desired max by RAMTRON_INIT_CLK_MAX if new devices with
+ * different speed arrive, use the table to handle freq change and to fit all
+ * devices. Note that STM32_SPI driver is prone to too high freq. parameters and
+ * limit it within physical constraints. The speed may be changed through ioctl
+ * MTDIOC_SETSPEED
*
* TODO:
* - add support for sleep
@@ -176,7 +176,7 @@ static const struct ramtron_parts_s g_ramtron_parts[] =
0x00, /* id2 */
16L*1024L, /* size */
2, /* addr_len */
- 40000000 /* speed */
+ RAMTRON_INIT_CLK_MAX /* speed */
},
{
"FM25V02", /* name */
@@ -184,7 +184,7 @@ static const struct ramtron_parts_s g_ramtron_parts[] =
0x00, /* id2 */
32L*1024L, /* size */
2, /* addr_len */
- 40000000 /* speed */
+ RAMTRON_INIT_CLK_MAX /* speed */
},
{
"FM25VN02", /* name */
@@ -192,7 +192,7 @@ static const struct ramtron_parts_s g_ramtron_parts[] =
0x01, /* id2 */
32L*1024L, /* size */
2, /* addr_len */
- 40000000 /* speed */
+ RAMTRON_INIT_CLK_MAX /* speed */
},
{
"FM25V05", /* name */
@@ -200,7 +200,7 @@ static const struct ramtron_parts_s g_ramtron_parts[] =
0x00, /* id2 */
64L*1024L, /* size */
2, /* addr_len */
- 40000000 /* speed */
+ RAMTRON_INIT_CLK_MAX /* speed */
},
{
"FM25VN05", /* name */
@@ -208,7 +208,7 @@ static const struct ramtron_parts_s g_ramtron_parts[] =
0x01, /* id2 */
64L*1024L, /* size */
2, /* addr_len */
- 40000000 /* speed */
+ RAMTRON_INIT_CLK_MAX /* speed */
},
{
"FM25V10", /* name */
@@ -216,7 +216,7 @@ static const struct ramtron_parts_s g_ramtron_parts[] =
0x00, /* id2 */
128L*1024L, /* size */
3, /* addr_len */
- 40000000 /* speed */
+ RAMTRON_INIT_CLK_MAX /* speed */
},
{
"FM25VN10", /* name */
@@ -224,7 +224,7 @@ static const struct ramtron_parts_s g_ramtron_parts[] =
0x01, /* id2 */
128L*1024L, /* size */
3, /* addr_len */
- 40000000 /* speed */
+ RAMTRON_INIT_CLK_MAX /* speed */
},
{
"MB85RS1MT", /* name */
@@ -241,7 +241,7 @@ static const struct ramtron_parts_s g_ramtron_parts[] =
0xff, /* id2 */
256L*1024L, /* size */
3, /* addr_len */
- 40000000 /* speed */
+ RAMTRON_INIT_CLK_MAX /* speed */
},
{
NULL, /* name */
diff --git a/nuttx/include/nuttx/fs/ioctl.h b/nuttx/include/nuttx/fs/ioctl.h
index 43a88c673..fc904495f 100644
--- a/nuttx/include/nuttx/fs/ioctl.h
+++ b/nuttx/include/nuttx/fs/ioctl.h
@@ -47,7 +47,7 @@
****************************************************************************/
/* General ioctl definitions ************************************************/
/* Each NuttX ioctl commands are uint16_t's consisting of an 8-bit type
- * identifier and an 8-bit command number. All comman type identifiers are
+ * identifier and an 8-bit command number. All command type identifiers are
* defined below:
*/
@@ -102,7 +102,7 @@
#define _FIOC(nr) _IOC(_FIOCBASE,nr)
#define FIOC_MMAP _FIOC(0x0001) /* IN: Location to return address (void **)
- * OUT: If media is directly acccesible,
+ * OUT: If media is directly accessible,
* return (void*) base address
* of file
*/
@@ -152,7 +152,7 @@
#define BIOC_XIPBASE _BIOC(0x0001) /* Perform mapping to random access memory.
* IN: Pointer to pointer to void in
* which to received the XIP base.
- * OUT: If media is directly acccesible,
+ * OUT: If media is directly accessible,
* return (void*) base address
* of device memory */
#define BIOC_PROBE _BIOC(0x0002) /* Re-probe and interface; check for media
@@ -189,7 +189,7 @@
* OUT: Number of bytes read or error */
#define BIOC_WRITESECT _BIOC(0x0009) /* Write to data to a logical sector
* IN: Pointer to sector write data (the
- * logical secor number and write
+ * logical sector number and write
* buffer address
* OUT: None (ioctl return value provides
* success/failure indication). */
@@ -219,7 +219,7 @@
* with data for the MTD */
#define MTDIOC_XIPBASE _MTDIOC(0x0002) /* IN: Pointer to pointer to void in
* which to received the XIP base.
- * OUT: If media is directly acccesible,
+ * OUT: If media is directly accessible,
* return (void*) base address
* of device memory */
#define MTDIOC_BULKERASE _MTDIOC(0x0003) /* IN: None
diff --git a/nuttx/include/nuttx/mtd/mtd.h b/nuttx/include/nuttx/mtd/mtd.h
index eeb6013c2..4db86a057 100644
--- a/nuttx/include/nuttx/mtd/mtd.h
+++ b/nuttx/include/nuttx/mtd/mtd.h
@@ -370,6 +370,20 @@ FAR struct mtd_dev_s *m25p_initialize(FAR struct spi_dev_s *dev);
FAR struct mtd_dev_s *rammtd_initialize(FAR uint8_t *start, size_t size);
/****************************************************************************
+ * Name: ramtron_initialize
+ *
+ * Description:
+ * Create and initialize a Ramtron MTD device instance.
+ *
+ * Input Parameters:
+ * start - Address of the beginning of the allocated RAM regions.
+ * size - The size in bytes of the allocated RAM region.
+ *
+ ****************************************************************************/
+
+FAR struct mtd_dev_s *ramtron_initialize(FAR struct spi_dev_s *dev);
+
+/****************************************************************************
* Name: sst25_initialize
*
* Description: