linux/drivers/mtd/chips/cfi_util.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Common Flash Interface support:
 *   Generic utility functions not dependent on command set
 *
 * Copyright (C) 2002 Red Hat
 * Copyright (C) 2003 STMicroelectronics Limited
 */

#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <asm/io.h>
#include <asm/byteorder.h>

#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/mtd/xip.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/map.h>
#include <linux/mtd/cfi.h>

void cfi_udelay(int us)
{}
EXPORT_SYMBOL();

/*
 * Returns the command address according to the given geometry.
 */
uint32_t cfi_build_cmd_addr(uint32_t cmd_ofs,
				struct map_info *map, struct cfi_private *cfi)
{}
EXPORT_SYMBOL();

/*
 * Transforms the CFI command for the given geometry (bus width & interleave).
 * It looks too long to be inline, but in the common case it should almost all
 * get optimised away.
 */
map_word cfi_build_cmd(u_long cmd, struct map_info *map, struct cfi_private *cfi)
{}
EXPORT_SYMBOL();

unsigned long cfi_merge_status(map_word val, struct map_info *map,
					   struct cfi_private *cfi)
{}
EXPORT_SYMBOL();

/*
 * Sends a CFI command to a bank of flash for the given geometry.
 *
 * Returns the offset in flash where the command was written.
 * If prev_val is non-null, it will be set to the value at the command address,
 * before the command was written.
 */
uint32_t cfi_send_gen_cmd(u_char cmd, uint32_t cmd_addr, uint32_t base,
				struct map_info *map, struct cfi_private *cfi,
				int type, map_word *prev_val)
{}
EXPORT_SYMBOL();

int __xipram cfi_qry_present(struct map_info *map, __u32 base,
			     struct cfi_private *cfi)
{}
EXPORT_SYMBOL_GPL();

int __xipram cfi_qry_mode_on(uint32_t base, struct map_info *map,
			     struct cfi_private *cfi)
{}
EXPORT_SYMBOL_GPL();

void __xipram cfi_qry_mode_off(uint32_t base, struct map_info *map,
			       struct cfi_private *cfi)
{}
EXPORT_SYMBOL_GPL();

struct cfi_extquery *
__xipram cfi_read_pri(struct map_info *map, __u16 adr, __u16 size, const char* name)
{}

EXPORT_SYMBOL();

void cfi_fixup(struct mtd_info *mtd, struct cfi_fixup *fixups)
{}

EXPORT_SYMBOL();

int cfi_varsize_frob(struct mtd_info *mtd, varsize_frob_t frob,
				     loff_t ofs, size_t len, void *thunk)
{}

EXPORT_SYMBOL();

MODULE_DESCRIPTION();
MODULE_LICENSE();