#include <linux/bitops.h>
#include <linux/device.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include "ingenic_ecc.h"
#define BCH_BHCR …
#define BCH_BHCSR …
#define BCH_BHCCR …
#define BCH_BHCNT …
#define BCH_BHDR …
#define BCH_BHPAR0 …
#define BCH_BHERR0 …
#define BCH_BHINT …
#define BCH_BHINTES …
#define BCH_BHINTEC …
#define BCH_BHINTE …
#define BCH_BHCR_ENCE …
#define BCH_BHCR_BSEL …
#define BCH_BHCR_INIT …
#define BCH_BHCR_BCHE …
#define BCH_BHCNT_DEC_COUNT_SHIFT …
#define BCH_BHCNT_DEC_COUNT_MASK …
#define BCH_BHCNT_ENC_COUNT_SHIFT …
#define BCH_BHCNT_ENC_COUNT_MASK …
#define BCH_BHERR_INDEX0_SHIFT …
#define BCH_BHERR_INDEX0_MASK …
#define BCH_BHERR_INDEX1_SHIFT …
#define BCH_BHERR_INDEX1_MASK …
#define BCH_BHINT_ERRC_SHIFT …
#define BCH_BHINT_ERRC_MASK …
#define BCH_BHINT_TERRC_SHIFT …
#define BCH_BHINT_TERRC_MASK …
#define BCH_BHINT_ALL_0 …
#define BCH_BHINT_ALL_F …
#define BCH_BHINT_DECF …
#define BCH_BHINT_ENCF …
#define BCH_BHINT_UNCOR …
#define BCH_BHINT_ERR …
#define BCH_TIMEOUT_US …
static inline void jz4725b_bch_config_set(struct ingenic_ecc *bch, u32 cfg)
{ … }
static inline void jz4725b_bch_config_clear(struct ingenic_ecc *bch, u32 cfg)
{ … }
static int jz4725b_bch_reset(struct ingenic_ecc *bch,
struct ingenic_ecc_params *params, bool calc_ecc)
{ … }
static void jz4725b_bch_disable(struct ingenic_ecc *bch)
{ … }
static void jz4725b_bch_write_data(struct ingenic_ecc *bch, const u8 *buf,
size_t size)
{ … }
static void jz4725b_bch_read_parity(struct ingenic_ecc *bch, u8 *buf,
size_t size)
{ … }
static int jz4725b_bch_wait_complete(struct ingenic_ecc *bch, unsigned int irq,
u32 *status)
{ … }
static int jz4725b_calculate(struct ingenic_ecc *bch,
struct ingenic_ecc_params *params,
const u8 *buf, u8 *ecc_code)
{ … }
static int jz4725b_correct(struct ingenic_ecc *bch,
struct ingenic_ecc_params *params,
u8 *buf, u8 *ecc_code)
{ … }
static const struct ingenic_ecc_ops jz4725b_bch_ops = …;
static const struct of_device_id jz4725b_bch_dt_match[] = …;
MODULE_DEVICE_TABLE(of, jz4725b_bch_dt_match);
static struct platform_driver jz4725b_bch_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;