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

Configure Feed

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

at v4.8-rc5 43 lines 1.1 kB view raw
1/* 2 * JZ4780 BCH controller 3 * 4 * Copyright (c) 2015 Imagination Technologies 5 * Author: Alex Smith <alex.smith@imgtec.com> 6 * 7 * This program is free software; you can redistribute it and/or modify it 8 * under the terms of the GNU General Public License version 2 as published 9 * by the Free Software Foundation. 10 */ 11 12#ifndef __DRIVERS_MTD_NAND_JZ4780_BCH_H__ 13#define __DRIVERS_MTD_NAND_JZ4780_BCH_H__ 14 15#include <linux/types.h> 16 17struct device; 18struct device_node; 19struct jz4780_bch; 20 21/** 22 * struct jz4780_bch_params - BCH parameters 23 * @size: data bytes per ECC step. 24 * @bytes: ECC bytes per step. 25 * @strength: number of correctable bits per ECC step. 26 */ 27struct jz4780_bch_params { 28 int size; 29 int bytes; 30 int strength; 31}; 32 33int jz4780_bch_calculate(struct jz4780_bch *bch, 34 struct jz4780_bch_params *params, 35 const u8 *buf, u8 *ecc_code); 36int jz4780_bch_correct(struct jz4780_bch *bch, 37 struct jz4780_bch_params *params, u8 *buf, 38 u8 *ecc_code); 39 40void jz4780_bch_release(struct jz4780_bch *bch); 41struct jz4780_bch *of_jz4780_bch_get(struct device_node *np); 42 43#endif /* __DRIVERS_MTD_NAND_JZ4780_BCH_H__ */