Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v5.3 39 lines 1.0 kB view raw
1/* SPDX-License-Identifier: GPL-2.0-only */ 2/* 3 * Copyright (C) 2000-2010 Steven J. Hill <sjhill@realitydiluted.com> 4 * David Woodhouse <dwmw2@infradead.org> 5 * Thomas Gleixner <tglx@linutronix.de> 6 * 7 * This file is the header for the ECC algorithm. 8 */ 9 10#ifndef __MTD_NAND_ECC_H__ 11#define __MTD_NAND_ECC_H__ 12 13struct nand_chip; 14 15/* 16 * Calculate 3 byte ECC code for eccsize byte block 17 */ 18void __nand_calculate_ecc(const u_char *dat, unsigned int eccsize, 19 u_char *ecc_code, bool sm_order); 20 21/* 22 * Calculate 3 byte ECC code for 256/512 byte block 23 */ 24int nand_calculate_ecc(struct nand_chip *chip, const u_char *dat, 25 u_char *ecc_code); 26 27/* 28 * Detect and correct a 1 bit error for eccsize byte block 29 */ 30int __nand_correct_data(u_char *dat, u_char *read_ecc, u_char *calc_ecc, 31 unsigned int eccsize, bool sm_order); 32 33/* 34 * Detect and correct a 1 bit error for 256/512 byte block 35 */ 36int nand_correct_data(struct nand_chip *chip, u_char *dat, u_char *read_ecc, 37 u_char *calc_ecc); 38 39#endif /* __MTD_NAND_ECC_H__ */