OpenOCD
ecc_kw.c File Reference
Include dependency graph for ecc_kw.c:

Go to the source code of this file.

Macros

#define MODPOLY   0x409 /* x^10 + x^3 + 1 in binary */
 

Functions

static void gf_build_log_exp_table (void)
 
int nand_calculate_ecc_kw (struct nand_device *nand, const uint8_t *data, uint8_t *ecc)
 

Variables

static uint16_t gf_exp [1023+1023]
 
static uint16_t gf_log [1024]
 

Macro Definition Documentation

◆ MODPOLY

#define MODPOLY   0x409 /* x^10 + x^3 + 1 in binary */

Definition at line 23 of file ecc_kw.c.

Function Documentation

◆ gf_build_log_exp_table()

static void gf_build_log_exp_table ( void  )
static

Definition at line 39 of file ecc_kw.c.

References gf_exp, gf_log, and MODPOLY.

Referenced by nand_calculate_ecc_kw().

◆ nand_calculate_ecc_kw()

int nand_calculate_ecc_kw ( struct nand_device nand,
const uint8_t *  data,
uint8_t *  ecc 
)

Definition at line 93 of file ecc_kw.c.

References gf_build_log_exp_table(), gf_exp, and gf_log.

Referenced by nand_fileio_read().

Variable Documentation

◆ gf_exp

uint16_t gf_exp[1023+1023]
static

Definition at line 31 of file ecc_kw.c.

Referenced by gf_build_log_exp_table(), and nand_calculate_ecc_kw().

◆ gf_log

uint16_t gf_log[1024]
static

Definition at line 37 of file ecc_kw.c.

Referenced by gf_build_log_exp_table(), and nand_calculate_ecc_kw().