Lines Matching refs:mtd

67 static int bcm47xxsflash_erase(struct mtd_info *mtd, struct erase_info *erase)  in bcm47xxsflash_erase()  argument
69 struct bcm47xxsflash *b47s = mtd->priv; in bcm47xxsflash_erase()
103 static int bcm47xxsflash_read(struct mtd_info *mtd, loff_t from, size_t len, in bcm47xxsflash_read() argument
106 struct bcm47xxsflash *b47s = mtd->priv; in bcm47xxsflash_read()
109 if ((from + len) > mtd->size) in bcm47xxsflash_read()
119 static int bcm47xxsflash_write_st(struct mtd_info *mtd, u32 offset, size_t len, in bcm47xxsflash_write_st() argument
122 struct bcm47xxsflash *b47s = mtd->priv; in bcm47xxsflash_write_st()
164 static int bcm47xxsflash_write_at(struct mtd_info *mtd, u32 offset, size_t len, in bcm47xxsflash_write_at() argument
167 struct bcm47xxsflash *b47s = mtd->priv; in bcm47xxsflash_write_at()
207 static int bcm47xxsflash_write(struct mtd_info *mtd, loff_t to, size_t len, in bcm47xxsflash_write() argument
210 struct bcm47xxsflash *b47s = mtd->priv; in bcm47xxsflash_write()
219 written = bcm47xxsflash_write_st(mtd, to, len, buf); in bcm47xxsflash_write()
222 written = bcm47xxsflash_write_at(mtd, to, len, buf); in bcm47xxsflash_write()
243 struct mtd_info *mtd = &b47s->mtd; in bcm47xxsflash_fill_mtd() local
245 mtd->priv = b47s; in bcm47xxsflash_fill_mtd()
246 mtd->dev.parent = dev; in bcm47xxsflash_fill_mtd()
247 mtd->name = "bcm47xxsflash"; in bcm47xxsflash_fill_mtd()
249 mtd->type = MTD_NORFLASH; in bcm47xxsflash_fill_mtd()
250 mtd->flags = MTD_CAP_NORFLASH; in bcm47xxsflash_fill_mtd()
251 mtd->size = b47s->size; in bcm47xxsflash_fill_mtd()
252 mtd->erasesize = b47s->blocksize; in bcm47xxsflash_fill_mtd()
253 mtd->writesize = 1; in bcm47xxsflash_fill_mtd()
254 mtd->writebufsize = 1; in bcm47xxsflash_fill_mtd()
256 mtd->_erase = bcm47xxsflash_erase; in bcm47xxsflash_fill_mtd()
257 mtd->_read = bcm47xxsflash_read; in bcm47xxsflash_fill_mtd()
258 mtd->_write = bcm47xxsflash_write; in bcm47xxsflash_fill_mtd()
306 err = mtd_device_parse_register(&b47s->mtd, probes, NULL, NULL, 0); in bcm47xxsflash_bcma_probe()
323 mtd_device_unregister(&b47s->mtd); in bcm47xxsflash_bcma_remove()