Lines Matching refs:block1
448 * @block1: the second plane block index
456 static int doc_read_seek(struct docg3 *docg3, int block0, int block1, int page,
462 block0, block1, page, ofs, wear);
485 sector = (block1 << DOC_ADDR_BLOCK_SHIFT) + (page & DOC_ADDR_PAGE_MASK);
498 * @block1: the second plane block index
505 static int doc_write_seek(struct docg3 *docg3, int block0, int block1, int page,
511 block0, block1, page, ofs);
538 sector = (block1 << DOC_ADDR_BLOCK_SHIFT) + (page & DOC_ADDR_PAGE_MASK);
673 * @block1: the second plane block index on flash memory
695 static int doc_read_page_prepare(struct docg3 *docg3, int block0, int block1,
701 block0, block1, page, offset);
713 ret = doc_read_seek(docg3, block0, block1, page, wear_area, offset);
822 * @block1: second plane block index calculated
832 static void calc_block_sector(loff_t from, int *block0, int *block1, int *page,
843 *block1 = *block0 + 1;
869 int block0, block1, page, ret, skip, ofs = 0;
901 calc_block_sector(from - skip, &block0, &block1, &page, &ofs,
905 ret = doc_read_page_prepare(docg3, block0, block1, page, ofs);
1016 int block0, block1, page, ofs, is_good;
1018 calc_block_sector(from, &block0, &block1, &page, &ofs,
1021 from, block0, block1, page, ofs);
1025 if (block1 > docg3->max_block)
1047 int block0, block1, page, ofs;
1052 calc_block_sector(from, &block0, &block1, &page, &ofs, docg3->reliable);
1053 if (block1 > docg3->max_block)
1058 ret = doc_read_page_prepare(docg3, block0, block1, page,
1135 * @block1: the second block to erase (rightmost plane)
1142 static int doc_erase_block(struct docg3 *docg3, int block0, int block1)
1146 doc_dbg("doc_erase_block(blocks=(%d,%d))\n", block0, block1);
1157 sector = block1 << DOC_ADDR_BLOCK_SHIFT;
1166 doc_err("Erase blocks %d,%d error\n", block0, block1);
1188 int block0, block1, page, ret = 0, ofs = 0;
1192 calc_block_sector(info->addr + info->len, &block0, &block1, &page,
1197 calc_block_sector(info->addr, &block0, &block1, &page, &ofs,
1203 ret = doc_erase_block(docg3, block0, block1);
1205 block1 += 2;
1234 int block0, block1, page, ret, ofs = 0;
1238 calc_block_sector(to, &block0, &block1, &page, &ofs, docg3->reliable);
1246 ret = doc_write_seek(docg3, block0, block1, page, ofs);