Lines Matching refs:master
30 struct mtd_info *master; member
57 return part->master->read (part->master, from + part->offset, in part_read()
69 return part->master->point (part->master, from + part->offset, in part_point()
76 part->master->unpoint (part->master, addr, from + part->offset, len); in part_unpoint()
88 return part->master->read_ecc (part->master, from + part->offset, in part_read_ecc()
100 return part->master->read_oob (part->master, from + part->offset, in part_read_oob()
108 return part->master->read_user_prot_reg (part->master, from, in part_read_user_prot_reg()
116 return part->master->read_user_prot_reg (part->master, from, in part_read_fact_prot_reg()
130 return part->master->write (part->master, to + part->offset, in part_write()
145 return part->master->write_ecc (part->master, to + part->offset, in part_write_ecc()
159 return part->master->write_oob (part->master, to + part->offset, in part_write_oob()
167 return part->master->write_user_prot_reg (part->master, from, in part_write_user_prot_reg()
177 return part->master->writev (part->master, vecs, count, in part_writev()
185 return part->master->readv (part->master, vecs, count, in part_readv()
196 return part->master->writev_ecc (part->master, vecs, count, in part_writev_ecc()
206 return part->master->readv_ecc (part->master, vecs, count, in part_readv_ecc()
219 return part->master->erase(part->master, instr); in part_erase()
227 return part->master->lock(part->master, ofs + part->offset, len); in part_lock()
235 return part->master->unlock(part->master, ofs + part->offset, len); in part_unlock()
241 part->master->sync(part->master); in part_sync()
247 return part->master->suspend(part->master); in part_suspend()
253 part->master->resume(part->master); in part_resume()
261 int del_mtd_partitions(struct mtd_info *master) in del_mtd_partitions() argument
270 if (slave->master == master) { in del_mtd_partitions()
290 int add_mtd_partitions(struct mtd_info *master, in add_mtd_partitions() argument
298 printk (KERN_NOTICE "Creating %d MTD partitions on \"%s\":\n", nbparts, master->name); in add_mtd_partitions()
306 master->name); in add_mtd_partitions()
307 del_mtd_partitions(master); in add_mtd_partitions()
314 slave->mtd.type = master->type; in add_mtd_partitions()
315 slave->mtd.flags = master->flags & ~parts[i].mask_flags; in add_mtd_partitions()
317 slave->mtd.oobblock = master->oobblock; in add_mtd_partitions()
318 slave->mtd.oobsize = master->oobsize; in add_mtd_partitions()
319 slave->mtd.ecctype = master->ecctype; in add_mtd_partitions()
320 slave->mtd.eccsize = master->eccsize; in add_mtd_partitions()
323 slave->mtd.bank_size = master->bank_size; in add_mtd_partitions()
324 slave->mtd.module = master->module; in add_mtd_partitions()
329 if(master->point && master->unpoint){ in add_mtd_partitions()
334 if (master->read_ecc) in add_mtd_partitions()
336 if (master->write_ecc) in add_mtd_partitions()
338 if (master->read_oob) in add_mtd_partitions()
340 if (master->write_oob) in add_mtd_partitions()
342 if(master->read_user_prot_reg) in add_mtd_partitions()
344 if(master->read_fact_prot_reg) in add_mtd_partitions()
346 if(master->write_user_prot_reg) in add_mtd_partitions()
348 if (master->sync) in add_mtd_partitions()
350 if (!i && master->suspend && master->resume) { in add_mtd_partitions()
354 if (master->writev) in add_mtd_partitions()
356 if (master->readv) in add_mtd_partitions()
358 if (master->writev_ecc) in add_mtd_partitions()
360 if (master->readv_ecc) in add_mtd_partitions()
362 if (master->lock) in add_mtd_partitions()
364 if (master->unlock) in add_mtd_partitions()
367 slave->master = master; in add_mtd_partitions()
374 u_int32_t emask = master->erasesize-1; in add_mtd_partitions()
383 slave->mtd.size = master->size - slave->offset; in add_mtd_partitions()
390 if (slave->offset >= master->size) { in add_mtd_partitions()
397 if (slave->offset + slave->mtd.size > master->size) { in add_mtd_partitions()
398 slave->mtd.size = master->size - slave->offset; in add_mtd_partitions()
400 parts[i].name, master->name, slave->mtd.size); in add_mtd_partitions()
402 if (master->numeraseregions>1) { in add_mtd_partitions()
405 struct mtd_erase_region_info *regions = master->eraseregions; in add_mtd_partitions()
408 for (i=0; i < master->numeraseregions && slave->offset >= regions[i].offset; i++) in add_mtd_partitions()
411 …for (i--; i < master->numeraseregions && slave->offset + slave->mtd.size > regions[i].offset; i++)… in add_mtd_partitions()
418 slave->mtd.erasesize = master->erasesize; in add_mtd_partitions()