mirror of
https://github.com/eclipse-threadx/levelx.git
synced 2026-09-14 04:06:00 +08:00
Update on 30 Nov 2023. Expand to see details.
dd0abfd Fix sequential checking logic 6d0382a Add configuration checks
This commit is contained in:
+17
-1
@@ -26,7 +26,7 @@
|
|||||||
/* APPLICATION INTERFACE DEFINITION RELEASE */
|
/* APPLICATION INTERFACE DEFINITION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* lx_api.h PORTABLE C */
|
/* lx_api.h PORTABLE C */
|
||||||
/* 6.3.0 */
|
/* 6.x */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -86,6 +86,9 @@
|
|||||||
/* bitmap and obsolete count */
|
/* bitmap and obsolete count */
|
||||||
/* cache for NOR flash, */
|
/* cache for NOR flash, */
|
||||||
/* resulting in version 6.3.0 */
|
/* resulting in version 6.3.0 */
|
||||||
|
/* xx-xx-xxxx Xiuwen Cai Modified comment(s), */
|
||||||
|
/* added configuration checks, */
|
||||||
|
/* resulting in version 6.x */
|
||||||
/* */
|
/* */
|
||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
|
|
||||||
@@ -279,6 +282,19 @@ typedef unsigned long long ULONG64;
|
|||||||
#define LX_NOR_PHYSICAL_SECTOR_FREE 0xFFFFFFFF
|
#define LX_NOR_PHYSICAL_SECTOR_FREE 0xFFFFFFFF
|
||||||
|
|
||||||
|
|
||||||
|
/* Check extended cache configurations. */
|
||||||
|
#ifdef LX_NOR_DISABLE_EXTENDED_CACHE
|
||||||
|
|
||||||
|
#ifdef LX_NOR_ENABLE_MAPPING_BITMAP
|
||||||
|
#error "To enable mapping bitmap, you need to undefine LX_NOR_DISABLE_EXTENDED_CACHE."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef LX_NOR_ENABLE_OBSOLETE_COUNT_CACHE
|
||||||
|
#error "To enable obsolete count cache, you need to undefine LX_NOR_DISABLE_EXTENDED_CACHE."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define NAND flash constants. */
|
/* Define NAND flash constants. */
|
||||||
|
|
||||||
#define LX_NAND_GOOD_BLOCK 0xFF
|
#define LX_NAND_GOOD_BLOCK 0xFF
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_data_page_copy PORTABLE C */
|
/* _lx_nand_flash_data_page_copy PORTABLE C */
|
||||||
/* 6.2.1 */
|
/* 6.x */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* Xiuwen Cai, Microsoft Corporation */
|
/* Xiuwen Cai, Microsoft Corporation */
|
||||||
@@ -79,6 +79,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 03-08-2023 Xiuwen Cai Initial Version 6.2.1 */
|
/* 03-08-2023 Xiuwen Cai Initial Version 6.2.1 */
|
||||||
|
/* xx-xx-xxxx Xiuwen Cai Modified comment(s), */
|
||||||
|
/* fixed sequential checking */
|
||||||
|
/* logic, */
|
||||||
|
/* resulting in version 6.x */
|
||||||
/* */
|
/* */
|
||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
UINT _lx_nand_flash_data_page_copy(LX_NAND_FLASH* nand_flash, ULONG logical_sector, ULONG source_block, USHORT src_block_status,
|
UINT _lx_nand_flash_data_page_copy(LX_NAND_FLASH* nand_flash, ULONG logical_sector, ULONG source_block, USHORT src_block_status,
|
||||||
@@ -168,7 +172,7 @@ ULONG number_of_pages;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Check if the pages in destination block is still sequential. */
|
/* Check if the pages in destination block is still sequential. */
|
||||||
if ((destination_page) != (logical_sector + i % nand_flash -> lx_nand_flash_pages_per_block))
|
if (destination_page != ((logical_sector + i) % nand_flash -> lx_nand_flash_pages_per_block))
|
||||||
{
|
{
|
||||||
/* Mark the block status as non sequential. */
|
/* Mark the block status as non sequential. */
|
||||||
dest_block_status |= LX_NAND_BLOCK_STATUS_NON_SEQUENTIAL;
|
dest_block_status |= LX_NAND_BLOCK_STATUS_NON_SEQUENTIAL;
|
||||||
|
|||||||
Reference in New Issue
Block a user