linux/drivers/mtd/devices/phram.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) ????		Jochen Schäuble <[email protected]>
 * Copyright (c) 2003-2004	Joern Engel <[email protected]>
 *
 * Usage:
 *
 * one commend line parameter per device, each in the form:
 *   phram=<name>,<start>,<len>[,<erasesize>]
 * <name> may be up to 63 characters.
 * <start>, <len>, and <erasesize> can be octal, decimal or hexadecimal.  If followed
 * by "ki", "Mi" or "Gi", the numbers will be interpreted as kilo, mega or
 * gigabytes. <erasesize> is optional and defaults to PAGE_SIZE.
 *
 * Example:
 *	phram=swap,64Mi,128Mi phram=test,900Mi,1Mi,64Ki
 */

#define pr_fmt(fmt)

#include <linux/io.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/slab.h>
#include <linux/mtd/mtd.h>
#include <asm/div64.h>
#include <linux/platform_device.h>
#include <linux/of_address.h>
#include <linux/of.h>

struct phram_mtd_list {};

static LIST_HEAD(phram_list);

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

static int phram_point(struct mtd_info *mtd, loff_t from, size_t len,
		size_t *retlen, void **virt, resource_size_t *phys)
{}

static int phram_unpoint(struct mtd_info *mtd, loff_t from, size_t len)
{}

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

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

static int phram_map(struct phram_mtd_list *phram, phys_addr_t start, size_t len)
{}

static void phram_unmap(struct phram_mtd_list *phram)
{}

static void unregister_devices(void)
{}

static int register_device(struct platform_device *pdev, const char *name,
			   phys_addr_t start, size_t len, uint32_t erasesize)
{}

static int parse_num64(uint64_t *num64, char *token)
{}

static int parse_name(char **pname, const char *token)
{}


static inline void kill_final_newline(char *str)
{}


#define parse_err(fmt, args...)

#ifndef MODULE
static int phram_init_called;
/*
 * This shall contain the module parameter if any. It is of the form:
 * - phram=<device>,<address>,<size>[,<erasesize>] for module case
 * - phram.phram=<device>,<address>,<size>[,<erasesize>] for built-in case
 * We leave 64 bytes for the device name, 20 for the address , 20 for the
 * size and 20 for the erasesize.
 * Example: phram.phram=rootfs,0xa0000000,512Mi,65536
 */
static char phram_paramline[64 + 20 + 20 + 20];
#endif

static int phram_setup(const char *val)
{}

static int phram_param_call(const char *val, const struct kernel_param *kp)
{}

module_param_call();
MODULE_PARM_DESC();

#ifdef CONFIG_OF
static const struct of_device_id phram_of_match[] =;
MODULE_DEVICE_TABLE(of, phram_of_match);
#endif

static int phram_probe(struct platform_device *pdev)
{}

static void phram_remove(struct platform_device *pdev)
{}

static struct platform_driver phram_driver =;

static int __init init_phram(void)
{}

static void __exit cleanup_phram(void)
{}

module_init();
module_exit(cleanup_phram);

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