Skip to content

Commit

Permalink
Release 6.2.1 on 08 Mar 2023. Expand to see details.
Browse files Browse the repository at this point in the history
075bb4c Update patch version.
a30e30b Update version and date for release.
a6b42b2 Update owners
6a3e60b Add user extension in flash control block
  • Loading branch information
xiuwencai committed Mar 8, 2023
1 parent 718fb51 commit a8bc412
Show file tree
Hide file tree
Showing 43 changed files with 457 additions and 102 deletions.
59 changes: 54 additions & 5 deletions common/inc/lx_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/* APPLICATION INTERFACE DEFINITION RELEASE */
/* */
/* lx_api.h PORTABLE C */
/* 6.x */
/* 6.2.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
Expand Down Expand Up @@ -75,9 +75,11 @@
/* 10-31-2022 Xiuwen Cai Modified comment(s), and */
/* updated product constants, */
/* resulting in version 6.2.0 */
/* xx-xx-xxxx Xiuwen Cai Modified comment(s), */
/* 03-08-2023 Xiuwen Cai Modified comment(s), */
/* modified NAND logic, */
/* resulting in version 6.x */
/* added new driver interface */
/* and user extension, */
/* resulting in version 6.2.1 */
/* */
/**************************************************************************/

Expand Down Expand Up @@ -190,7 +192,7 @@ typedef unsigned long long ULONG64;
#define AZURE_RTOS_LEVELX
#define LEVELX_MAJOR_VERSION 6
#define LEVELX_MINOR_VERSION 2
#define LEVELX_PATCH_VERSION 0
#define LEVELX_PATCH_VERSION 1


/* Define general LevelX Constants. */
Expand Down Expand Up @@ -385,6 +387,14 @@ typedef struct LX_NAND_DEVICE_INFO_STRUCT
ULONG lx_nand_device_info_base_erase_count;
} LX_NAND_DEVICE_INFO;


/* Determine if the flash control block has an extension defined. If not,
define the extension to whitespace. */

#ifndef LX_NAND_FLASH_USER_EXTENSION
#define LX_NAND_FLASH_USER_EXTENSION
#endif

/* Define the NAND flash control block structure. */

typedef struct LX_NAND_FLASH_STRUCT
Expand Down Expand Up @@ -454,6 +464,22 @@ typedef struct LX_NAND_FLASH_STRUCT
ULONG lx_nand_flash_diagnostic_block_erased_verifies;
ULONG lx_nand_flash_diagnostic_page_erased_verifies;

#ifdef LX_NAND_ENABLE_CONTROL_BLOCK_FOR_DRIVER_INTERFACE
UINT (*lx_nand_flash_driver_read)(struct LX_NAND_FLASH_STRUCT *nand_flash, ULONG block, ULONG page, ULONG *destination, ULONG words);
UINT (*lx_nand_flash_driver_write)(struct LX_NAND_FLASH_STRUCT *nand_flash, ULONG block, ULONG page, ULONG *source, ULONG words);
UINT (*lx_nand_flash_driver_block_erase)(struct LX_NAND_FLASH_STRUCT *nand_flash, ULONG block, ULONG erase_count);
UINT (*lx_nand_flash_driver_block_erased_verify)(struct LX_NAND_FLASH_STRUCT *nand_flash, ULONG block);
UINT (*lx_nand_flash_driver_page_erased_verify)(struct LX_NAND_FLASH_STRUCT *nand_flash, ULONG block, ULONG page);
UINT (*lx_nand_flash_driver_block_status_get)(struct LX_NAND_FLASH_STRUCT *nand_flash, ULONG block, UCHAR *bad_block_flag);
UINT (*lx_nand_flash_driver_block_status_set)(struct LX_NAND_FLASH_STRUCT *nand_flash, ULONG block, UCHAR bad_block_flag);
UINT (*lx_nand_flash_driver_extra_bytes_get)(struct LX_NAND_FLASH_STRUCT *nand_flash, ULONG block, ULONG page, UCHAR *destination, UINT size);
UINT (*lx_nand_flash_driver_extra_bytes_set)(struct LX_NAND_FLASH_STRUCT *nand_flash, ULONG block, ULONG page, UCHAR *source, UINT size);
UINT (*lx_nand_flash_driver_system_error)(struct LX_NAND_FLASH_STRUCT *nand_flash, UINT error_code, ULONG block, ULONG page);

UINT (*lx_nand_flash_driver_pages_read)(struct LX_NAND_FLASH_STRUCT *nand_flash, ULONG block, ULONG page, UCHAR* main_buffer, UCHAR* spare_buffer, ULONG pages);
UINT (*lx_nand_flash_driver_pages_write)(struct LX_NAND_FLASH_STRUCT *nand_flash, ULONG block, ULONG page, UCHAR* main_buffer, UCHAR* spare_buffer, ULONG pages);
UINT (*lx_nand_flash_driver_pages_copy)(struct LX_NAND_FLASH_STRUCT *nand_flash, ULONG source_block, ULONG source_page, ULONG destination_block, ULONG destination_page, ULONG pages, UCHAR* data_buffer);
#else
UINT (*lx_nand_flash_driver_read)(ULONG block, ULONG page, ULONG *destination, ULONG words);
UINT (*lx_nand_flash_driver_write)(ULONG block, ULONG page, ULONG *source, ULONG words);
UINT (*lx_nand_flash_driver_block_erase)(ULONG block, ULONG erase_count);
Expand All @@ -468,7 +494,7 @@ typedef struct LX_NAND_FLASH_STRUCT
UINT (*lx_nand_flash_driver_pages_read)(ULONG block, ULONG page, UCHAR* main_buffer, UCHAR* spare_buffer, ULONG pages);
UINT (*lx_nand_flash_driver_pages_write)(ULONG block, ULONG page, UCHAR* main_buffer, UCHAR* spare_buffer, ULONG pages);
UINT (*lx_nand_flash_driver_pages_copy)(ULONG source_block, ULONG source_page, ULONG destination_block, ULONG destination_page, ULONG pages, UCHAR* data_buffer);

#endif
UCHAR *lx_nand_flash_page_buffer;
UINT lx_nand_flash_page_buffer_size;

Expand All @@ -483,6 +509,10 @@ typedef struct LX_NAND_FLASH_STRUCT
/* Define the NAND flash control block open next/previous pointers. */
struct LX_NAND_FLASH_STRUCT *lx_nand_flash_open_next,
*lx_nand_flash_open_previous;

/* Define the user extension in the flash control block. This
is typically defined in lx_user.h. */
LX_NAND_FLASH_USER_EXTENSION

} LX_NAND_FLASH;

Expand All @@ -508,6 +538,13 @@ typedef struct LX_NOR_FLASH_EXTENDED_CACHE_ENTRY_STRUCT
} LX_NOR_FLASH_EXTENDED_CACHE_ENTRY;


/* Determine if the flash control block has an extension defined. If not,
define the extension to whitespace. */

#ifndef LX_NOR_FLASH_USER_EXTENSION
#define LX_NOR_FLASH_USER_EXTENSION
#endif

/* Define the NOR flash control block structure. */

typedef struct LX_NOR_FLASH_STRUCT
Expand Down Expand Up @@ -553,11 +590,19 @@ typedef struct LX_NOR_FLASH_STRUCT
ULONG lx_nor_flash_diagnostic_sector_not_free;
ULONG lx_nor_flash_diagnostic_sector_data_not_free;

#ifdef LX_NOR_ENABLE_CONTROL_BLOCK_FOR_DRIVER_INTERFACE
UINT (*lx_nor_flash_driver_read)(struct LX_NOR_FLASH_STRUCT *nor_flash, ULONG *flash_address, ULONG *destination, ULONG words);
UINT (*lx_nor_flash_driver_write)(struct LX_NOR_FLASH_STRUCT *nor_flash, ULONG *flash_address, ULONG *source, ULONG words);
UINT (*lx_nor_flash_driver_block_erase)(struct LX_NOR_FLASH_STRUCT *nor_flash, ULONG block, ULONG erase_count);
UINT (*lx_nor_flash_driver_block_erased_verify)(struct LX_NOR_FLASH_STRUCT *nor_flash, ULONG block);
UINT (*lx_nor_flash_driver_system_error)(struct LX_NOR_FLASH_STRUCT *nor_flash, UINT error_code);
#else
UINT (*lx_nor_flash_driver_read)(ULONG *flash_address, ULONG *destination, ULONG words);
UINT (*lx_nor_flash_driver_write)(ULONG *flash_address, ULONG *source, ULONG words);
UINT (*lx_nor_flash_driver_block_erase)(ULONG block, ULONG erase_count);
UINT (*lx_nor_flash_driver_block_erased_verify)(ULONG block);
UINT (*lx_nor_flash_driver_system_error)(UINT error_code);
#endif

ULONG *lx_nor_flash_sector_buffer;
UINT lx_nor_flash_sector_mapping_cache_enabled;
Expand Down Expand Up @@ -585,6 +630,10 @@ typedef struct LX_NOR_FLASH_STRUCT
struct LX_NOR_FLASH_STRUCT *lx_nor_flash_open_next,
*lx_nor_flash_open_previous;

/* Define the user extension in the flash control block. This
is typically defined in lx_user.h. */
LX_NOR_FLASH_USER_EXTENSION

} LX_NOR_FLASH;


Expand Down
14 changes: 11 additions & 3 deletions common/inc/lx_user_sample.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/* PORT SPECIFIC C INFORMATION RELEASE */
/* */
/* lx_user.h PORTABLE C */
/* 6.x */
/* 6.2.1 */
/* */
/* AUTHOR */
/* */
Expand All @@ -48,9 +48,9 @@
/* 06-02-2021 Bhupendra Naphade Modified comment(s), and */
/* added standalone support, */
/* resulting in version 6.1.7 */
/* xx-xx-xxxx Xiuwen Cai Modified comment(s), and */
/* 03-08-2023 Xiuwen Cai Modified comment(s), and */
/* added new NAND options, */
/* resulting in version 6.x */
/* resulting in version 6.2.1 */
/* */
/**************************************************************************/

Expand Down Expand Up @@ -113,7 +113,15 @@

/* #define LX_STANDALONE_ENABLE */

/* Define user extension for NOR flash control block. */
/*
#define LX_NOR_FLASH_USER_EXTENSION ????
*/

/* Define user extension for NAND flash control block. */
/*
#define LX_NAND_FLASH_USER_EXTENSION ????
*/

#endif

6 changes: 3 additions & 3 deletions common/src/fx_nand_flash_simulated_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ VOID _fx_nand_flash_simulator_driver(FX_MEDIA *media_ptr);
/* FUNCTION RELEASE */
/* */
/* _fx_nand_simulator_driver PORTABLE C */
/* 6.x */
/* 6.2.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
Expand Down Expand Up @@ -126,9 +126,9 @@ VOID _fx_nand_flash_simulator_driver(FX_MEDIA *media_ptr);
/* resulting in version 6.1 */
/* 06-02-2021 Bhupendra Naphade Modified comment(s), */
/* resulting in version 6.1.7 */
/* xx-xx-xxxx Xiuwen Cai Modified comment(s), */
/* 03-08-2023 Xiuwen Cai Modified comment(s), */
/* changed to use new API, */
/* resulting in version 6.x */
/* resulting in version 6.2.1 */
/* */
/**************************************************************************/
VOID _fx_nand_flash_simulator_driver(FX_MEDIA *media_ptr)
Expand Down
6 changes: 3 additions & 3 deletions common/src/lx_nand_flash_256byte_ecc_compute.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
/* FUNCTION RELEASE */
/* */
/* _lx_nand_flash_256byte_ecc_compute PORTABLE C */
/* 6.x */
/* 6.2.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
Expand Down Expand Up @@ -77,9 +77,9 @@
/* resulting in version 6.1 */
/* 06-02-2021 Bhupendra Naphade Modified comment(s), */
/* resulting in version 6.1.7 */
/* xx-xx-xxxx Xiuwen Cai Modified comment(s), */
/* 03-08-2023 Xiuwen Cai Modified comment(s), */
/* inverted output, */
/* resulting in version 6.x */
/* resulting in version 6.2.1 */
/* */
/**************************************************************************/
UINT _lx_nand_flash_256byte_ecc_compute(UCHAR *page_buffer, UCHAR *ecc_buffer)
Expand Down
4 changes: 2 additions & 2 deletions common/src/lx_nand_flash_block_allocate.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
/* FUNCTION RELEASE */
/* */
/* _lx_nand_flash_block_allocate PORTABLE C */
/* 6.x */
/* 6.2.1 */
/* AUTHOR */
/* */
/* Xiuwen Cai, Microsoft Corporation */
Expand Down Expand Up @@ -70,7 +70,7 @@
/* */
/* DATE NAME DESCRIPTION */
/* */
/* xx-xx-xxxx Xiuwen Cai Initial Version 6.x */
/* 03-08-2023 Xiuwen Cai Initial Version 6.2.1 */
/* */
/**************************************************************************/
UINT _lx_nand_flash_block_allocate(LX_NAND_FLASH* nand_flash, ULONG* block)
Expand Down
4 changes: 2 additions & 2 deletions common/src/lx_nand_flash_block_data_move.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
/* FUNCTION RELEASE */
/* */
/* _lx_nand_flash_block_data_move PORTABLE C */
/* 6.x */
/* 6.2.1 */
/* AUTHOR */
/* */
/* Xiuwen Cai, Microsoft Corporation */
Expand Down Expand Up @@ -83,7 +83,7 @@
/* */
/* DATE NAME DESCRIPTION */
/* */
/* xx-xx-xxxx Xiuwen Cai Initial Version 6.x */
/* 03-08-2023 Xiuwen Cai Initial Version 6.2.1 */
/* */
/**************************************************************************/
UINT _lx_nand_flash_block_data_move(LX_NAND_FLASH *nand_flash, ULONG new_block)
Expand Down
4 changes: 2 additions & 2 deletions common/src/lx_nand_flash_block_find.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
/* FUNCTION RELEASE */
/* */
/* _lx_nand_flash_block_find PORTABLE C */
/* 6.x */
/* 6.2.1 */
/* AUTHOR */
/* */
/* Xiuwen Cai, Microsoft Corporation */
Expand Down Expand Up @@ -77,7 +77,7 @@
/* */
/* DATE NAME DESCRIPTION */
/* */
/* xx-xx-xxxx Xiuwen Cai Initial Version 6.x */
/* 03-08-2023 Xiuwen Cai Initial Version 6.2.1 */
/* */
/**************************************************************************/
UINT _lx_nand_flash_block_find(LX_NAND_FLASH *nand_flash, ULONG logical_sector, ULONG *block, USHORT *block_status)
Expand Down
4 changes: 2 additions & 2 deletions common/src/lx_nand_flash_block_mapping_set.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
/* FUNCTION RELEASE */
/* */
/* _lx_nand_flash_block_mapping_set PORTABLE C */
/* 6.x */
/* 6.2.1 */
/* AUTHOR */
/* */
/* Xiuwen Cai, Microsoft Corporation */
Expand Down Expand Up @@ -71,7 +71,7 @@
/* */
/* DATE NAME DESCRIPTION */
/* */
/* xx-xx-xxxx Xiuwen Cai Initial Version 6.x */
/* 03-08-2023 Xiuwen Cai Initial Version 6.2.1 */
/* */
/**************************************************************************/
UINT _lx_nand_flash_block_mapping_set(LX_NAND_FLASH *nand_flash, ULONG logical_sector, ULONG block)
Expand Down
4 changes: 2 additions & 2 deletions common/src/lx_nand_flash_block_status_set.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
/* FUNCTION RELEASE */
/* */
/* _lx_nand_flash_block_status_set PORTABLE C */
/* 6.x */
/* 6.2.1 */
/* AUTHOR */
/* */
/* Xiuwen Cai, Microsoft Corporation */
Expand Down Expand Up @@ -71,7 +71,7 @@
/* */
/* DATE NAME DESCRIPTION */
/* */
/* xx-xx-xxxx Xiuwen Cai Initial Version 6.x */
/* 03-08-2023 Xiuwen Cai Initial Version 6.2.1 */
/* */
/**************************************************************************/
UINT _lx_nand_flash_block_status_set(LX_NAND_FLASH *nand_flash, ULONG block, ULONG block_status)
Expand Down
Loading

0 comments on commit a8bc412

Please sign in to comment.