summaryrefslogtreecommitdiff
path: root/nuttx/drivers/mtd
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-09-10 23:07:04 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-09-10 23:07:04 +0000
commit856a5b5884da54160d386cc100a0ea762e5a4076 (patch)
treed47991bced229108ae342951e31fd2971799376b /nuttx/drivers/mtd
parent1adb6100a9921ce95d6f774af0281bca7680ff87 (diff)
downloadpx4-nuttx-856a5b5884da54160d386cc100a0ea762e5a4076.tar.gz
px4-nuttx-856a5b5884da54160d386cc100a0ea762e5a4076.tar.bz2
px4-nuttx-856a5b5884da54160d386cc100a0ea762e5a4076.zip
Fix typos in comments
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2936 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers/mtd')
-rw-r--r--nuttx/drivers/mtd/m25px.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/nuttx/drivers/mtd/m25px.c b/nuttx/drivers/mtd/m25px.c
index dac67b937..18b9aea02 100644
--- a/nuttx/drivers/mtd/m25px.c
+++ b/nuttx/drivers/mtd/m25px.c
@@ -1,8 +1,8 @@
/************************************************************************************
* drivers/mtd/m25px.c
- * Driver for SPI-based M25P64 (64Mbit) and M25P128 (128Mbit) FLASH
+ * Driver for SPI-based M25P1 (128Kbit), M25P64 (64Mbit), and M25P128 (128Mbit) FLASH
*
- * Copyright (C) 2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -63,7 +63,7 @@
#define M25P_M25P64_CAPACITY 0x17 /* 64 M-bit */
#define M25P_M25P128_CAPACITY 0x18 /* 128 M-bit */
-/* M25P1 capapcity is 131,072 bytes:
+/* M25P1 capacity is 131,072 bytes:
* (4 sectors) * (32,768 bytes per sector)
* (512 pages) * (256 bytes per page)
*/
@@ -73,7 +73,7 @@
#define M25P_M25P1_PAGE_SHIFT 8 /* Page size 1 << 8 = 256 */
#define M25P_M25P1_NPAGES 512
-/* M25P64 capapcity is 8,338,608 bytes:
+/* M25P64 capacity is 8,338,608 bytes:
* (128 sectors) * (65,536 bytes per sector)
* (32768 pages) * (256 bytes per page)
*/
@@ -83,7 +83,7 @@
#define M25P_M25P64_PAGE_SHIFT 8 /* Page size 1 << 8 = 256 */
#define M25P_M25P64_NPAGES 32768
-/* M25P64 capapcity is 16,777,216 bytes:
+/* M25P128 capacity is 16,777,216 bytes:
* (64 sectors) * (262,144 bytes per sector)
* (65536 pages) * (256 bytes per page)
*/
@@ -277,6 +277,8 @@ static inline int m25p_readid(struct m25p_dev_s *priv)
}
else if (capacity == M25P_M25P128_CAPACITY)
{
+ /* Save the FLASH geometry */
+
priv->sectorshift = M25P_M25P128_SECTOR_SHIFT;
priv->nsectors = M25P_M25P128_NSECTORS;
priv->pageshift = M25P_M25P128_PAGE_SHIFT;