More RAMTRON related fixes from David Sidrane

This commit is contained in:
Gregory Nutt 2014-12-26 08:15:59 -06:00
parent 996d6c9d55
commit 6daa9468f6
3 changed files with 32 additions and 18 deletions

View File

@ -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 */

View File

@ -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

View File

@ -369,6 +369,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
*