Dear Krzysztof,
Thank you for your reply.
On 2024/8/12 下午 05:13, Krzysztof Kozlowski wrote:
On 12/08/2024 11:10, Hui-Ping Chen wrote:
+
+/* NAND-type Flash BCH Error Data Registers */
+#define MA35_NFI_REG_NANDECCED0 (0x960)
+#define MA35_NFI_REG_NANDECCED1 (0x964)
+#define MA35_NFI_REG_NANDECCED2 (0x968)
+#define MA35_NFI_REG_NANDECCED3 (0x96C)
+#define MA35_NFI_REG_NANDECCED4 (0x970)
+#define MA35_NFI_REG_NANDECCED5 (0x974)
+
+/* NAND-type Flash Redundant Area Registers */
+#define MA35_NFI_REG_NANDRA0 (0xA00)
+#define MA35_NFI_REG_NANDRA1 (0xA04)
+
+#define SKIP_SPARE_BYTES 4
+
+/* BCH algorithm related constants and variables */
+enum {
+ eBCH_NONE = 0,
+ eBCH_T8,
+ eBCH_T12,
+ eBCH_T24,
+ eBCH_CNT
+} E_BCHALGORITHM;
+
+static const int g_i32BCHAlgoIdx[eBCH_CNT] = {BCH_T8, BCH_T8, BCH_T12, BCH_T24};
+static struct nand_ecclayout_user ma35_nand_oob;
Why this is file-scope?
I will remove the `static`.
No, why this cannot be instance dependent? Quick looks says it could.
And should.
I will add this variable to the ma35_nand_info structure.
Best regards,
Krzysztof
Best regards,
Hui-Ping Chen