1 |
|
|
/*************************************************************************** |
2 |
|
|
* Copyright (c) 2024 Microsoft Corporation |
3 |
|
|
* Copyright (c) 2026-present Eclipse ThreadX contributors |
4 |
|
|
* |
5 |
|
|
* This program and the accompanying materials are made available under the |
6 |
|
|
* terms of the MIT License which is available at |
7 |
|
|
* https://opensource.org/licenses/MIT. |
8 |
|
|
* |
9 |
|
|
* SPDX-License-Identifier: MIT |
10 |
|
|
**************************************************************************/ |
11 |
|
|
|
12 |
|
|
|
13 |
|
|
/**************************************************************************/ |
14 |
|
|
/**************************************************************************/ |
15 |
|
|
/** */ |
16 |
|
|
/** LevelX Component */ |
17 |
|
|
/** */ |
18 |
|
|
/** NAND Flash */ |
19 |
|
|
/** */ |
20 |
|
|
/**************************************************************************/ |
21 |
|
|
/**************************************************************************/ |
22 |
|
|
|
23 |
|
|
#define LX_SOURCE_CODE |
24 |
|
|
|
25 |
|
|
|
26 |
|
|
/* Disable ThreadX error checking. */ |
27 |
|
|
|
28 |
|
|
#ifndef LX_DISABLE_ERROR_CHECKING |
29 |
|
|
#define LX_DISABLE_ERROR_CHECKING |
30 |
|
|
#endif |
31 |
|
|
|
32 |
|
|
|
33 |
|
|
/* Include necessary system files. */ |
34 |
|
|
|
35 |
|
|
#include "lx_api.h" |
36 |
|
|
|
37 |
|
|
|
38 |
|
|
/**************************************************************************/ |
39 |
|
|
/* */ |
40 |
|
|
/* FUNCTION RELEASE */ |
41 |
|
|
/* */ |
42 |
|
|
/* _lx_nand_flash_extended_cache_enable PORTABLE C */ |
43 |
|
|
/* 6.2.1 */ |
44 |
|
|
/* AUTHOR */ |
45 |
|
|
/* */ |
46 |
|
|
/* William E. Lamie, Microsoft Corporation */ |
47 |
|
|
/* */ |
48 |
|
|
/* DESCRIPTION */ |
49 |
|
|
/* */ |
50 |
|
|
/* This function sets up the extended NAND cache for block status, */ |
51 |
|
|
/* page extra bytes, and page 0 contents. The routine will enable as */ |
52 |
|
|
/* many cache capabilities as possible until the supplied memory is */ |
53 |
|
|
/* exhausted. */ |
54 |
|
|
/* */ |
55 |
|
|
/* INPUT */ |
56 |
|
|
/* */ |
57 |
|
|
/* nand_flash NAND flash instance */ |
58 |
|
|
/* memory Pointer to memory for caches */ |
59 |
|
|
/* size Size of memory in bytes */ |
60 |
|
|
/* */ |
61 |
|
|
/* OUTPUT */ |
62 |
|
|
/* */ |
63 |
|
|
/* Completion Status */ |
64 |
|
|
/* */ |
65 |
|
|
/* CALLS */ |
66 |
|
|
/* */ |
67 |
|
|
/* None */ |
68 |
|
|
/* */ |
69 |
|
|
/* CALLED BY */ |
70 |
|
|
/* */ |
71 |
|
|
/* Internal LevelX */ |
72 |
|
|
/* */ |
73 |
|
|
/**************************************************************************/ |
74 |
|
|
UINT _lx_nand_flash_extended_cache_enable(LX_NAND_FLASH *nand_flash, VOID *memory, ULONG size) |
75 |
|
|
{ |
76 |
|
|
|
77 |
|
|
LX_PARAMETER_NOT_USED(nand_flash); |
78 |
|
|
LX_PARAMETER_NOT_USED(memory); |
79 |
|
|
LX_PARAMETER_NOT_USED(size); |
80 |
|
|
|
81 |
|
|
/* Return not supported. */ |
82 |
|
|
return(LX_NOT_SUPPORTED); |
83 |
|
|
} |
84 |
|
|
|