X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Fnand.h;h=7d529f1ccc0a918694f687dd55d3de48520fafec;hb=68df9972522265438741cc7bfb1d6963037f9644;hp=5514c9e53088b75e0d6708bc05b4b453a1016360;hpb=f7cc53cc27bb3663540169dc8d176d393e3709c3;p=bertos.git diff --git a/bertos/drv/nand.h b/bertos/drv/nand.h index 5514c9e5..7d529f1c 100644 --- a/bertos/drv/nand.h +++ b/bertos/drv/nand.h @@ -29,7 +29,7 @@ * Copyright 2011 Develer S.r.l. (http://www.develer.com/) * --> * -* \brief NAND driver +* \brief ONFI 1.0 compliant NAND kblock driver * * \author Stefano Fedrigo * @@ -42,7 +42,6 @@ #define DRV_NAND_H #include "cfg/cfg_nand.h" -#include #include @@ -61,12 +60,6 @@ #define NAND_ERR_ECC BV(5) ///< Unrecoverable ECC error /** \} */ -#define NAND_PAGE_SIZE (CONFIG_NAND_DATA_SIZE + CONFIG_NAND_SPARE_SIZE) -#define NAND_BLOCK_SIZE (CONFIG_NAND_DATA_SIZE * CONFIG_NAND_PAGES_PER_BLOCK) - -// Number of usable blocks, and index of first remapping block -#define NAND_NUM_USER_BLOCKS (CONFIG_NAND_NUM_BLOCK - CONFIG_NAND_NUM_REMAP_BLOCKS) - // NAND commands #define NAND_CMD_READ_1 0x00 @@ -87,14 +80,6 @@ #define NAND_CMD_RESET 0xFF -// Get block from page -#define PAGE(blk) ((blk) * CONFIG_NAND_PAGES_PER_BLOCK) - -// Page from block and page in block -#define BLOCK(page) ((uint16_t)((page) / CONFIG_NAND_PAGES_PER_BLOCK)) -#define PAGE_IN_BLOCK(page) ((uint16_t)((page) % CONFIG_NAND_PAGES_PER_BLOCK)) - - /** * NAND context. */