Home
last modified time | relevance | path

Searched refs:nand_flash (Results 1 – 25 of 38) sorted by relevance

12

/LevelX-v6.2.1/common/src/
Dlx_nand_flash_format.c93 UINT _lx_nand_flash_format(LX_NAND_FLASH* nand_flash, CHAR* name, in _lx_nand_flash_format() argument
106 LX_MEMSET(nand_flash, 0, sizeof(LX_NAND_FLASH)); in _lx_nand_flash_format()
109 (nand_driver_initialize)(nand_flash); in _lx_nand_flash_format()
112 …if (nand_flash -> lx_nand_flash_pages_per_block > LX_NAND_MAX_PAGE_PER_BLOCK || nand_flash -> lx_n… in _lx_nand_flash_format()
118 …if (nand_flash -> lx_nand_flash_driver_pages_read == LX_NULL || nand_flash -> lx_nand_flash_driver… in _lx_nand_flash_format()
124 if (nand_flash -> lx_nand_flash_spare_data1_length < sizeof(ULONG)) in _lx_nand_flash_format()
130nand_flash -> lx_nand_flash_words_per_page = (nand_flash -> lx_nand_flash_bytes_per_page / sizeof(… in _lx_nand_flash_format()
131nand_flash -> lx_nand_flash_words_per_block = (nand_flash -> lx_nand_flash_words_per_page * nand_f… in _lx_nand_flash_format()
134nand_flash -> lx_nand_flash_total_pages = nand_flash -> lx_nand_flash_total_blocks * nand_flash ->… in _lx_nand_flash_format()
137 status = _lx_nand_flash_memory_initialize(nand_flash, memory_ptr, memory_size); in _lx_nand_flash_format()
[all …]
Dlx_nand_flash_open.c91 UINT _lx_nand_flash_open(LX_NAND_FLASH *nand_flash, CHAR *name, UINT (*nand_driver_initialize)(LX… in _lx_nand_flash_open() argument
111 LX_MEMSET(nand_flash, 0, sizeof(LX_NAND_FLASH)); in _lx_nand_flash_open()
114 (nand_driver_initialize)(nand_flash); in _lx_nand_flash_open()
117 …if (nand_flash -> lx_nand_flash_pages_per_block > LX_NAND_MAX_PAGE_PER_BLOCK || nand_flash -> lx_n… in _lx_nand_flash_open()
125 …if (nand_flash -> lx_nand_flash_driver_pages_read == LX_NULL || nand_flash -> lx_nand_flash_driver… in _lx_nand_flash_open()
133 if (nand_flash -> lx_nand_flash_spare_data1_length < sizeof(ULONG)) in _lx_nand_flash_open()
141nand_flash -> lx_nand_flash_words_per_page = (nand_flash -> lx_nand_flash_bytes_per_page / sizeo… in _lx_nand_flash_open()
142nand_flash -> lx_nand_flash_words_per_block = (nand_flash -> lx_nand_flash_words_per_page * nand_… in _lx_nand_flash_open()
145nand_flash -> lx_nand_flash_total_pages = nand_flash -> lx_nand_flash_total_blocks * nand_flash in _lx_nand_flash_open()
148 status = _lx_nand_flash_memory_initialize(nand_flash, memory_ptr, memory_size); in _lx_nand_flash_open()
[all …]
Dlx_nand_flash_metadata_allocate.c84 UINT _lx_nand_flash_metadata_allocate(LX_NAND_FLASH *nand_flash) in _lx_nand_flash_metadata_allocate() argument
96 page = nand_flash -> lx_nand_flash_metadata_block_current_page; in _lx_nand_flash_metadata_allocate()
99 if (page < nand_flash -> lx_nand_flash_pages_per_block) in _lx_nand_flash_metadata_allocate()
107nand_flash -> lx_nand_flash_metadata_block_number_current = nand_flash -> lx_nand_flash_metadata_b… in _lx_nand_flash_metadata_allocate()
110 nand_flash -> lx_nand_flash_metadata_block_current_page = 0; in _lx_nand_flash_metadata_allocate()
113nand_flash -> lx_nand_flash_backup_metadata_block_number_current = nand_flash -> lx_nand_flash_bac… in _lx_nand_flash_metadata_allocate()
116 nand_flash -> lx_nand_flash_backup_metadata_block_current_page = 0; in _lx_nand_flash_metadata_allocate()
119 if (nand_flash -> lx_nand_flash_metadata_block_count == LX_NAND_FLASH_MAX_METADATA_BLOCKS) in _lx_nand_flash_metadata_allocate()
127nand_flash -> lx_nand_flash_block_status_table[nand_flash -> lx_nand_flash_metadata_block[j]] = LX… in _lx_nand_flash_metadata_allocate()
130nand_flash -> lx_nand_flash_block_status_table[nand_flash -> lx_nand_flash_backup_metadata_block[j… in _lx_nand_flash_metadata_allocate()
[all …]
Dlx_nand_flash_sector_release.c92 UINT _lx_nand_flash_sector_release(LX_NAND_FLASH *nand_flash, ULONG logical_sector) in _lx_nand_flash_sector_release() argument
108 tx_mutex_get(&nand_flash -> lx_nand_flash_mutex, TX_WAIT_FOREVER); in _lx_nand_flash_sector_release()
112 nand_flash -> lx_nand_flash_diagnostic_sector_release_requests++; in _lx_nand_flash_sector_release()
116 status = _lx_nand_flash_block_find(nand_flash, logical_sector, &block, &block_status); in _lx_nand_flash_sector_release()
123 _lx_nand_flash_system_error(nand_flash, status, block, 0); in _lx_nand_flash_sector_release()
131 tx_mutex_put(&nand_flash -> lx_nand_flash_mutex); in _lx_nand_flash_sector_release()
144 spare_buffer_ptr = (UCHAR*)nand_flash -> lx_nand_flash_page_buffer; in _lx_nand_flash_sector_release()
147 …available_pages = block_status & LX_NAND_BLOCK_STATUS_FULL ? nand_flash -> lx_nand_flash_pages_per… in _lx_nand_flash_sector_release()
159 …status = (nand_flash -> lx_nand_flash_driver_pages_read)(nand_flash, block, (ULONG)page, LX_NULL, … in _lx_nand_flash_sector_release()
161 …status = (nand_flash -> lx_nand_flash_driver_pages_read)(block, (ULONG)page, LX_NULL, spare_buffer… in _lx_nand_flash_sector_release()
[all …]
Dlx_nand_flash_memory_initialize.c78 UINT _lx_nand_flash_memory_initialize(LX_NAND_FLASH *nand_flash, ULONG* memory_ptr, UINT memory_s… in _lx_nand_flash_memory_initialize() argument
92 …buffer_size = nand_flash -> lx_nand_flash_total_blocks * sizeof(*nand_flash -> lx_nand_flash_block… in _lx_nand_flash_memory_initialize()
95 if (buffer_size < nand_flash -> lx_nand_flash_bytes_per_page) in _lx_nand_flash_memory_initialize()
97 buffer_size = nand_flash -> lx_nand_flash_bytes_per_page; in _lx_nand_flash_memory_initialize()
101nand_flash -> lx_nand_flash_block_mapping_table = (USHORT*)(((UCHAR*)memory_ptr) + memory_offset); in _lx_nand_flash_memory_initialize()
104 nand_flash -> lx_nand_flash_block_mapping_table_size = buffer_size; in _lx_nand_flash_memory_initialize()
118 …buffer_size = nand_flash -> lx_nand_flash_total_blocks * sizeof(*nand_flash -> lx_nand_flash_erase… in _lx_nand_flash_memory_initialize()
121 if (buffer_size < nand_flash -> lx_nand_flash_bytes_per_page) in _lx_nand_flash_memory_initialize()
123 buffer_size = nand_flash -> lx_nand_flash_bytes_per_page; in _lx_nand_flash_memory_initialize()
127 nand_flash -> lx_nand_flash_erase_count_table = (UCHAR*)(((UCHAR*)memory_ptr) + memory_offset); in _lx_nand_flash_memory_initialize()
[all …]
Dlx_nand_flash_sector_write.c94 UINT _lx_nand_flash_sector_write(LX_NAND_FLASH *nand_flash, ULONG logical_sector, VOID *buffer) in _lx_nand_flash_sector_write() argument
110 tx_mutex_get(&nand_flash -> lx_nand_flash_mutex, TX_WAIT_FOREVER); in _lx_nand_flash_sector_write()
114 nand_flash -> lx_nand_flash_diagnostic_sector_write_requests++; in _lx_nand_flash_sector_write()
117 status = _lx_nand_flash_block_find(nand_flash, logical_sector, &block, &block_status); in _lx_nand_flash_sector_write()
124 _lx_nand_flash_system_error(nand_flash, status, block, 0); in _lx_nand_flash_sector_write()
132 tx_mutex_put(&nand_flash -> lx_nand_flash_mutex); in _lx_nand_flash_sector_write()
145 status = _lx_nand_flash_block_allocate(nand_flash, &new_block); in _lx_nand_flash_sector_write()
153 tx_mutex_put(&nand_flash -> lx_nand_flash_mutex); in _lx_nand_flash_sector_write()
165 _lx_nand_flash_system_error(nand_flash, status, new_block, 0); in _lx_nand_flash_sector_write()
173 tx_mutex_put(&nand_flash -> lx_nand_flash_mutex); in _lx_nand_flash_sector_write()
[all …]
Dlx_nand_flash_metadata_write.c80 UINT _lx_nand_flash_metadata_write(LX_NAND_FLASH *nand_flash, UCHAR* main_buffer, ULONG spare_valu… in _lx_nand_flash_metadata_write() argument
90 …spare_buffer_ptr = nand_flash -> lx_nand_flash_page_buffer + nand_flash -> lx_nand_flash_bytes_per… in _lx_nand_flash_metadata_write()
93 LX_MEMSET(spare_buffer_ptr, 0xFF, nand_flash -> lx_nand_flash_spare_total_length); in _lx_nand_flash_metadata_write()
96 if (nand_flash -> lx_nand_flash_spare_data2_length >= 2) in _lx_nand_flash_metadata_write()
100 …LX_UTILITY_SHORT_SET(&spare_buffer_ptr[nand_flash -> lx_nand_flash_spare_data2_offset], nand_flash in _lx_nand_flash_metadata_write()
104 …LX_UTILITY_LONG_SET(&spare_buffer_ptr[nand_flash -> lx_nand_flash_spare_data1_offset], spare_value… in _lx_nand_flash_metadata_write()
107 block = nand_flash -> lx_nand_flash_metadata_block_number_current; in _lx_nand_flash_metadata_write()
110 page = nand_flash -> lx_nand_flash_metadata_block_current_page; in _lx_nand_flash_metadata_write()
114 …status = (nand_flash -> lx_nand_flash_driver_pages_write)(nand_flash, block, page, main_buffer, sp… in _lx_nand_flash_metadata_write()
116 …status = (nand_flash -> lx_nand_flash_driver_pages_write)(block, page, main_buffer, spare_buffer_p… in _lx_nand_flash_metadata_write()
[all …]
Dlx_nand_flash_metadata_build.c75 UINT _lx_nand_flash_metadata_build(LX_NAND_FLASH *nand_flash) in _lx_nand_flash_metadata_build() argument
84 nand_device_info_page = (LX_NAND_DEVICE_INFO*)nand_flash -> lx_nand_flash_page_buffer; in _lx_nand_flash_metadata_build()
90 …nand_device_info_page -> lx_nand_device_info_metadata_block_number = nand_flash -> lx_nand_flash_m… in _lx_nand_flash_metadata_build()
91 …nand_device_info_page -> lx_nand_device_info_backup_metadata_block_number = nand_flash -> lx_nand_… in _lx_nand_flash_metadata_build()
92 …nand_device_info_page -> lx_nand_device_info_base_erase_count = nand_flash -> lx_nand_flash_base_e… in _lx_nand_flash_metadata_build()
95 …status = _lx_nand_flash_metadata_write(nand_flash, (UCHAR*)nand_device_info_page, LX_NAND_PAGE_TYP… in _lx_nand_flash_metadata_build()
106 …page_count = (nand_flash -> lx_nand_flash_erase_count_table_size + (nand_flash -> lx_nand_flash_by… in _lx_nand_flash_metadata_build()
113 …status = _lx_nand_flash_metadata_write(nand_flash, (UCHAR*)(nand_flash -> lx_nand_flash_erase_coun… in _lx_nand_flash_metadata_build()
114 i * nand_flash -> lx_nand_flash_bytes_per_page), in _lx_nand_flash_metadata_build()
127 …page_count = (nand_flash -> lx_nand_flash_block_mapping_table_size + (nand_flash -> lx_nand_flash_… in _lx_nand_flash_metadata_build()
[all …]
Dlx_nand_flash_block_data_move.c89 UINT _lx_nand_flash_block_data_move(LX_NAND_FLASH *nand_flash, ULONG new_block) in _lx_nand_flash_block_data_move() argument
100 status = _lx_nand_flash_mapped_block_list_get(nand_flash, &block_mapping_index); in _lx_nand_flash_block_data_move()
110 …status = _lx_nand_flash_block_find(nand_flash, block_mapping_index * nand_flash -> lx_nand_flash_p… in _lx_nand_flash_block_data_move()
124 …_copy(nand_flash, block_mapping_index * nand_flash -> lx_nand_flash_pages_per_block, block, block_… in _lx_nand_flash_block_data_move()
131 _lx_nand_flash_system_error(nand_flash, status, new_block, 0); in _lx_nand_flash_block_data_move()
145 _lx_nand_flash_free_block_list_add(nand_flash, new_block); in _lx_nand_flash_block_data_move()
150 status = _lx_nand_flash_block_status_set(nand_flash, new_block, new_block_status); in _lx_nand_flash_block_data_move()
157 _lx_nand_flash_system_error(nand_flash, status, new_block, 0); in _lx_nand_flash_block_data_move()
172 …_lx_nand_flash_block_mapping_set(nand_flash, block_mapping_index * nand_flash -> lx_nand_flash_pag… in _lx_nand_flash_block_data_move()
179 _lx_nand_flash_mapped_block_list_add(nand_flash, block_mapping_index); in _lx_nand_flash_block_data_move()
[all …]
Dlx_nand_flash_close.c79 UINT _lx_nand_flash_close(LX_NAND_FLASH *nand_flash) in _lx_nand_flash_close() argument
89 if ((_lx_nand_flash_opened_ptr == nand_flash) && in _lx_nand_flash_close()
90 (_lx_nand_flash_opened_ptr == nand_flash -> lx_nand_flash_open_next) && in _lx_nand_flash_close()
91 (_lx_nand_flash_opened_ptr == nand_flash -> lx_nand_flash_open_previous)) in _lx_nand_flash_close()
101 (nand_flash -> lx_nand_flash_open_next) -> lx_nand_flash_open_previous = in _lx_nand_flash_close()
102 nand_flash -> lx_nand_flash_open_previous; in _lx_nand_flash_close()
103 (nand_flash -> lx_nand_flash_open_previous) -> lx_nand_flash_open_next = in _lx_nand_flash_close()
104 nand_flash -> lx_nand_flash_open_next; in _lx_nand_flash_close()
107 if (_lx_nand_flash_opened_ptr == nand_flash) in _lx_nand_flash_close()
111 _lx_nand_flash_opened_ptr = nand_flash -> lx_nand_flash_open_next; in _lx_nand_flash_close()
[all …]
Dlx_nand_flash_sector_read.c83 UINT _lx_nand_flash_sector_read(LX_NAND_FLASH *nand_flash, ULONG logical_sector, VOID *buffer) in _lx_nand_flash_sector_read() argument
98 tx_mutex_get(&nand_flash -> lx_nand_flash_mutex, TX_WAIT_FOREVER); in _lx_nand_flash_sector_read()
102 nand_flash -> lx_nand_flash_diagnostic_sector_read_requests++; in _lx_nand_flash_sector_read()
105 status = _lx_nand_flash_block_find(nand_flash, logical_sector, &block, &block_status); in _lx_nand_flash_sector_read()
112 _lx_nand_flash_system_error(nand_flash, status, block, 0); in _lx_nand_flash_sector_read()
120 tx_mutex_put(&nand_flash -> lx_nand_flash_mutex); in _lx_nand_flash_sector_read()
132 spare_buffer_ptr = (UCHAR*)nand_flash -> lx_nand_flash_page_buffer; in _lx_nand_flash_sector_read()
135 …available_pages = block_status & LX_NAND_BLOCK_STATUS_FULL ? nand_flash -> lx_nand_flash_pages_per… in _lx_nand_flash_sector_read()
147 …status = (nand_flash -> lx_nand_flash_driver_pages_read)(nand_flash, block, (ULONG)page, (UCHAR*)b… in _lx_nand_flash_sector_read()
149 …status = (nand_flash -> lx_nand_flash_driver_pages_read)(block, (ULONG)page, (UCHAR*)buffer, spare… in _lx_nand_flash_sector_read()
[all …]
Dlx_nand_flash_mapped_block_list_add.c76 UINT _lx_nand_flash_mapped_block_list_add(LX_NAND_FLASH* nand_flash, ULONG block_mapping_index) in _lx_nand_flash_mapped_block_list_add() argument
85 insert_position = nand_flash -> lx_nand_flash_mapped_block_list_head; in _lx_nand_flash_mapped_block_list_add()
88 if (insert_position < nand_flash -> lx_nand_flash_free_block_list_tail) in _lx_nand_flash_mapped_block_list_add()
96 …new_block_erase_count = nand_flash -> lx_nand_flash_erase_count_table[nand_flash -> lx_nand_flash_… in _lx_nand_flash_mapped_block_list_add()
99 nand_flash -> lx_nand_flash_mapped_block_list_head--; in _lx_nand_flash_mapped_block_list_add()
105 while ((search_position < nand_flash -> lx_nand_flash_block_list_size) && in _lx_nand_flash_mapped_block_list_add()
106 …(nand_flash -> lx_nand_flash_erase_count_table[nand_flash -> lx_nand_flash_block_mapping_table[nan… in _lx_nand_flash_mapped_block_list_add()
110nand_flash -> lx_nand_flash_block_list[insert_position] = nand_flash -> lx_nand_flash_block_list[s… in _lx_nand_flash_mapped_block_list_add()
116 nand_flash -> lx_nand_flash_block_list[insert_position] = (USHORT)block_mapping_index; in _lx_nand_flash_mapped_block_list_add()
Dlx_nand_flash_system_error.c85 VOID _lx_nand_flash_system_error(LX_NAND_FLASH *nand_flash, UINT error_code, ULONG block, ULONG pa… in _lx_nand_flash_system_error() argument
89 nand_flash -> lx_nand_flash_diagnostic_system_errors++; in _lx_nand_flash_system_error()
92 nand_flash -> lx_nand_flash_diagnostic_system_error = error_code; in _lx_nand_flash_system_error()
99 nand_flash -> lx_nand_flash_page_corrections++; in _lx_nand_flash_system_error()
102 nand_flash -> lx_nand_flash_last_block_correction = block; in _lx_nand_flash_system_error()
103 nand_flash -> lx_nand_flash_last_page_correction = page; in _lx_nand_flash_system_error()
107 if (nand_flash -> lx_nand_flash_driver_system_error) in _lx_nand_flash_system_error()
112 (nand_flash -> lx_nand_flash_driver_system_error)(nand_flash, error_code, block, page); in _lx_nand_flash_system_error()
114 (nand_flash -> lx_nand_flash_driver_system_error)(error_code, block, page); in _lx_nand_flash_system_error()
Dlx_nand_flash_data_page_copy.c84 UINT _lx_nand_flash_data_page_copy(LX_NAND_FLASH* nand_flash, ULONG logical_sector, ULONG source_b… in _lx_nand_flash_data_page_copy() argument
106 …available_pages = (src_block_status & LX_NAND_BLOCK_STATUS_FULL) ? (nand_flash -> lx_nand_flash_pa… in _lx_nand_flash_data_page_copy()
113 …spare_buffer_ptr = nand_flash -> lx_nand_flash_page_buffer + nand_flash -> lx_nand_flash_bytes_per… in _lx_nand_flash_data_page_copy()
125 …status = (nand_flash -> lx_nand_flash_driver_pages_read)(nand_flash, source_block, (ULONG)source_p… in _lx_nand_flash_data_page_copy()
127 …status = (nand_flash -> lx_nand_flash_driver_pages_read)(source_block, (ULONG)source_page, LX_NULL… in _lx_nand_flash_data_page_copy()
135 _lx_nand_flash_system_error(nand_flash, status, source_block, 0); in _lx_nand_flash_data_page_copy()
142 …spare_data1 = LX_UTILITY_LONG_GET(&spare_buffer_ptr[nand_flash -> lx_nand_flash_spare_data1_offset… in _lx_nand_flash_data_page_copy()
154 …s = (nand_flash -> lx_nand_flash_driver_pages_copy)(nand_flash, source_block, (ULONG)source_page, … in _lx_nand_flash_data_page_copy()
156 …status = (nand_flash -> lx_nand_flash_driver_pages_copy)(source_block, (ULONG)source_page, destina… in _lx_nand_flash_data_page_copy()
164 _lx_nand_flash_system_error(nand_flash, status, source_block, 0); in _lx_nand_flash_data_page_copy()
[all …]
Dlx_nand_flash_block_mapping_set.c77 UINT _lx_nand_flash_block_mapping_set(LX_NAND_FLASH *nand_flash, ULONG logical_sector, ULONG block) in _lx_nand_flash_block_mapping_set() argument
86 block_mapping_index = logical_sector / nand_flash -> lx_nand_flash_pages_per_block; in _lx_nand_flash_block_mapping_set()
89 …if (block_mapping_index > nand_flash -> lx_nand_flash_block_mapping_table_size / sizeof(*nand_flas… in _lx_nand_flash_block_mapping_set()
97 nand_flash -> lx_nand_flash_block_mapping_table[block_mapping_index] = (USHORT)block; in _lx_nand_flash_block_mapping_set()
100 …umber = (UCHAR)(block_mapping_index * sizeof(*nand_flash -> lx_nand_flash_block_mapping_table) / n… in _lx_nand_flash_block_mapping_set()
103 …status = _lx_nand_flash_metadata_write(nand_flash, ((UCHAR*)nand_flash -> lx_nand_flash_block_mapp… in _lx_nand_flash_block_mapping_set()
104 … page_number * nand_flash -> lx_nand_flash_bytes_per_page, in _lx_nand_flash_block_mapping_set()
Dlx_nand_flash_mapped_block_list_remove.c76 UINT _lx_nand_flash_mapped_block_list_remove(LX_NAND_FLASH* nand_flash, ULONG block_mapping_index) in _lx_nand_flash_mapped_block_list_remove() argument
83 search_position = nand_flash -> lx_nand_flash_mapped_block_list_head + 1; in _lx_nand_flash_mapped_block_list_remove()
86 while (search_position < nand_flash -> lx_nand_flash_block_list_size) in _lx_nand_flash_mapped_block_list_remove()
90 if (nand_flash -> lx_nand_flash_block_list[search_position] == block_mapping_index) in _lx_nand_flash_mapped_block_list_remove()
102 if (search_position < nand_flash -> lx_nand_flash_block_list_size) in _lx_nand_flash_mapped_block_list_remove()
106 nand_flash -> lx_nand_flash_mapped_block_list_head++; in _lx_nand_flash_mapped_block_list_remove()
109 while (search_position > nand_flash -> lx_nand_flash_mapped_block_list_head) in _lx_nand_flash_mapped_block_list_remove()
113nand_flash -> lx_nand_flash_block_list[search_position] = nand_flash -> lx_nand_flash_block_list[s… in _lx_nand_flash_mapped_block_list_remove()
Dlx_nand_flash_free_block_list_add.c76 UINT _lx_nand_flash_free_block_list_add(LX_NAND_FLASH* nand_flash, ULONG block) in _lx_nand_flash_free_block_list_add() argument
85 insert_position = nand_flash -> lx_nand_flash_free_block_list_tail; in _lx_nand_flash_free_block_list_add()
88 if (insert_position > nand_flash -> lx_nand_flash_mapped_block_list_head) in _lx_nand_flash_free_block_list_add()
96 new_block_erase_count = nand_flash -> lx_nand_flash_erase_count_table[block]; in _lx_nand_flash_free_block_list_add()
99 nand_flash -> lx_nand_flash_free_block_list_tail++; in _lx_nand_flash_free_block_list_add()
106 …(nand_flash -> lx_nand_flash_erase_count_table[nand_flash -> lx_nand_flash_block_list[search_posit… in _lx_nand_flash_free_block_list_add()
110nand_flash -> lx_nand_flash_block_list[insert_position] = nand_flash -> lx_nand_flash_block_list[s… in _lx_nand_flash_free_block_list_add()
116 nand_flash -> lx_nand_flash_block_list[insert_position] = (USHORT)block; in _lx_nand_flash_free_block_list_add()
Dlx_nand_flash_mapped_block_list_get.c77 UINT _lx_nand_flash_mapped_block_list_get(LX_NAND_FLASH* nand_flash, ULONG *block_mapping_index) in _lx_nand_flash_mapped_block_list_get() argument
82 …if (nand_flash -> lx_nand_flash_mapped_block_list_head == nand_flash -> lx_nand_flash_block_list_s… in _lx_nand_flash_mapped_block_list_get()
90 nand_flash -> lx_nand_flash_mapped_block_list_head++; in _lx_nand_flash_mapped_block_list_get()
93 …*block_mapping_index = nand_flash -> lx_nand_flash_block_list[nand_flash -> lx_nand_flash_mapped_b… in _lx_nand_flash_mapped_block_list_get()
Dlx_nand_flash_erase_count_set.c77 UINT _lx_nand_flash_erase_count_set(LX_NAND_FLASH *nand_flash, ULONG block, UCHAR erase_count) in _lx_nand_flash_erase_count_set() argument
85 nand_flash -> lx_nand_flash_erase_count_table[block] = erase_count; in _lx_nand_flash_erase_count_set()
88 …page_number = (UCHAR)(block * sizeof(*nand_flash -> lx_nand_flash_erase_count_table) / nand_flash in _lx_nand_flash_erase_count_set()
91 …status = _lx_nand_flash_metadata_write(nand_flash, ((UCHAR*)nand_flash -> lx_nand_flash_erase_coun… in _lx_nand_flash_erase_count_set()
92 … page_number * nand_flash -> lx_nand_flash_bytes_per_page, in _lx_nand_flash_erase_count_set()
Dlx_nand_flash_block_status_set.c77 UINT _lx_nand_flash_block_status_set(LX_NAND_FLASH *nand_flash, ULONG block, ULONG block_status) in _lx_nand_flash_block_status_set() argument
85 nand_flash -> lx_nand_flash_block_status_table[block] = (USHORT)block_status; in _lx_nand_flash_block_status_set()
88 …page_number = (UCHAR)(block * sizeof(*nand_flash -> lx_nand_flash_block_status_table) / nand_flash in _lx_nand_flash_block_status_set()
91 …status = _lx_nand_flash_metadata_write(nand_flash, ((UCHAR*)nand_flash -> lx_nand_flash_block_stat… in _lx_nand_flash_block_status_set()
92 …page_number * nand_flash -> lx_nand_flash_bytes_per_page, LX_NAND_PAGE_TYPE_BLOCK_STATUS_TABLE | p… in _lx_nand_flash_block_status_set()
Dlx_nand_flash_block_allocate.c76 UINT _lx_nand_flash_block_allocate(LX_NAND_FLASH* nand_flash, ULONG* block) in _lx_nand_flash_block_allocate() argument
81 if (nand_flash -> lx_nand_flash_free_block_list_tail == 0) in _lx_nand_flash_block_allocate()
89 nand_flash -> lx_nand_flash_free_block_list_tail--; in _lx_nand_flash_block_allocate()
92 … *block = nand_flash -> lx_nand_flash_block_list[nand_flash -> lx_nand_flash_free_block_list_tail]; in _lx_nand_flash_block_allocate()
Dlx_nand_flash_block_find.c83 UINT _lx_nand_flash_block_find(LX_NAND_FLASH *nand_flash, ULONG logical_sector, ULONG *block, USHO… in _lx_nand_flash_block_find() argument
91 block_mapping_index = logical_sector / nand_flash -> lx_nand_flash_pages_per_block; in _lx_nand_flash_block_find()
94 …if (block_mapping_index > nand_flash -> lx_nand_flash_block_mapping_table_size / sizeof(*nand_flas… in _lx_nand_flash_block_find()
102 block_number = nand_flash -> lx_nand_flash_block_mapping_table[block_mapping_index]; in _lx_nand_flash_block_find()
109 *block_status = nand_flash -> lx_nand_flash_block_status_table[block_number]; in _lx_nand_flash_block_find()
Dlx_nand_flash_driver_block_erased_verify.c85 UINT _lx_nand_flash_driver_block_erased_verify(LX_NAND_FLASH *nand_flash, ULONG block) in _lx_nand_flash_driver_block_erased_verify() argument
91 nand_flash -> lx_nand_flash_diagnostic_block_erased_verifies++; in _lx_nand_flash_driver_block_erased_verify()
95 status = (nand_flash -> lx_nand_flash_driver_block_erased_verify)(nand_flash, block); in _lx_nand_flash_driver_block_erased_verify()
97 status = (nand_flash -> lx_nand_flash_driver_block_erased_verify)(block); in _lx_nand_flash_driver_block_erased_verify()
Dlx_nand_flash_simulator.c107 UINT _lx_nand_flash_simulator_initialize(LX_NAND_FLASH *nand_flash);
111 UINT _lx_nand_flash_simulator_read(LX_NAND_FLASH *nand_flash, ULONG block, ULONG page, ULONG *dest…
112 UINT _lx_nand_flash_simulator_write(LX_NAND_FLASH *nand_flash, ULONG block, ULONG page, ULONG *sou…
113 UINT _lx_nand_flash_simulator_block_erase(LX_NAND_FLASH *nand_flash, ULONG block, ULONG erase_coun…
114 UINT _lx_nand_flash_simulator_block_erased_verify(LX_NAND_FLASH *nand_flash, ULONG block);
115 UINT _lx_nand_flash_simulator_page_erased_verify(LX_NAND_FLASH *nand_flash, ULONG block, ULONG pag…
116 UINT _lx_nand_flash_simulator_block_status_get(LX_NAND_FLASH *nand_flash, ULONG block, UCHAR *bad_…
117 UINT _lx_nand_flash_simulator_block_status_set(LX_NAND_FLASH *nand_flash, ULONG block, UCHAR bad_b…
118 UINT _lx_nand_flash_simulator_extra_bytes_get(LX_NAND_FLASH *nand_flash, ULONG block, ULONG page, …
119 UINT _lx_nand_flash_simulator_extra_bytes_set(LX_NAND_FLASH *nand_flash, ULONG block, ULONG page, …
[all …]
Dlx_nand_flash_driver_block_erase.c85 UINT _lx_nand_flash_driver_block_erase(LX_NAND_FLASH *nand_flash, ULONG block, ULONG erase_count) in _lx_nand_flash_driver_block_erase() argument
92 nand_flash -> lx_nand_flash_diagnostic_block_erases++; in _lx_nand_flash_driver_block_erase()
96 status = (nand_flash -> lx_nand_flash_driver_block_erase)(nand_flash, block, erase_count); in _lx_nand_flash_driver_block_erase()
98 status = (nand_flash -> lx_nand_flash_driver_block_erase)(block, erase_count); in _lx_nand_flash_driver_block_erase()

12