__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright © 2000-2010 David Woodhouse <[email protected]>
 *			 Steven J. Hill <[email protected]>
 *			 Thomas Gleixner <[email protected]>
 *
 * Contains all ONFI related definitions
 */

#ifndef __LINUX_MTD_ONFI_H
#define __LINUX_MTD_ONFI_H

#include <linux/types.h>
#include <linux/bitfield.h>

/* ONFI version bits */
#define ONFI_VERSION_1_0		BIT(1)
#define ONFI_VERSION_2_0		BIT(2)
#define ONFI_VERSION_2_1		BIT(3)
#define ONFI_VERSION_2_2		BIT(4)
#define ONFI_VERSION_2_3		BIT(5)
#define ONFI_VERSION_3_0		BIT(6)
#define ONFI_VERSION_3_1		BIT(7)
#define ONFI_VERSION_3_2		BIT(8)
#define ONFI_VERSION_4_0		BIT(9)

/* ONFI features */
#define ONFI_FEATURE_16_BIT_BUS		BIT(0)
#define ONFI_FEATURE_NV_DDR		BIT(5)
#define ONFI_FEATURE_EXT_PARAM_PAGE	BIT(7)

/* ONFI timing mode, used in both asynchronous and synchronous mode */
#define ONFI_DATA_INTERFACE_SDR		0
#define ONFI_DATA_INTERFACE_NVDDR	BIT(4)
#define ONFI_DATA_INTERFACE_NVDDR2	BIT(5)
#define ONFI_TIMING_MODE_0		BIT(0)
#define ONFI_TIMING_MODE_1		BIT(1)
#define ONFI_TIMING_MODE_2		BIT(2)
#define ONFI_TIMING_MODE_3		BIT(3)
#define ONFI_TIMING_MODE_4		BIT(4)
#define ONFI_TIMING_MODE_5		BIT(5)
#define ONFI_TIMING_MODE_UNKNOWN	BIT(6)
#define ONFI_TIMING_MODE_PARAM(x)	FIELD_GET(GENMASK(3, 0), (x))

/* ONFI feature number/address */
#define ONFI_FEATURE_NUMBER		256
#define ONFI_FEATURE_ADDR_TIMING_MODE	0x1

/* Vendor-specific feature address (Micron) */
#define ONFI_FEATURE_ADDR_READ_RETRY	0x89
#define ONFI_FEATURE_ON_DIE_ECC		0x90
#define   ONFI_FEATURE_ON_DIE_ECC_EN	BIT(3)

/* ONFI subfeature parameters length */
#define ONFI_SUBFEATURE_PARAM_LEN	4

/* ONFI optional commands SET/GET FEATURES supported? */
#define ONFI_OPT_CMD_READ_CACHE		BIT(1)
#define ONFI_OPT_CMD_SET_GET_FEATURES	BIT(2)

struct nand_onfi_params {
	/* rev info and features block */
	/* 'O' 'N' 'F' 'I'  */
	u8 sig[4];
	__le16 revision;
	__le16 features;
	__le16 opt_cmd;
	u8 reserved0[2];
	__le16 ext_param_page_length; /* since ONFI 2.1 */
	u8 num_of_param_pages;        /* since ONFI 2.1 */
	u8 reserved1[17];

	/* manufacturer information block */
	char manufacturer[12];
	char model[20];
	u8 jedec_id;
	__le16 date_code;
	u8 reserved2[13];

	/* memory organization block */
	__le32 byte_per_page;
	__le16 spare_bytes_per_page;
	__le32 data_bytes_per_ppage;
	__le16 spare_bytes_per_ppage;
	__le32 pages_per_block;
	__le32 blocks_per_lun;
	u8 lun_count;
	u8 addr_cycles;
	u8 bits_per_cell;
	__le16 bb_per_lun;
	__le16 block_endurance;
	u8 guaranteed_good_blocks;
	__le16 guaranteed_block_endurance;
	u8 programs_per_page;
	u8 ppage_attr;
	u8 ecc_bits;
	u8 interleaved_bits;
	u8 interleaved_ops;
	u8 reserved3[13];

	/* electrical parameter block */
	u8 io_pin_capacitance_max;
	__le16 sdr_timing_modes;
	__le16 program_cache_timing_mode;
	__le16 t_prog;
	__le16 t_bers;
	__le16 t_r;
	__le16 t_ccs;
	u8 nvddr_timing_modes;
	u8 nvddr2_timing_modes;
	u8 nvddr_nvddr2_features;
	__le16 clk_pin_capacitance_typ;
	__le16 io_pin_capacitance_typ;
	__le16 input_pin_capacitance_typ;
	u8 input_pin_capacitance_max;
	u8 driver_strength_support;
	__le16 t_int_r;
	__le16 t_adl;
	u8 reserved4[8];

	/* vendor */
	__le16 vendor_revision;
	u8 vendor[88];

	__le16 crc;
} __packed;

#define ONFI_CRC_BASE	0x4F4E

/* Extended ECC information Block Definition (since ONFI 2.1) */
struct onfi_ext_ecc_info {
	u8 ecc_bits;
	u8 codeword_size;
	__le16 bb_per_lun;
	__le16 block_endurance;
	u8 reserved[2];
} __packed;

#define ONFI_SECTION_TYPE_0	0	/* Unused section. */
#define ONFI_SECTION_TYPE_1	1	/* for additional sections. */
#define ONFI_SECTION_TYPE_2	2	/* for ECC information. */
struct onfi_ext_section {
	u8 type;
	u8 length;
} __packed;

#define ONFI_EXT_SECTION_MAX 8

/* Extended Parameter Page Definition (since ONFI 2.1) */
struct onfi_ext_param_page {
	__le16 crc;
	u8 sig[4];             /* 'E' 'P' 'P' 'S' */
	u8 reserved0[10];
	struct onfi_ext_section sections[ONFI_EXT_SECTION_MAX];

	/*
	 * The actual size of the Extended Parameter Page is in
	 * @ext_param_page_length of nand_onfi_params{}.
	 * The following are the variable length sections.
	 * So we do not add any fields below. Please see the ONFI spec.
	 */
} __packed;

/**
 * struct onfi_params - ONFI specific parameters that will be reused
 * @version: ONFI version (BCD encoded), 0 if ONFI is not supported
 * @tPROG: Page program time
 * @tBERS: Block erase time
 * @tR: Page read time
 * @tCCS: Change column setup time
 * @fast_tCAD: Command/Address/Data slow or fast delay (NV-DDR only)
 * @sdr_timing_modes: Supported asynchronous/SDR timing modes
 * @nvddr_timing_modes: Supported source synchronous/NV-DDR timing modes
 * @vendor_revision: Vendor specific revision number
 * @vendor: Vendor specific data
 */
struct onfi_params {
	int version;
	u16 tPROG;
	u16 tBERS;
	u16 tR;
	u16 tCCS;
	bool fast_tCAD;
	u16 sdr_timing_modes;
	u16 nvddr_timing_modes;
	u16 vendor_revision;
	u8 vendor[88];
};

#endif /* __LINUX_MTD_ONFI_H */

Filemanager

Name Type Size Permission Actions
bbm.h File 4.71 KB 0644
blktrans.h File 2.62 KB 0644
cfi.h File 9.89 KB 0644
cfi_endian.h File 1.48 KB 0644
concat.h File 493 B 0644
doc2000.h File 5.38 KB 0644
flashchip.h File 2.44 KB 0644
ftl.h File 2.49 KB 0644
gen_probe.h File 615 B 0644
hyperbus.h File 2.83 KB 0644
inftl.h File 1.56 KB 0644
jedec.h File 1.93 KB 0644
lpc32xx_mlc.h File 348 B 0644
lpc32xx_slc.h File 348 B 0644
map.h File 12.71 KB 0644
mtd.h File 22.3 KB 0644
mtdram.h File 257 B 0644
nand-ecc-mtk.h File 1.18 KB 0644
nand-ecc-mxic.h File 1.32 KB 0644
nand-ecc-sw-bch.h File 2.07 KB 0644
nand-ecc-sw-hamming.h File 2.65 KB 0644
nand-gpio.h File 330 B 0644
nand-qpic-common.h File 14.06 KB 0644
nand.h File 33.59 KB 0644
ndfc.h File 2.02 KB 0644
nftl.h File 1.69 KB 0644
onenand.h File 7.79 KB 0644
onenand_regs.h File 7.05 KB 0644
onfi.h File 4.88 KB 0644
partitions.h File 3.85 KB 0644
pfow.h File 4.38 KB 0644
physmap.h File 808 B 0644
pismo.h File 271 B 0644
plat-ram.h File 668 B 0644
platnand.h File 2.49 KB 0644
qinfo.h File 2.49 KB 0644
rawnand.h File 52.65 KB 0644
sh_flctl.h File 5.79 KB 0644
sharpsl.h File 485 B 0644
spear_smi.h File 1.67 KB 0644
spi-nor.h File 16.34 KB 0644
spinand.h File 19.25 KB 0644
super.h File 578 B 0644
ubi.h File 9.79 KB 0644
xip.h File 2.5 KB 0644
Filemanager