diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-08-05 08:24:39 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-08-05 08:24:39 -0600 |
commit | 77df6ac2d504fc42d3e1def268cbaa551dcf64fa (patch) | |
tree | 69ef6565b5ce0d4ebf4ab2a4544e52947c9c7182 /nuttx/drivers/mtd | |
parent | 47683aa2a4086083916c2ae55ed25bed3c72188a (diff) | |
download | px4-nuttx-77df6ac2d504fc42d3e1def268cbaa551dcf64fa.tar.gz px4-nuttx-77df6ac2d504fc42d3e1def268cbaa551dcf64fa.tar.bz2 px4-nuttx-77df6ac2d504fc42d3e1def268cbaa551dcf64fa.zip |
SAMA5: Add logic to auto-mount a file system on AT25 SPI FLASH for NSH
Diffstat (limited to 'nuttx/drivers/mtd')
-rw-r--r-- | nuttx/drivers/mtd/Kconfig | 8 | ||||
-rw-r--r-- | nuttx/drivers/mtd/at25.c | 7 |
2 files changed, 6 insertions, 9 deletions
diff --git a/nuttx/drivers/mtd/Kconfig b/nuttx/drivers/mtd/Kconfig index a68fcaaeb..01d488cd6 100644 --- a/nuttx/drivers/mtd/Kconfig +++ b/nuttx/drivers/mtd/Kconfig @@ -101,14 +101,6 @@ config AT25_SPIFREQUENCY int "AT25 SPI Frequency" default 20000000 -config AT25_READONLY - bool "AT25 Read-Only FLASH" - default n - -config AT25_SECTOR512 - bool "Simulate 512 byte Erase Blocks" - default n - endif config MTD_AT45DB diff --git a/nuttx/drivers/mtd/at25.c b/nuttx/drivers/mtd/at25.c index 465ea4425..914c08c1b 100644 --- a/nuttx/drivers/mtd/at25.c +++ b/nuttx/drivers/mtd/at25.c @@ -57,11 +57,16 @@ /************************************************************************************ * Pre-processor Definitions ************************************************************************************/ +/* Configuration ********************************************************************/ #ifndef CONFIG_AT25_SPIMODE # define CONFIG_AT25_SPIMODE SPIDEV_MODE0 #endif +#ifndef CONFIG_AT25_SPIFREQUENCY +# define CONFIG_AT25_SPIFREQUENCY 20000000 +#endif + /* AT25 Registers *******************************************************************/ /* Indentification register values */ @@ -180,7 +185,7 @@ static void at25_lock(FAR struct spi_dev_s *dev) SPI_SETMODE(dev, CONFIG_AT25_SPIMODE); SPI_SETBITS(dev, 8); - (void)SPI_SETFREQUENCY(dev, 20000000); + (void)SPI_SETFREQUENCY(dev, CONFIG_AT25_SPIFREQUENCY); } /************************************************************************************ |