Home
last modified time | relevance | path

Searched +full:mtd +full:- +full:name (Results 1 – 25 of 336) sorted by relevance

12345678910>>...14

/linux/drivers/mtd/
H A Dmtdcore.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Core registration and callback routines for MTD
6 * Copyright © 1999-2010 David Woodhouse <dwmw2@infradead.org>
24 #include <linux/backing-dev.h>
31 #include <linux/nvmem-provider.h>
33 #include <linux/error-injection.h>
35 #include <linux/mtd/mtd.h>
36 #include <linux/mtd/partitions.h>
46 struct mtd_info *mtd = dev_get_drvdata(dev); in mtd_cls_suspend() local
48 return mtd ? mtd_suspend(mtd) : 0; in mtd_cls_suspend()
[all …]
H A Dmtdsuper.c1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* MTD-based superblock management
4 * Copyright © 2001-2007 Red Hat, Inc. All Rights Reserved.
5 * Copyright © 2001-2010 David Woodhouse <dwmw2@infradead.org>
11 #include <linux/mtd/super.h>
17 #include <linux/backing-dev.h>
23 * get a superblock on an MTD-backed filesystem
26 struct mtd_info *mtd, in mtd_get_sb() argument
33 sb = sget_dev(fc, MKDEV(MTD_BLOCK_MAJOR, mtd->index)); in mtd_get_sb()
37 if (sb->s_root) { in mtd_get_sb()
[all …]
H A Dmtdpart.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Simple MTD partitioning layer
7 * Copyright © 2000-2010 David Woodhouse <dwmw2@infradead.org>
16 #include <linux/mtd/mtd.h>
17 #include <linux/mtd/partitions.h>
25 * MTD methods which simply translate the effective address and pass through
29 static inline void free_partition(struct mtd_info *mtd) in free_partition() argument
31 kfree(mtd->name); in free_partition()
32 kfree(mtd); in free_partition()
35 void release_mtd_partition(struct mtd_info *mtd) in release_mtd_partition() argument
[all …]
H A Dmtdblock.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Direct MTD block device access
5 * Copyright © 1999-2010 David Woodhouse <dwmw2@infradead.org>
6 * Copyright © 2000-2003 Nicolas Pitre <nico@fluxnic.net>
18 #include <linux/mtd/mtd.h>
19 #include <linux/mtd/blktrans.h>
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
44 static int erase_write (struct mtd_info *mtd, unsigned long pos, in erase_write() argument
57 ret = mtd_erase(mtd, &erase); in erase_write()
[all …]
H A Dmtdconcat.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * MTD device concatenation layer
6 * Copyright © 2002-2010 David Woodhouse <dwmw2@infradead.org>
16 #include <linux/backing-dev.h>
18 #include <linux/mtd/mtd.h>
19 #include <linux/mtd/concat.h>
30 struct mtd_info mtd; member
43 * Given a pointer to the MTD object in the mtd_concat structure,
49 * MTD methods which look up the relevant subdevice, translate the
54 concat_read(struct mtd_info *mtd, loff_t from, size_t len, in concat_read() argument
[all …]
H A Drfd_ftl.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * rfd_ftl.c -- resident flash disk (flash translation layer)
17 #include <linux/mtd/blktrans.h>
18 #include <linux/mtd/mtd.h>
95 struct block *block = &part->blocks[block_no]; in build_block_map()
98 block->offset = part->block_size * block_no; in build_block_map()
100 if (le16_to_cpu(part->header_cache[0]) != RFD_MAGIC) { in build_block_map()
101 block->state = BLOCK_UNUSED; in build_block_map()
102 return -ENOENT; in build_block_map()
105 block->state = BLOCK_OK; in build_block_map()
[all …]
H A Dmtdblock_ro.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Simple read-only (writable only for RAM) mtdblock driver
5 * Copyright © 2001-2010 David Woodhouse <dwmw2@infradead.org>
10 #include <linux/mtd/mtd.h>
11 #include <linux/mtd/blktrans.h>
21 err = mtd_read(dev->mtd, (block * 512), 512, &retlen, buf); in mtdblock_readsect()
32 if (mtd_write(dev->mtd, (block * 512), 512, &retlen, buf)) in mtdblock_writesect()
37 static void mtdblock_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) in mtdblock_add_mtd() argument
44 dev->mtd = mtd; in mtdblock_add_mtd()
45 dev->devnum = mtd->index; in mtdblock_add_mtd()
[all …]
/linux/drivers/mtd/parsers/
H A Dafs.c1 // SPDX-License-Identifier: GPL-2.0-or-later
4 drivers/mtd/afs.c: ARM Flash Layout/Partitioning
22 #include <linux/mtd/mtd.h>
23 #include <linux/mtd/map.h>
24 #include <linux/mtd/partitions.h>
44 char name[16]; /* Null terminated */ member
47 u32 headerType; /* AIF, RLF, s-record etc. */
56 while (num--) in word_sum()
78 static bool afs_is_v1(struct mtd_info *mtd, u_int off) in afs_is_v1() argument
81 u_int ptr = off + mtd->erasesize - 12; in afs_is_v1()
[all …]
H A Dtplink_safeloader.c1 // SPDX-License-Identifier: GPL-2.0-only
8 #include <linux/mtd/mtd.h>
9 #include <linux/mtd/partitions.h>
21 static void *mtd_parser_tplink_safeloader_read_table(struct mtd_info *mtd) in mtd_parser_tplink_safeloader_read_table() argument
31 np = mtd_get_of_node(mtd); in mtd_parser_tplink_safeloader_read_table()
32 if (mtd_is_partition(mtd)) in mtd_parser_tplink_safeloader_read_table()
37 if (of_property_read_u32(np, "partitions-table-offset", &offset)) { in mtd_parser_tplink_safeloader_read_table()
42 err = mtd_read(mtd, offset, sizeof(hdr), &bytes_read, (uint8_t *)&hdr); in mtd_parser_tplink_safeloader_read_table()
44 pr_err("Failed to read from %s at 0x%x\n", mtd->name, offset); in mtd_parser_tplink_safeloader_read_table()
54 err = mtd_read(mtd, offset + sizeof(hdr), size, &bytes_read, buf); in mtd_parser_tplink_safeloader_read_table()
[all …]
H A Dcmdlinepart.c1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright © 2002 SYSGO Real-Time Solutions GmbH
6 * Copyright © 2002-2010 David Woodhouse <dwmw2@infradead.org>
11 * <mtddef> := <mtd-id>:<partdef>[,<partdef>]
12 * <partdef> := <size>[@<offset>][<name>][ro][lk][slc]
13 * <mtd-id> := unique name used in mapping driver/device (mtd->name)
14 * <size> := standard linux memsize OR "-" to denote all remaining space
20 * <name> := '(' NAME ')'
21 * NAME will appear in /proc/mtd
26 * The parts are assigned MTD numbers in the order they are specified in the
[all …]
/linux/drivers/mtd/maps/
H A Dsa1100-flash.c1 // SPDX-License-Identifier: GPL-2.0-only
18 #include <linux/mtd/mtd.h>
19 #include <linux/mtd/map.h>
20 #include <linux/mtd/partitions.h>
21 #include <linux/mtd/concat.h>
28 char name[16]; member
30 struct mtd_info *mtd; member
35 struct mtd_info *mtd; member
50 subdev->plat->set_vpp(1); in sa1100_set_vpp()
52 if (--sa1100_vpp_refcnt == 0) /* last nested 'off' */ in sa1100_set_vpp()
[all …]
H A Dsun_uflash.c1 // SPDX-License-Identifier: GPL-2.0-only
2 /* sun_uflash.c - Driver for user-programmable flash on
5 * This driver does NOT provide access to the OBP-flash for
6 * safety reasons-- use <linux>/drivers/sbus/char/flash.c instead.
23 #include <linux/mtd/mtd.h>
24 #include <linux/mtd/map.h>
31 #define UFLASH_BUSWIDTH 1 /* EBus is 8-bit */
34 MODULE_DESCRIPTION("User-programmable flash device on Sun Microsystems boardsets");
39 const char *name; /* device name */ member
40 struct map_info map; /* mtd map info */
[all …]
H A Dpxa2xx-flash.c1 // SPDX-License-Identifier: GPL-2.0-only
14 #include <linux/mtd/mtd.h>
15 #include <linux/mtd/map.h>
16 #include <linux/mtd/partitions.h>
26 unsigned long start = (unsigned long)map->cached + from; in pxa2xx_map_inval_cache()
29 start &= ~(CACHELINESIZE - 1); in pxa2xx_map_inval_cache()
38 struct mtd_info *mtd; member
46 struct flash_platform_data *flash = dev_get_platdata(&pdev->dev); in pxa2xx_flash_probe()
52 return -ENODEV; in pxa2xx_flash_probe()
56 return -ENOMEM; in pxa2xx_flash_probe()
[all …]
/linux/drivers/mtd/ubi/
H A Dgluebi.c1 // SPDX-License-Identifier: GPL-2.0-or-later
9 * This is a small driver which implements fake MTD devices on top of UBI
11 * MTD-oriented software (including all the legacy software) work on top of
14 * Gluebi emulates MTD devices of "MTD_UBIVOLUME" type. Their minimal I/O unit
15 * size (@mtd->writesize) is equivalent to the UBI minimal I/O unit. The
26 #include <linux/mtd/ubi.h>
27 #include <linux/mtd/mtd.h>
28 #include "ubi-media.h"
32 current->pid, __func__, ##__VA_ARGS__)
35 * struct gluebi_device - a gluebi device description data structure.
[all …]
/linux/drivers/mtd/devices/
H A Dsst25l.c1 // SPDX-License-Identifier: GPL-2.0-only
21 #include <linux/mtd/mtd.h>
22 #include <linux/mtd/partitions.h>
49 struct mtd_info mtd; member
53 const char *name; member
60 #define to_sst25l_flash(x) container_of(x, struct sst25l_flash, mtd)
83 err = spi_sync(flash->spi, &m); in sst25l_status()
97 err = spi_write(flash->spi, command, 1); in sst25l_write_enable()
102 err = spi_write(flash->spi, command, 1); in sst25l_write_enable()
108 err = spi_write(flash->spi, command, 2); in sst25l_write_enable()
[all …]
H A Dmtdram.c2 * mtdram - a test mtd device
6 * Copyright (c) 2005 Joern Engel <joern@wh.fh-wedel.de>
18 #include <linux/mtd/mtd.h>
19 #include <linux/mtd/mtdram.h>
34 // We could store these in the mtd structure, but we only support 1 device..
37 static int check_offs_len(struct mtd_info *mtd, loff_t ofs, uint64_t len) in check_offs_len() argument
42 if (mtd_mod_by_eb(ofs, mtd)) { in check_offs_len()
44 ret = -EINVAL; in check_offs_len()
48 if (mtd_mod_by_eb(len, mtd)) { in check_offs_len()
50 ret = -EINVAL; in check_offs_len()
[all …]
H A Dms02-nv.c1 // SPDX-License-Identifier: GPL-2.0-or-later
10 #include <linux/mtd/mtd.h>
22 #include "ms02-nv.h"
26 "ms02-nv.c: v.1.0.0 13 Aug 2001 Maciej W. Rozycki.\n";
28 MODULE_AUTHOR("Maciej W. Rozycki <macro@linux-mips.org>");
29 MODULE_DESCRIPTION("DEC MS02-NV NVRAM module driver");
34 * Addresses we probe for an MS02-NV at. Modules may be located
45 static const char ms02nv_name[] = "DEC MS02-NV NVRAM";
47 static const char ms02nv_res_user_ram[] = "General-purpose RAM";
53 static int ms02nv_read(struct mtd_info *mtd, loff_t from, in ms02nv_read() argument
[all …]
/linux/drivers/mtd/chips/
H A Dmap_rom.c1 // SPDX-License-Identifier: GPL-2.0
16 #include <linux/mtd/mtd.h>
17 #include <linux/mtd/map.h>
23 static int maprom_erase (struct mtd_info *mtd, struct erase_info *info);
24 static int maprom_point (struct mtd_info *mtd, loff_t from, size_t len,
26 static int maprom_unpoint(struct mtd_info *mtd, loff_t from, size_t len);
31 .name = "map_rom",
39 erase_size = of_get_property(map->device_node, "erase-size", NULL); in default_erasesize()
41 return !erase_size ? map->size : be32_to_cpu(*erase_size); in default_erasesize()
46 struct mtd_info *mtd; in map_rom_probe() local
[all …]
H A Dmap_absent.c1 // SPDX-License-Identifier: GPL-2.0-only
6 * This map driver is used to allocate "placeholder" MTD
9 * registration of MTD device nodes regardless of probe outcome.
17 * Any device 'probed' with this driver will return -ENODEV
27 #include <linux/mtd/mtd.h>
28 #include <linux/mtd/map.h>
41 .name = "map_absent",
47 struct mtd_info *mtd; in map_absent_probe() local
49 mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); in map_absent_probe()
50 if (!mtd) { in map_absent_probe()
[all …]
H A Dmap_ram.c1 // SPDX-License-Identifier: GPL-2.0
15 #include <linux/mtd/mtd.h>
16 #include <linux/mtd/map.h>
24 static int mapram_point (struct mtd_info *mtd, loff_t from, size_t len,
26 static int mapram_unpoint(struct mtd_info *mtd, loff_t from, size_t len);
31 .name = "map_ram",
37 struct mtd_info *mtd; in map_ram_probe() local
50 map_write8(map, 0x55, map->size-1); in map_ram_probe()
51 if (map_read8(map, map->size-1) != 0x55) in map_ram_probe()
54 map_write8(map, 0xAA, map->size-1); in map_ram_probe()
[all …]
H A Dchipreg.c1 // SPDX-License-Identifier: GPL-2.0-only
12 #include <linux/mtd/map.h>
13 #include <linux/mtd/mtd.h>
21 list_add(&drv->list, &chip_drvs_list); in register_mtd_chip_driver()
28 list_del(&drv->list); in unregister_mtd_chip_driver()
32 static struct mtd_chip_driver *get_mtd_chip_driver (const char *name) in get_mtd_chip_driver() argument
39 if (!strcmp(this->name, name)) { in get_mtd_chip_driver()
44 if (ret && !try_module_get(ret->module)) in get_mtd_chip_driver()
55 struct mtd_info *do_map_probe(const char *name, struct map_info *map) in do_map_probe() argument
60 drv = get_mtd_chip_driver(name); in do_map_probe()
[all …]
/linux/drivers/net/ethernet/sfc/siena/
H A Dmtd.c1 // SPDX-License-Identifier: GPL-2.0-only
4 * Copyright 2005-2006 Fen Systems Ltd.
5 * Copyright 2006-2013 Solarflare Communications Inc.
9 #include <linux/mtd/mtd.h>
16 #define to_efx_mtd_partition(mtd) \ argument
17 container_of(mtd, struct efx_mtd_partition, mtd)
19 /* MTD interface */
21 static int efx_mtd_erase(struct mtd_info *mtd, struct erase_info *erase) in efx_mtd_erase() argument
23 struct efx_nic *efx = mtd->priv; in efx_mtd_erase()
25 return efx->type->mtd_erase(mtd, erase->addr, erase->len); in efx_mtd_erase()
[all …]
/linux/drivers/net/ethernet/sfc/
H A Dmtd.c1 // SPDX-License-Identifier: GPL-2.0-only
4 * Copyright 2005-2006 Fen Systems Ltd.
5 * Copyright 2006-2013 Solarflare Communications Inc.
9 #include <linux/mtd/mtd.h>
16 #define to_efx_mtd_partition(mtd) \ argument
17 container_of(mtd, struct efx_mtd_partition, mtd)
19 /* MTD interface */
21 static int efx_mtd_erase(struct mtd_info *mtd, struct erase_info *erase) in efx_mtd_erase() argument
23 struct efx_nic *efx = mtd->priv; in efx_mtd_erase()
25 return efx->type->mtd_erase(mtd, erase->addr, erase->len); in efx_mtd_erase()
[all …]
/linux/drivers/net/ethernet/sfc/falcon/
H A Dmtd.c1 // SPDX-License-Identifier: GPL-2.0-only
4 * Copyright 2005-2006 Fen Systems Ltd.
5 * Copyright 2006-2013 Solarflare Communications Inc.
9 #include <linux/mtd/mtd.h>
16 #define to_ef4_mtd_partition(mtd) \ argument
17 container_of(mtd, struct ef4_mtd_partition, mtd)
19 /* MTD interface */
21 static int ef4_mtd_erase(struct mtd_info *mtd, struct erase_info *erase) in ef4_mtd_erase() argument
23 struct ef4_nic *efx = mtd->priv; in ef4_mtd_erase()
25 return efx->type->mtd_erase(mtd, erase->addr, erase->len); in ef4_mtd_erase()
[all …]
/linux/Documentation/ABI/testing/
H A Dsysfs-class-mtd1 What: /sys/class/mtd/
4 Contact: linux-mtd@lists.infradead.org
6 The mtd/ class subdirectory belongs to the MTD subsystem
7 (MTD core).
9 What: /sys/class/mtd/mtdX/
12 Contact: linux-mtd@lists.infradead.org
14 The /sys/class/mtd/mtd{0,1,2,3,...} directories correspond
19 What: /sys/class/mtd/mtdXro/
22 Contact: linux-mtd@lists.infradead.org
24 These directories provide the corresponding read-only device
[all …]

12345678910>>...14