summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/arm/lpc32xx/include/nand-mlc.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2011-03-28 09:00:01 +0000
committerSebastian Huber <sebastian.huber@embedded-brains.de>2011-03-28 09:00:01 +0000
commitf4371073f279beafdee65329ae910e4b87469cf3 (patch)
tree5bc9f1bc8e3e4016f7413ec51069ad27d4e6b055 /c/src/lib/libbsp/arm/lpc32xx/include/nand-mlc.h
parent2011-03-29 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff)
downloadrtems-f4371073f279beafdee65329ae910e4b87469cf3.tar.bz2
2011-03-29 Sebastian Huber <sebastian.huber@embedded-brains.de>
* configure.ac, include/bspopts.h.in: New BSP option LPC32XX_SCRATCH_AREA_SIZE. Disable BSP option LPC32XX_DISABLE_READ_ONLY_PROTECTION for all BSPs. * include/boot.h: Removed application specific defines. * include/nand-mlc.h, misc/nand-mlc.c: Changed configuration layout. * include/mmu.h, misc/mmu.c: Documentation. Bugfix. * include/bsp.h, startup/bspstarthooks.c, misc/restart.c, startup/linkcmds.lpc32xx_mzx, startup/linkcmds.lpc32xx_mzx_stage_1, startup/linkcmds.lpc32xx_mzx_stage_2, startup/linkcmds.lpc32xx_phycore: Support for scratch area. Moved code into macros for reusability.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/arm/lpc32xx/include/nand-mlc.h34
1 files changed, 18 insertions, 16 deletions
diff --git a/c/src/lib/libbsp/arm/lpc32xx/include/nand-mlc.h b/c/src/lib/libbsp/arm/lpc32xx/include/nand-mlc.h
index b783e08736..4e70345716 100644
--- a/c/src/lib/libbsp/arm/lpc32xx/include/nand-mlc.h
+++ b/c/src/lib/libbsp/arm/lpc32xx/include/nand-mlc.h
@@ -181,22 +181,7 @@ extern "C" {
* @brief MLC NAND controller configuration.
*/
typedef struct {
- /**
- * @brief Selects small pages (512 Bytes user data and 16 Bytes spare data)
- * or large pages (2048 Bytes user data and 64 Bytes spare data).
- */
- bool small_pages;
-
- /**
- * @brief Selects 3/4 address cycles for small pages/large pages or 4/5
- * address cycles.
- */
- bool many_address_cycles;
-
- /**
- * @brief Selects 64 or 128 pages per block in case of large pages.
- */
- bool normal_blocks;
+ uint32_t flags;
uint32_t block_count;
@@ -207,6 +192,23 @@ typedef struct {
} lpc32xx_mlc_config;
/**
+ * @brief Selects small pages (512 Bytes user data and 16 Bytes spare data)
+ * or large pages (2048 Bytes user data and 64 Bytes spare data).
+ */
+#define MLC_SMALL_PAGES 0x1U
+
+/**
+ * @Brief Selects 3/4 address cycles for small pages/large pages or 4/5
+ * address cycles.
+ */
+#define MLC_MANY_ADDRESS_CYCLES 0x2U
+
+/**
+ * @brief Selects 64 or 128 pages per block in case of large pages.
+ */
+#define MLC_NORMAL_BLOCKS 0x4U
+
+/**
* @brief Initializes the MLC NAND controller according to @a cfg.
*/
void lpc32xx_mlc_init(const lpc32xx_mlc_config *cfg);