Lines Matching +full:mtd +full:- +full:ram
1 // 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()
47 dev->size = mtd->size >> 9; in mtdblock_add_mtd()
48 dev->tr = tr; in mtdblock_add_mtd()
49 dev->readonly = 1; in mtdblock_add_mtd()
51 if (mtd_type_is_nand(mtd)) in mtdblock_add_mtd()
52 …pr_warn_ratelimited("%s: MTD device '%s' is NAND, please consider using UBI block devices instead.… in mtdblock_add_mtd()
53 tr->name, mtd->name); in mtdblock_add_mtd()
80 MODULE_DESCRIPTION("Simple read-only block device emulation access to MTD devices");