/Linux-v6.1/Documentation/driver-api/mmc/ |
D | mmc-dev-attrs.rst | 11 force_ro Enforce read-only access even if write protect switch is off. 17 All attributes are read-only. 34 erase_size Erase group size 35 preferred_erase_size Preferred erase size 36 raw_rpmb_size_mult RPMB partition size 45 Note on Erase Size and Preferred Erase Size: 47 "erase_size" is the minimum size, in bytes, of an erase 48 operation. For MMC, "erase_size" is the erase group size 50 to trim or secure trim operations where the minimum size is 52 if the card is block-addressed, 0 otherwise. [all …]
|
/Linux-v6.1/drivers/mtd/ |
D | mtdconcat.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 * Copyright © 2002-2010 David Woodhouse <dwmw2@infradead.org> 16 #include <linux/backing-dev.h> 36 * how to calculate the size required for the above structure, 61 for (i = 0; i < concat->num_subdev; i++) { in concat_read() 62 struct mtd_info *subdev = concat->subdev[i]; in concat_read() 63 size_t size, retsize; in concat_read() local 65 if (from >= subdev->size) { in concat_read() 67 size = 0; in concat_read() 68 from -= subdev->size; in concat_read() [all …]
|
D | mtdpstore.c | 1 // SPDX-License-Identifier: GPL-2.0 3 #define dev_fmt(fmt) "mtdoops-pstore: " fmt 30 struct mtd_info *mtd = cxt->mtd; in mtdpstore_block_isbad() 33 off = ALIGN_DOWN(off, mtd->erasesize); in mtdpstore_block_isbad() 34 blknum = div_u64(off, mtd->erasesize); in mtdpstore_block_isbad() 36 if (test_bit(blknum, cxt->badmap)) in mtdpstore_block_isbad() 40 dev_err(&mtd->dev, "mtd_block_isbad failed, aborting\n"); in mtdpstore_block_isbad() 43 set_bit(blknum, cxt->badmap); in mtdpstore_block_isbad() 52 struct mtd_info *mtd = cxt->mtd; in mtdpstore_panic_block_isbad() 55 off = ALIGN_DOWN(off, mtd->erasesize); in mtdpstore_panic_block_isbad() [all …]
|
D | mtdblock.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright © 1999-2010 David Woodhouse <dwmw2@infradead.org> 6 * Copyright © 2000-2003 Nicolas Pitre <nico@fluxnic.net> 38 * buffer cache can handle, we must implement read-modify-write on flash 39 * sectors for each block write requests. To avoid over-erasing flash sectors 47 struct erase_info erase; in erase_write() local 52 * First, let's erase the flash block. in erase_write() 54 erase.addr = pos; in erase_write() 55 erase.len = len; in erase_write() 57 ret = mtd_erase(mtd, &erase); in erase_write() [all …]
|
D | rfd_ftl.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * rfd_ftl.c -- resident flash disk (flash translation layer) 28 MODULE_PARM_DESC(block_size, "Block size to use by RFD, defaults to erase unit size"); 40 /* An erase unit should start with this value */ 74 u_int block_size; /* size of erase unit */ 75 u_int total_blocks; /* number of erase units */ 76 u_int header_sectors_per_block; /* header sectors in erase unit */ 77 u_int data_sectors_per_block; /* data sectors in erase unit */ 95 struct block *block = &part->blocks[block_no]; in build_block_map() 98 block->offset = part->block_size * block_no; in build_block_map() [all …]
|
D | mtdswap.c | 1 // SPDX-License-Identifier: GPL-2.0-only 11 * support and lock-less operation written by Adrian Hunter. 45 * Frequency value 6 means 1/6 of the GC passes will pick an erase block based 48 * The lower freq2 should be chosen so that it makes sure the maximum erase 50 * trying to make erase differences large. 59 #define BLOCK_ERROR (UINT_MAX - 1) 60 #define BLOCK_MAX (UINT_MAX - 2) 80 rb)->erase_count) 82 rb)->erase_count) 141 #define MTDSWAP_ERASE_RETRIES 3 /* Before marking erase block bad */ [all …]
|
D | mtdoops.c | 1 // SPDX-License-Identifier: GPL-2.0-only 23 /* Maximum MTD partition size */ 29 "record size for MTD OOPS pages in bytes (default 4096)"); 68 set_bit(page, cxt->oops_page_used); in mark_page_used() 73 clear_bit(page, cxt->oops_page_used); in mark_page_unused() 78 return test_bit(page, cxt->oops_page_used); in page_is_used() 83 struct mtd_info *mtd = cxt->mtd; in mtdoops_erase_block() 84 u32 start_page_offset = mtd_div_by_eb(offset, mtd) * mtd->erasesize; in mtdoops_erase_block() 86 u32 erase_pages = mtd->erasesize / record_size; in mtdoops_erase_block() 87 struct erase_info erase; in mtdoops_erase_block() local [all …]
|
/Linux-v6.1/drivers/mtd/spi-nor/ |
D | sfdp.c | 1 // SPDX-License-Identifier: GPL-2.0 10 #include <linux/mtd/spi-nor.h> 14 #define SFDP_PARAM_HEADER_ID(p) (((p)->id_msb << 8) | (p)->id_lsb) 16 (((p)->parameter_table_pointer[2] << 16) | \ 17 ((p)->parameter_table_pointer[1] << 8) | \ 18 ((p)->parameter_table_pointer[0] << 0)) 19 #define SFDP_PARAM_HEADER_PARAM_LEN(p) ((p)->length * 4) 23 #define SFDP_4BAIT_ID 0xff84 /* 4-byte Address Instruction Table */ 36 u8 nph; /* 0-base number of parameter headers */ 45 /* The Fast Read x-y-z hardware capability in params->hwcaps.mask. */ [all …]
|
D | core.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 192 * struct spi_nor_erase_type - Structure to describe a SPI NOR erase type 193 * @size: the size of the sector/block erased by the erase type. 194 * JEDEC JESD216B imposes erase sizes to be a power of 2. 195 * @size_shift: @size is a power of 2, the shift is stored in 197 * @size_mask: the size mask based on @size_shift. 198 * @opcode: the SPI command op code to erase the sector/block. 199 * @idx: Erase Type index as sorted in the Basic Flash Parameter 201 * Erase Types with the ones identified in the SFDP 205 u32 size; member [all …]
|
D | core.c | 1 // SPDX-License-Identifier: GPL-2.0 23 #include <linux/mtd/spi-nor.h> 30 * For everything but full-chip erase; probably could be much smaller, but kept 36 * For full-chip erase, calibrated to a 2MB flash (M25P16); should be scaled up 47 * spi_nor_get_cmd_ext() - Get the command opcode extension based on the 60 switch (nor->cmd_ext_type) { in spi_nor_get_cmd_ext() 62 return ~op->cmd.opcode; in spi_nor_get_cmd_ext() 65 return op->cmd.opcode; in spi_nor_get_cmd_ext() 68 dev_err(nor->dev, "Unknown command extension type\n"); in spi_nor_get_cmd_ext() 74 * spi_nor_spimem_setup_op() - Set up common properties of a spi-mem op. [all …]
|
/Linux-v6.1/drivers/net/wwan/iosm/ |
D | iosm_ipc_flash.h | 1 /* SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2020-2021 Intel Corporation. 9 /* Buffer size used to read the fls image */ 11 /* Full erase start address */ 13 /* Erase length for NAND flash */ 15 /* EBL response Header size */ 17 /* EBL payload size */ 19 /* Total EBL pack size */ 21 /* EBL payload size */ 23 /* Total EBL pack size */ [all …]
|
D | iosm_ipc_flash.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2020-2021 Intel Corporation. 21 return -EINVAL; in ipc_flash_proc_format_ebl_pack() 23 flash_req->pack_id = cpu_to_le16(pack_id); in ipc_flash_proc_format_ebl_pack() 24 flash_req->msg_length = cpu_to_le32(payload_length); in ipc_flash_proc_format_ebl_pack() 31 flash_req->checksum = cpu_to_le16(checksum); in ipc_flash_proc_format_ebl_pack() 47 if (!err_info->error[i].error_code) { in ipc_flash_proc_check_ebl_rsp() 49 err_info->error[i].error_class, in ipc_flash_proc_check_ebl_rsp() 50 err_info->error[i].error_code); in ipc_flash_proc_check_ebl_rsp() 53 return -EINVAL; in ipc_flash_proc_check_ebl_rsp() [all …]
|
D | iosm_ipc_devlink.h | 1 /* SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2020-2021 Intel Corporation. 23 /* Reserve header size */ 25 /* Devlink Image Header size */ 29 /* EBL response size */ 35 /* Default Coredump file size */ 44 * enum iosm_devlink_param_id - Enum type to different devlink params 46 * @IOSM_DEVLINK_PARAM_ID_ERASE_FULL_FLASH: Set if full erase required 55 * enum iosm_rpsi_cmd_code - Enum type for RPSI command list 58 * file size info from PSI [all …]
|
/Linux-v6.1/drivers/mtd/chips/ |
D | cfi_util.c | 45 unsigned type = cfi->device_type; in cfi_build_cmd_addr() 89 /* First, determine what the bit-pattern should be for a single in cfi_build_cmd() 104 /* Now replicate it across the size of an unsigned long, or in cfi_build_cmd() 123 /* And finally, for the multi-word case, replicate it in cfi_build_cmd() 179 /* Last, determine what the bit-pattern should be for a single in cfi_merge_status() 200 * If prev_val is non-null, it will be set to the value at the command address, 216 return addr - base; in cfi_send_gen_cmd() 223 int osf = cfi->interleave * cfi->device_type; /* scale factor */ in cfi_qry_present() 251 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); in cfi_qry_mode_on() 252 cfi_send_gen_cmd(0x98, 0x55, base, map, cfi, cfi->device_type, NULL); in cfi_qry_mode_on() [all …]
|
D | cfi_cmdset_0020.c | 8 * - completely revamped method functions so they are aware and 10 * - scalability vs code size is completely set at compile-time 12 * - optimized write buffer method 13 * 06/21/2002 Joern Engel <joern@wh.fh-wedel.de> and others 14 * - modified Intel Command Set 0x0001 to support ST Advanced Architecture 16 * - added a writev function 17 * 07/13/2005 Joern Engel <joern@wh.fh-wedel.de> 18 * - Plugged memory leak in cfi_staa_writev(). 68 printk(" Feature/Command Support: %4.4X\n", extp->FeatureSupport); in cfi_tell_features() 69 printk(" - Chip Erase: %s\n", extp->FeatureSupport&1?"supported":"unsupported"); in cfi_tell_features() [all …]
|
/Linux-v6.1/drivers/mtd/devices/ |
D | powernv_flash.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 42 * Don't return -ERESTARTSYS if we can't get a token, the MTD core 49 struct powernv_flash *info = (struct powernv_flash *)mtd->priv; in powernv_flash_async_op() 50 struct device *dev = &mtd->dev; in powernv_flash_async_op() 60 if (token != -ERESTARTSYS) in powernv_flash_async_op() 63 token = -EINTR; in powernv_flash_async_op() 69 rc = opal_flash_read(info->id, offset, __pa(buf), len, token); in powernv_flash_async_op() 72 rc = opal_flash_write(info->id, offset, __pa(buf), len, token); in powernv_flash_async_op() 75 rc = opal_flash_erase(info->id, offset, len, token); in powernv_flash_async_op() 80 return -EIO; in powernv_flash_async_op() [all …]
|
D | lart.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * MTD driver for the 28F160F3 Flash Memory (non-CFI) on LART. 13 * - Order Number: 290644-005 14 * - January 2000 17 * - http://www.linux-mtd.infradead.org/ 70 #define BUSWIDTH 4 /* don't change this - a lot of the code _will_ break if you change this */ 71 #define FLASH_OFFSET 0xe8000000 /* see linux/arch/arm/mach-sa1100/lart.c */ 93 #define ERASE_SETUP 0x00200020 /* Block Erase */ 94 #define ERASE_CONFIRM 0x00D000D0 /* Block Erase and Program Resume */ 99 #define STATUS_ERASE_ERR 0x00200020 /* Erase Status (ES) */ [all …]
|
/Linux-v6.1/drivers/misc/eeprom/ |
D | eeprom_93xx46.c | 1 // SPDX-License-Identifier: GPL-2.0-only 20 #include <linux/nvmem-provider.h> 65 int size; member 70 return edev->pdata->quirks & EEPROM_93XX46_QUIRK_SINGLE_WORD_READ; in has_quirk_single_word_read() 75 return edev->pdata->quirks & EEPROM_93XX46_QUIRK_INSTRUCTION_LENGTH; in has_quirk_instruction_length() 80 return edev->pdata->quirks & EEPROM_93XX46_QUIRK_EXTRA_READ_CYCLE; in has_quirk_extra_read_cycle() 91 if (unlikely(off >= edev->size)) in eeprom_93xx46_read() 93 if ((off + count) > edev->size) in eeprom_93xx46_read() 94 count = edev->size - off; in eeprom_93xx46_read() 98 mutex_lock(&edev->lock); in eeprom_93xx46_read() [all …]
|
/Linux-v6.1/include/uapi/linux/ |
D | virtio_blk.h | 34 #define VIRTIO_BLK_F_SIZE_MAX 1 /* Indicates maximum segment size */ 37 #define VIRTIO_BLK_F_RO 5 /* Disk is read-only */ 38 #define VIRTIO_BLK_F_BLK_SIZE 6 /* Block size of disk is available*/ 43 #define VIRTIO_BLK_F_SECURE_ERASE 16 /* Secure Erase is supported */ 60 /* The capacity (in 512-byte sectors). */ 62 /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */ 73 /* block size of device (if VIRTIO_BLK_F_BLK_SIZE) */ 81 /* minimum I/O size without performance penalty in logical blocks. */ 83 /* optimal sustained I/O size in logical blocks. */ 95 * The maximum discard sectors (in 512-byte sectors) for [all …]
|
/Linux-v6.1/include/linux/ |
D | pstore_zone.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 12 * struct pstore_zone_info - pstore/zone back-end driver structure 14 * @owner: Module which is responsible for this back-end driver. 15 * @name: Name of the back-end driver. 16 * @total_size: The total size in bytes pstore/zone can use. It must be greater 18 * @kmsg_size: The size of oops/panic zone. Zero means disabled, otherwise, 21 * @pmsg_size: The size of pmsg zone which is the same as @kmsg_size. 22 * @console_size:The size of console zone which is the same as @kmsg_size. 23 * @ftrace_size:The size of ftrace zone which is the same as @kmsg_size. 25 * @size and @offset are relative value to storage. [all …]
|
/Linux-v6.1/drivers/mtd/ubi/ |
D | ubi-media.h | 1 /* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */ 10 * This file defines the layout of UBI headers and all the other UBI on-flash 22 /* The highest erase counter value supported by this implementation */ 28 /* Erase counter header magic number (ASCII "UBI#") */ 47 * @UBI_VTBL_AUTORESIZE_FLG: auto-resize this volume 51 * check. Main use-case for this flag is 52 * boot-time reduction 55 * table. UBI automatically re-sizes the volume which has this flag and makes 56 * the volume to be of largest possible size. This means that if after the 66 * The auto-resize feature is useful for device production purposes. For [all …]
|
/Linux-v6.1/include/linux/mtd/ |
D | qinfo.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 14 * @ManufactId - Chip Manufacture ID 15 * @DevId - Chip Device ID 16 * @qinfo - pointer to qinfo records describing the chip 17 * @numchips - number of chips including virual RWW partitions 18 * @chipshift - Chip/partition size 2^chipshift 19 * @chips - per-chip data structure 32 * @major - major number of qinfo record 33 * @major - minor number of qinfo record 34 * @id_str - descriptive string to access the record [all …]
|
D | pfow.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 24 /* Size of program buffer in words */ 42 /* device program/erase suspend register */ 63 /* Defines possible value of PFOW program/erase suspend register */ 67 /* access R - read; RC read & clearable */ 69 * 0 - not protected 1 - locked */ 71 * 0-prog in progress/completed, 72 * 1- prog suspended */ 73 #define DSR_VPPS (1<<3) /* RC; 0-Vpp OK, * 1-Vpp low */ 74 #define DSR_PROGRAM_STATUS (1<<4) /* RC; 0-successful, 1-error */ [all …]
|
/Linux-v6.1/kernel/ |
D | stackleak.c | 1 // SPDX-License-Identifier: GPL-2.0 31 table->data = &state; in stack_erasing_sysctl() 32 table->maxlen = sizeof(int); in stack_erasing_sysctl() 80 current->lowest_stack); in __stackleak_erase() 83 current->prev_lowest_stack = erase_low; in __stackleak_erase() 91 * stack) we can erase everything below the pt_regs at the top of the in __stackleak_erase() 96 * function has a fixed-size stack frame, and the current stack pointer in __stackleak_erase() 110 current->lowest_stack = task_stack_high; in __stackleak_erase() 114 * Erase and poison the portion of the task stack used since the last erase. 127 * Erase and poison the portion of the task stack used since the last erase. [all …]
|
/Linux-v6.1/Documentation/ABI/testing/ |
D | sysfs-class-mtd | 4 Contact: linux-mtd@lists.infradead.org 12 Contact: linux-mtd@lists.infradead.org 22 Contact: linux-mtd@lists.infradead.org 24 These directories provide the corresponding read-only device 30 Contact: linux-mtd@lists.infradead.org 34 read-write device so <minor> will be even. 39 Contact: linux-mtd@lists.infradead.org 42 to the read-only variant of thie MTD device (in 48 Contact: linux-mtd@lists.infradead.org 50 "Major" erase size for the device. If numeraseregions is [all …]
|