1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * BCH Error Location Module
5 * Copyright (C) 2012 Texas Instruments Incorporated - https://www.ti.com/
17 /* ELM support 8 error syndrome process */
18 #define ERROR_VECTOR_MAX 8
21 * struct elm_errorvec - error vector for elm
22 * @error_reported: set true for vectors error is reported
23 * @error_uncorrectable: number of uncorrectable errors
24 * @error_count: number of correctable errors in the sector
25 * @error_loc: buffer for error location
30 bool error_uncorrectable
;
35 #if IS_ENABLED(CONFIG_MTD_NAND_OMAP_BCH)
36 void elm_decode_bch_error_page(struct device
*dev
, u8
*ecc_calc
,
37 struct elm_errorvec
*err_vec
);
38 int elm_config(struct device
*dev
, enum bch_ecc bch_type
,
39 int ecc_steps
, int ecc_step_size
, int ecc_syndrome_size
);
42 elm_decode_bch_error_page(struct device
*dev
, u8
*ecc_calc
,
43 struct elm_errorvec
*err_vec
)
47 static inline int elm_config(struct device
*dev
, enum bch_ecc bch_type
,
48 int ecc_steps
, int ecc_step_size
,
49 int ecc_syndrome_size
)
53 #endif /* CONFIG_MTD_NAND_OMAP_BCH */