Home
last modified time | relevance | path

Searched +full:erase +full:- +full:size (Results 1 – 25 of 301) sorted by relevance

12345678910>>...13

/linux/Documentation/driver-api/mmc/
H A Dmmc-dev-attrs.rst11 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/drivers/mtd/
H A Dmtdconcat.c1 // 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 …]
H A Dmtdpstore.c1 // 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 …]
H A Dmtdblock.c1 // 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 …]
H A Dmtdoops.c1 // SPDX-License-Identifier: GPL-2.0-only
25 /* Maximum MTD partition size */
31 "record size for MTD OOPS pages in bytes (default 4096)");
70 set_bit(page, cxt->oops_page_used); in mark_page_used()
75 clear_bit(page, cxt->oops_page_used); in mark_page_unused()
80 return test_bit(page, cxt->oops_page_used); in page_is_used()
85 struct mtd_info *mtd = cxt->mtd; in mtdoops_erase_block()
86 u32 start_page_offset = mtd_div_by_eb(offset, mtd) * mtd->erasesize; in mtdoops_erase_block()
88 u32 erase_pages = mtd->erasesize / record_size; in mtdoops_erase_block()
89 struct erase_info erase; in mtdoops_erase_block() local
[all …]
H A Drfd_ftl.c1 // 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 …]
H A Dmtdswap.c1 // 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 …]
/linux/drivers/mtd/spi-nor/
H A Dsfdp.c1 // SPDX-License-Identifier: GPL-2.0
8 #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 */
31 * Register Map Offsets for Multi-Chip
41 u8 nph; /* 0-base number of parameter headers */
[all …]
H A Dcore.c1 // SPDX-License-Identifier: GPL-2.0
17 #include <linux/mtd/spi-nor.h>
31 * For everything but full-chip erase; probably could be much smaller, but kept
37 * For full-chip erase, calibrated to a 2MB flash (M25P16); should be scaled up
48 * spi_nor_get_cmd_ext() - Get the command opcode extension based on the
61 switch (nor->cmd_ext_type) { in spi_nor_get_cmd_ext()
63 return ~op->cmd.opcode; in spi_nor_get_cmd_ext()
66 return op->cmd.opcode; in spi_nor_get_cmd_ext()
69 dev_err(nor->dev, "Unknown command extension type\n"); in spi_nor_get_cmd_ext()
75 * spi_nor_spimem_setup_op() - Set up common properties of a spi-mem op.
[all …]
H A Dmicron-st.c1 // SPDX-License-Identifier: GPL-2.0
7 #include <linux/mtd/spi-nor.h>
14 #define SPINOR_OP_MT_DIE_ERASE 0xc4 /* Chip (die) erase opcode */
28 #define FSR_E_ERR BIT(5) /* Erase operation status */
54 u8 *buf = nor->bouncebuf; in micron_st_nor_octal_dtr_en()
56 u8 addr_mode_nbytes = nor->params->addr_mode_nbytes; in micron_st_nor_octal_dtr_en()
63 ret = spi_nor_write_any_volatile_reg(nor, &op, nor->reg_proto); in micron_st_nor_octal_dtr_en()
71 ret = spi_nor_write_any_volatile_reg(nor, &op, nor->reg_proto); in micron_st_nor_octal_dtr_en()
78 dev_dbg(nor->dev, "error %d reading JEDEC ID after enabling 8D-8D-8D mode\n", ret); in micron_st_nor_octal_dtr_en()
82 if (memcmp(buf, nor->info->id->bytes, nor->info->id->len)) in micron_st_nor_octal_dtr_en()
[all …]
/linux/drivers/net/wwan/iosm/
H A Diosm_ipc_flash.h1 /* 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 …]
H A Diosm_ipc_flash.c1 // 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 …]
H A Diosm_ipc_devlink.h1 /* 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/drivers/mtd/chips/
H A Dcfi_util.c1 // SPDX-License-Identifier: GPL-2.0
44 unsigned type = cfi->device_type; in cfi_build_cmd_addr()
88 /* First, determine what the bit-pattern should be for a single in cfi_build_cmd()
103 /* Now replicate it across the size of an unsigned long, or in cfi_build_cmd()
122 /* And finally, for the multi-word case, replicate it in cfi_build_cmd()
178 /* Last, determine what the bit-pattern should be for a single in cfi_merge_status()
199 * If prev_val is non-null, it will be set to the value at the command address,
215 return addr - base; in cfi_send_gen_cmd()
222 int osf = cfi->interleave * cfi->device_type; /* scale factor */ in cfi_qry_present()
250 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); in cfi_qry_mode_on()
[all …]
H A Dcfi_cmdset_0020.c1 // SPDX-License-Identifier: GPL-2.0
9 * - completely revamped method functions so they are aware and
11 * - scalability vs code size is completely set at compile-time
13 * - optimized write buffer method
14 * 06/21/2002 Joern Engel <joern@wh.fh-wedel.de> and others
15 * - modified Intel Command Set 0x0001 to support ST Advanced Architecture
17 * - added a writev function
18 * 07/13/2005 Joern Engel <joern@wh.fh-wedel.de>
19 * - Plugged memory leak in cfi_staa_writev().
69 printk(" Feature/Command Support: %4.4X\n", extp->FeatureSupport); in cfi_tell_features()
[all …]
/linux/Documentation/driver-api/mtd/
H A Dspi-nor.rst6 -----------------------------------
11 standard set of internal read-only parameter tables.
17 on its SFDP data. All one has to do is to specify the "jedec,spi-nor"
28 -----------------------------
31 section, after the ``---`` marker.
41 root@1:~# cat /sys/bus/spi/devices/spi0.0/spi-nor/partname
43 root@1:~# cat /sys/bus/spi/devices/spi0.0/spi-nor/jedec_id
45 root@1:~# cat /sys/bus/spi/devices/spi0.0/spi-nor/manufacturer
47 root@1:~# xxd -p /sys/bus/spi/devices/spi0.0/spi-nor/sfdp
69 root@1:~# sha256sum /sys/bus/spi/devices/spi0.0/spi-nor/sfdp
[all …]
/linux/drivers/mtd/devices/
H A Dpowernv_flash.c1 // 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 …]
/linux/drivers/firmware/microchip/
H A Dmpfs-auto-update.c1 // SPDX-License-Identifier: GPL-2.0
8 * Copyright (c) 2022-2023 Microchip Corporation. All rights reserved.
44 * |------------------------------| 0x0000000
47 * |------------------------------| 0x0000400
51 * |------------------------------| 0x0100400
54 * |------------------------------| 0x1500400
57 * |------------------------------| 0x2900400
59 * | Reserved for multi-image IAP |
61 * |------------------------------| 0x3D00400
64 * |------------------------------| 0x?
[all …]
/linux/drivers/mtd/ubi/
H A Dubi-media.h1 /* 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/include/linux/
H A Dpstore_zone.h1 /* 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/include/uapi/linux/
H A Dvirtio_blk.h34 #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 */
61 /* The capacity (in 512-byte sectors). */
63 /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */
74 /* block size of device (if VIRTIO_BLK_F_BLK_SIZE) */
82 /* minimum I/O size without performance penalty in logical blocks. */
84 /* optimal sustained I/O size in logical blocks. */
96 * The maximum discard sectors (in 512-byte sectors) for
[all …]
/linux/include/linux/mtd/
H A Dqinfo.h1 /* 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 …]
H A Dpfow.h1 /* 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/Documentation/ABI/testing/
H A Dsysfs-class-mtd4 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 the MTD device (in
48 Contact: linux-mtd@lists.infradead.org
50 "Major" erase size for the device. If numeraseregions is
[all …]
/linux/kernel/
H A Dstackleak.c1 // SPDX-License-Identifier: GPL-2.0
92 current->lowest_stack); in __stackleak_erase()
95 current->prev_lowest_stack = erase_low; in __stackleak_erase()
103 * stack) we can erase everything below the pt_regs at the top of the in __stackleak_erase()
108 * function has a fixed-size stack frame, and the current stack pointer in __stackleak_erase()
119 current->lowest_stack = task_stack_high; in __stackleak_erase()
123 * Erase an
[all...]

12345678910>>...13