__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ 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 */
/* Primary function overlay window definitions
 * and service functions used by LPDDR chips
 */
#ifndef __LINUX_MTD_PFOW_H
#define __LINUX_MTD_PFOW_H

#include <linux/mtd/qinfo.h>

/* PFOW registers addressing */
/* Address of symbol "P" */
#define PFOW_QUERY_STRING_P			0x0000
/* Address of symbol "F" */
#define PFOW_QUERY_STRING_F			0x0002
/* Address of symbol "O" */
#define PFOW_QUERY_STRING_O			0x0004
/* Address of symbol "W" */
#define PFOW_QUERY_STRING_W			0x0006
/* Identification info for LPDDR chip */
#define PFOW_MANUFACTURER_ID			0x0020
#define PFOW_DEVICE_ID				0x0022
/* Address in PFOW where prog buffer can be found */
#define PFOW_PROGRAM_BUFFER_OFFSET		0x0040
/* Size of program buffer in words */
#define PFOW_PROGRAM_BUFFER_SIZE		0x0042
/* Address command code register */
#define PFOW_COMMAND_CODE			0x0080
/* command data register */
#define PFOW_COMMAND_DATA			0x0084
/* command address register lower address bits */
#define PFOW_COMMAND_ADDRESS_L			0x0088
/* command address register upper address bits */
#define PFOW_COMMAND_ADDRESS_H			0x008a
/* number of bytes to be proggrammed lower address bits */
#define PFOW_DATA_COUNT_L			0x0090
/* number of bytes to be proggrammed higher address bits */
#define PFOW_DATA_COUNT_H			0x0092
/* command execution register, the only possible value is 0x01 */
#define PFOW_COMMAND_EXECUTE			0x00c0
/* 0x01 should be written at this address to clear buffer */
#define PFOW_CLEAR_PROGRAM_BUFFER		0x00c4
/* device program/erase suspend register */
#define PFOW_PROGRAM_ERASE_SUSPEND		0x00c8
/* device status register */
#define PFOW_DSR				0x00cc

/* LPDDR memory device command codes */
/* They are possible values of PFOW command code register */
#define LPDDR_WORD_PROGRAM		0x0041
#define LPDDR_BUFF_PROGRAM		0x00E9
#define LPDDR_BLOCK_ERASE		0x0020
#define LPDDR_LOCK_BLOCK		0x0061
#define LPDDR_UNLOCK_BLOCK		0x0062
#define LPDDR_READ_BLOCK_LOCK_STATUS	0x0065
#define LPDDR_INFO_QUERY		0x0098
#define LPDDR_READ_OTP			0x0097
#define LPDDR_PROG_OTP			0x00C0
#define LPDDR_RESUME			0x00D0

/* Defines possible value of PFOW command execution register */
#define LPDDR_START_EXECUTION			0x0001

/* Defines possible value of PFOW program/erase suspend register */
#define LPDDR_SUSPEND				0x0001

/* Possible values of PFOW device status register */
/* access R - read; RC read & clearable */
#define DSR_DPS			(1<<1) /* RC; device protect status
					* 0 - not protected 1 - locked */
#define DSR_PSS			(1<<2) /* R; program suspend status;
					* 0-prog in progress/completed,
					* 1- prog suspended */
#define DSR_VPPS		(1<<3) /* RC; 0-Vpp OK, * 1-Vpp low */
#define DSR_PROGRAM_STATUS	(1<<4) /* RC; 0-successful, 1-error */
#define DSR_ERASE_STATUS	(1<<5) /* RC; erase or blank check status;
					* 0-success erase/blank check,
					* 1 blank check error */
#define DSR_ESS			(1<<6) /* R; erase suspend status;
					* 0-erase in progress/complete,
					* 1 erase suspended */
#define DSR_READY_STATUS	(1<<7) /* R; Device status
					* 0-busy,
					* 1-ready */
#define DSR_RPS			(0x3<<8) /* RC;  region program status
					* 00 - Success,
					* 01-re-program attempt in region with
					* object mode data,
					* 10-object mode program w attempt in
					* region with control mode data
					* 11-attempt to program invalid half
					* with 0x41 command */
#define DSR_AOS			(1<<12) /* RC; 1- AO related failure */
#define DSR_AVAILABLE		(1<<15) /* R; Device availbility
					* 1 - Device available
					* 0 - not available */

/* The superset of all possible error bits in DSR */
#define DSR_ERR			0x133A

static inline void send_pfow_command(struct map_info *map,
				unsigned long cmd_code, unsigned long adr,
				unsigned long len, map_word *datum)
{
	int bits_per_chip = map_bankwidth(map) * 8;

	map_write(map, CMD(cmd_code), map->pfow_base + PFOW_COMMAND_CODE);
	map_write(map, CMD(adr & ((1<<bits_per_chip) - 1)),
				map->pfow_base + PFOW_COMMAND_ADDRESS_L);
	map_write(map, CMD(adr>>bits_per_chip),
				map->pfow_base + PFOW_COMMAND_ADDRESS_H);
	if (len) {
		map_write(map, CMD(len & ((1<<bits_per_chip) - 1)),
					map->pfow_base + PFOW_DATA_COUNT_L);
		map_write(map, CMD(len>>bits_per_chip),
					map->pfow_base + PFOW_DATA_COUNT_H);
	}
	if (datum)
		map_write(map, *datum, map->pfow_base + PFOW_COMMAND_DATA);

	/* Command execution start */
	map_write(map, CMD(LPDDR_START_EXECUTION),
			map->pfow_base + PFOW_COMMAND_EXECUTE);
}
#endif /* __LINUX_MTD_PFOW_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