linux/drivers/mtd/mtdconcat.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * MTD device concatenation layer
 *
 * Copyright © 2002 Robert Kaiser <[email protected]>
 * Copyright © 2002-2010 David Woodhouse <[email protected]>
 *
 * NAND support by Christian Gan <[email protected]>
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/sched.h>
#include <linux/types.h>
#include <linux/backing-dev.h>

#include <linux/mtd/mtd.h>
#include <linux/mtd/concat.h>

#include <asm/div64.h>

/*
 * Our storage structure:
 * Subdev points to an array of pointers to struct mtd_info objects
 * which is allocated along with this structure
 *
 */
struct mtd_concat {};

/*
 * how to calculate the size required for the above structure,
 * including the pointer array subdev points to:
 */
#define SIZEOF_STRUCT_MTD_CONCAT(num_subdev)

/*
 * Given a pointer to the MTD object in the mtd_concat structure,
 * we can retrieve the pointer to that structure with this macro.
 */
#define CONCAT(x)

/*
 * MTD methods which look up the relevant subdevice, translate the
 * effective address and pass through to the subdevice.
 */

static int
concat_read(struct mtd_info *mtd, loff_t from, size_t len,
	    size_t * retlen, u_char * buf)
{}

static int
concat_panic_write(struct mtd_info *mtd, loff_t to, size_t len,
	     size_t * retlen, const u_char * buf)
{}


static int
concat_write(struct mtd_info *mtd, loff_t to, size_t len,
	     size_t * retlen, const u_char * buf)
{}

static int
concat_writev(struct mtd_info *mtd, const struct kvec *vecs,
		unsigned long count, loff_t to, size_t * retlen)
{}

static int
concat_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops)
{}

static int
concat_write_oob(struct mtd_info *mtd, loff_t to, struct mtd_oob_ops *ops)
{}

static int concat_erase(struct mtd_info *mtd, struct erase_info *instr)
{}

static int concat_xxlock(struct mtd_info *mtd, loff_t ofs, uint64_t len,
			 bool is_lock)
{}

static int concat_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
{}

static int concat_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
{}

static int concat_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len)
{}

static void concat_sync(struct mtd_info *mtd)
{}

static int concat_suspend(struct mtd_info *mtd)
{}

static void concat_resume(struct mtd_info *mtd)
{}

static int concat_block_isbad(struct mtd_info *mtd, loff_t ofs)
{}

static int concat_block_markbad(struct mtd_info *mtd, loff_t ofs)
{}

/*
 * This function constructs a virtual MTD device by concatenating
 * num_devs MTD devices. A pointer to the new device object is
 * stored to *new_dev upon success. This function does _not_
 * register any devices: this is the caller's responsibility.
 */
struct mtd_info *mtd_concat_create(struct mtd_info *subdev[],	/* subdevices to concatenate */
				   int num_devs,	/* number of subdevices      */
				   const char *name)
{}

/* Cleans the context obtained from mtd_concat_create() */
void mtd_concat_destroy(struct mtd_info *mtd)
{}

EXPORT_SYMBOL();
EXPORT_SYMBOL();

MODULE_LICENSE();
MODULE_AUTHOR();
MODULE_DESCRIPTION();