/* Write ECC information in a spare area, using the given scheme.  */
void nand_flash_spare_scheme_write_ecc(const struct nand_flash_spare_scheme *scheme, uint8_t *spare, const uint8_t *ecc)
/* Write ECC information in a spare area, using the given scheme.  */
void nand_flash_spare_scheme_write_ecc(const struct nand_flash_spare_scheme *scheme, uint8_t *spare, const uint8_t *ecc)
{
	uint32_t i;
	for (i = 0; i < scheme->ecc_byte_number; i++) {
		spare[scheme->ecc_bytes_positions[i]] = ecc[i];
	}
}