#include <linux/mtd/pfow.h>
#include <linux/mtd/qinfo.h>
#include <linux/slab.h>
#include <linux/module.h>
static int lpddr_read(struct mtd_info *mtd, loff_t adr, size_t len,
size_t *retlen, u_char *buf);
static int lpddr_write_buffers(struct mtd_info *mtd, loff_t to,
size_t len, size_t *retlen, const u_char *buf);
static int lpddr_writev(struct mtd_info *mtd, const struct kvec *vecs,
unsigned long count, loff_t to, size_t *retlen);
static int lpddr_erase(struct mtd_info *mtd, struct erase_info *instr);
static int lpddr_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
static int lpddr_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
static int lpddr_point(struct mtd_info *mtd, loff_t adr, size_t len,
size_t *retlen, void **mtdbuf, resource_size_t *phys);
static int lpddr_unpoint(struct mtd_info *mtd, loff_t adr, size_t len);
static int get_chip(struct map_info *map, struct flchip *chip, int mode);
static int chip_ready(struct map_info *map, struct flchip *chip, int mode);
static void put_chip(struct map_info *map, struct flchip *chip);
struct mtd_info *lpddr_cmdset(struct map_info *map)
{ … }
EXPORT_SYMBOL(…);
static void print_drs_error(unsigned int dsr)
{ … }
static int wait_for_ready(struct map_info *map, struct flchip *chip,
unsigned int chip_op_time)
{ … }
static int get_chip(struct map_info *map, struct flchip *chip, int mode)
{ … }
static int chip_ready(struct map_info *map, struct flchip *chip, int mode)
{ … }
static void put_chip(struct map_info *map, struct flchip *chip)
{ … }
static int do_write_buffer(struct map_info *map, struct flchip *chip,
unsigned long adr, const struct kvec **pvec,
unsigned long *pvec_seek, int len)
{ … }
static int do_erase_oneblock(struct mtd_info *mtd, loff_t adr)
{ … }
static int lpddr_read(struct mtd_info *mtd, loff_t adr, size_t len,
size_t *retlen, u_char *buf)
{ … }
static int lpddr_point(struct mtd_info *mtd, loff_t adr, size_t len,
size_t *retlen, void **mtdbuf, resource_size_t *phys)
{ … }
static int lpddr_unpoint (struct mtd_info *mtd, loff_t adr, size_t len)
{ … }
static int lpddr_write_buffers(struct mtd_info *mtd, loff_t to, size_t len,
size_t *retlen, const u_char *buf)
{ … }
static int lpddr_writev(struct mtd_info *mtd, const struct kvec *vecs,
unsigned long count, loff_t to, size_t *retlen)
{ … }
static int lpddr_erase(struct mtd_info *mtd, struct erase_info *instr)
{ … }
#define DO_XXLOCK_LOCK …
#define DO_XXLOCK_UNLOCK …
static int do_xxlock(struct mtd_info *mtd, loff_t adr, uint32_t len, int thunk)
{ … }
static int lpddr_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
{ … }
static int lpddr_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
{ … }
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;