Lines Matching full:erase

369 	struct erase_info *erase;  in concat_erase()  local
372 * Check for proper erase block alignment of the to-be-erased area. in concat_erase()
373 * It is easier to do this based on the super device's erase in concat_erase()
378 /* the easy case: device has uniform erase block size */ in concat_erase()
384 /* device has variable erase size */ in concat_erase()
389 * Find the erase region where the to-be-erased area begins: in concat_erase()
398 * offset is aligned to this region's erase size: in concat_erase()
404 * now find the erase region where the to-be-erased area ends: in concat_erase()
411 * check if the ending offset is aligned to this region's erase size in concat_erase()
419 erase = kmalloc(sizeof (struct erase_info), GFP_KERNEL); in concat_erase()
421 if (!erase) in concat_erase()
424 *erase = *instr; in concat_erase()
433 if (subdev->size <= erase->addr) { in concat_erase()
434 erase->addr -= subdev->size; in concat_erase()
444 /* now do the erase: */ in concat_erase()
451 if (erase->addr + length > subdev->size) in concat_erase()
452 erase->len = subdev->size - erase->addr; in concat_erase()
454 erase->len = length; in concat_erase()
456 length -= erase->len; in concat_erase()
457 if ((err = mtd_erase(subdev, erase))) { in concat_erase()
461 if (erase->fail_addr != MTD_FAIL_ADDR_UNKNOWN) in concat_erase()
462 instr->fail_addr = erase->fail_addr + offset; in concat_erase()
466 * erase->addr specifies the offset of the area to be in concat_erase()
473 erase->addr = 0; in concat_erase()
476 kfree(erase); in concat_erase()
770 * Combine the erase block size info of the subdevices: in mtd_concat_create()
773 * many changes in erase size we have in mtd_concat_create()
779 /* current subdevice has uniform erase size */ in mtd_concat_create()
781 /* if it differs from the last subdevice's erase size, count it */ in mtd_concat_create()
788 /* current subdevice has variable erase size */ in mtd_concat_create()
792 /* walk the list of erase regions, count any changes */ in mtd_concat_create()
808 * All subdevices have the same uniform erase size. in mtd_concat_create()
817 * erase block size varies across the subdevices: allocate in mtd_concat_create()
818 * space to store the data describing the variable erase regions in mtd_concat_create()
832 ("memory allocation error while creating erase region list" in mtd_concat_create()
839 * erase region info: in mtd_concat_create()
845 /* current subdevice has uniform erase size */ in mtd_concat_create()
864 /* current subdevice has variable erase size */ in mtd_concat_create()
867 /* walk the list of erase regions, count any changes */ in mtd_concat_create()