Skip to content

Commit 6f01b17

Browse files
committed
mtd: rawnand: ls1024a: add missing hamming c2000_badblock_pattern
1 parent 4a6d5aa commit 6f01b17

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/mtd/nand/raw/ls1024a_nand.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,12 @@ static struct nand_bbt_descr c2000_badblock_pattern = {
306306
.len = 1,
307307
.pattern = scan_ff_pattern
308308
};
309+
#else /* Hamming */
310+
static struct nand_bbt_descr c2000_badblock_pattern = {
311+
.offs = 4,
312+
.len = 1,
313+
.pattern = scan_ff_pattern
314+
};
309315
#endif
310316

311317
/**
@@ -533,8 +539,8 @@ static int comcerto_correct_ecc(struct nand_chip* nand_device, uint8_t *dat,
533539
{
534540
int num_zero_bits = 0;
535541
int empty = 0;
536-
#if defined (CONFIG_NAND_LS1024A_ECC_8_HW_BCH) || defined (CONFIG_NAND_LS1024A_ECC_24_HW_BCH)
537542
uint8_t err_count = 0;
543+
#if defined (CONFIG_NAND_LS1024A_ECC_8_HW_BCH) || defined (CONFIG_NAND_LS1024A_ECC_24_HW_BCH)
538544
uint32_t err_corr_data_prev;
539545
#endif
540546
uint32_t err_corr_data;

0 commit comments

Comments
 (0)