• Home
  • Raw
  • Download

Lines Matching refs:geo

198 	struct bch_geometry *geo = &this->bch_geometry;  in gpmi_dump_info()  local
226 geo->gf_len, in gpmi_dump_info()
227 geo->ecc_strength, in gpmi_dump_info()
228 geo->page_size, in gpmi_dump_info()
229 geo->metadata_size, in gpmi_dump_info()
230 geo->ecc_chunk_size, in gpmi_dump_info()
231 geo->ecc_chunk_count, in gpmi_dump_info()
232 geo->payload_size, in gpmi_dump_info()
233 geo->auxiliary_size, in gpmi_dump_info()
234 geo->auxiliary_status_offset, in gpmi_dump_info()
235 geo->block_mark_byte_offset, in gpmi_dump_info()
236 geo->block_mark_bit_offset); in gpmi_dump_info()
241 struct bch_geometry *geo = &this->bch_geometry; in gpmi_check_ecc() local
246 if (geo->gf_len == 14) in gpmi_check_ecc()
249 return geo->ecc_strength <= this->devdata->bch_max_ecc_strength; in gpmi_check_ecc()
262 struct bch_geometry *geo = &this->bch_geometry; in set_geometry_by_ecc_info() local
269 geo->gf_len = 13; in set_geometry_by_ecc_info()
272 geo->gf_len = 14; in set_geometry_by_ecc_info()
281 geo->ecc_chunk_size = ecc_step; in set_geometry_by_ecc_info()
282 geo->ecc_strength = round_up(ecc_strength, 2); in set_geometry_by_ecc_info()
287 if (geo->ecc_chunk_size < mtd->oobsize) { in set_geometry_by_ecc_info()
295 geo->metadata_size = 10; in set_geometry_by_ecc_info()
297 geo->ecc_chunk_count = mtd->writesize / geo->ecc_chunk_size; in set_geometry_by_ecc_info()
347 geo->page_size = mtd->writesize + geo->metadata_size + in set_geometry_by_ecc_info()
348 (geo->gf_len * geo->ecc_strength * geo->ecc_chunk_count) / 8; in set_geometry_by_ecc_info()
350 geo->payload_size = mtd->writesize; in set_geometry_by_ecc_info()
352 geo->auxiliary_status_offset = ALIGN(geo->metadata_size, 4); in set_geometry_by_ecc_info()
353 geo->auxiliary_size = ALIGN(geo->metadata_size, 4) in set_geometry_by_ecc_info()
354 + ALIGN(geo->ecc_chunk_count, 4); in set_geometry_by_ecc_info()
361 (geo->ecc_strength * geo->gf_len * (geo->ecc_chunk_count - 1) in set_geometry_by_ecc_info()
362 + geo->metadata_size * 8); in set_geometry_by_ecc_info()
364 geo->block_mark_byte_offset = block_mark_bit_offset / 8; in set_geometry_by_ecc_info()
365 geo->block_mark_bit_offset = block_mark_bit_offset % 8; in set_geometry_by_ecc_info()
389 struct bch_geometry *geo = &this->bch_geometry; in get_ecc_strength() local
393 ecc_strength = ((mtd->oobsize - geo->metadata_size) * 8) in get_ecc_strength()
394 / (geo->gf_len * geo->ecc_chunk_count); in get_ecc_strength()
402 struct bch_geometry *geo = &this->bch_geometry; in legacy_set_geometry() local
413 geo->metadata_size = 10; in legacy_set_geometry()
416 geo->gf_len = 13; in legacy_set_geometry()
419 geo->ecc_chunk_size = 512; in legacy_set_geometry()
420 while (geo->ecc_chunk_size < mtd->oobsize) { in legacy_set_geometry()
421 geo->ecc_chunk_size *= 2; /* keep C >= O */ in legacy_set_geometry()
422 geo->gf_len = 14; in legacy_set_geometry()
425 geo->ecc_chunk_count = mtd->writesize / geo->ecc_chunk_size; in legacy_set_geometry()
428 geo->ecc_strength = get_ecc_strength(this); in legacy_set_geometry()
433 geo->ecc_strength, in legacy_set_geometry()
438 geo->page_size = mtd->writesize + geo->metadata_size + in legacy_set_geometry()
439 (geo->gf_len * geo->ecc_strength * geo->ecc_chunk_count) / 8; in legacy_set_geometry()
440 geo->payload_size = mtd->writesize; in legacy_set_geometry()
448 metadata_size = ALIGN(geo->metadata_size, 4); in legacy_set_geometry()
449 status_size = ALIGN(geo->ecc_chunk_count, 4); in legacy_set_geometry()
451 geo->auxiliary_size = metadata_size + status_size; in legacy_set_geometry()
452 geo->auxiliary_status_offset = metadata_size; in legacy_set_geometry()
504 (geo->ecc_strength * geo->gf_len * (geo->ecc_chunk_count - 1) in legacy_set_geometry()
505 + geo->metadata_size * 8); in legacy_set_geometry()
507 geo->block_mark_byte_offset = block_mark_bit_offset / 8; in legacy_set_geometry()
508 geo->block_mark_bit_offset = block_mark_bit_offset % 8; in legacy_set_geometry()
885 struct bch_geometry *geo = &this->bch_geometry; in gpmi_ooblayout_ecc() local
891 oobregion->length = geo->page_size - mtd->writesize; in gpmi_ooblayout_ecc()
901 struct bch_geometry *geo = &this->bch_geometry; in gpmi_ooblayout_free() local
907 if (geo->page_size < mtd->writesize + mtd->oobsize) { in gpmi_ooblayout_free()
908 oobregion->offset = geo->page_size - mtd->writesize; in gpmi_ooblayout_free()
1106 struct bch_geometry *geo = &this->bch_geometry; in gpmi_free_dma_buffer() local
1109 dma_free_coherent(dev, geo->auxiliary_size, in gpmi_free_dma_buffer()
1122 struct bch_geometry *geo = &this->bch_geometry; in gpmi_alloc_dma_buffer() local
1139 this->auxiliary_virt = dma_alloc_coherent(dev, geo->auxiliary_size, in gpmi_alloc_dma_buffer()
1301 struct bch_geometry *geo = &this->bch_geometry; in gpmi_bch_layout_std() local
1302 unsigned int ecc_strength = geo->ecc_strength >> 1; in gpmi_bch_layout_std()
1303 unsigned int gf_len = geo->gf_len; in gpmi_bch_layout_std()
1304 unsigned int block_size = geo->ecc_chunk_size; in gpmi_bch_layout_std()
1307 BF_BCH_FLASH0LAYOUT0_NBLOCKS(geo->ecc_chunk_count - 1) | in gpmi_bch_layout_std()
1308 BF_BCH_FLASH0LAYOUT0_META_SIZE(geo->metadata_size) | in gpmi_bch_layout_std()
1314 BF_BCH_FLASH0LAYOUT1_PAGE_SIZE(geo->page_size) | in gpmi_bch_layout_std()
1325 struct bch_geometry *geo = &this->bch_geometry; in gpmi_ecc_read_page() local
1332 ret = nand_read_page_op(chip, page, 0, buf, geo->page_size); in gpmi_ecc_read_page()
1337 geo->ecc_chunk_count, in gpmi_ecc_read_page()
1338 geo->auxiliary_status_offset); in gpmi_ecc_read_page()
1366 struct bch_geometry *geo = &this->bch_geometry; in gpmi_ecc_read_subpage() local
1377 ecc_parity_size = geo->gf_len * geo->ecc_strength / 8; in gpmi_ecc_read_subpage()
1391 marker_pos = geo->block_mark_byte_offset / size; in gpmi_ecc_read_subpage()
1400 meta = geo->metadata_size; in gpmi_ecc_read_subpage()
1407 ecc_parity_size = geo->gf_len * geo->ecc_strength / 8; in gpmi_ecc_read_subpage()
1411 ecc_strength = geo->ecc_strength >> 1; in gpmi_ecc_read_subpage()
1416 BF_BCH_FLASH0LAYOUT0_GF(geo->gf_len, this) | in gpmi_ecc_read_subpage()
1417 BF_BCH_FLASH0LAYOUT0_DATA0_SIZE(geo->ecc_chunk_size, this); in gpmi_ecc_read_subpage()
1421 BF_BCH_FLASH0LAYOUT1_GF(geo->gf_len, this) | in gpmi_ecc_read_subpage()
1422 BF_BCH_FLASH0LAYOUT1_DATAN_SIZE(geo->ecc_chunk_size, this); in gpmi_ecc_read_subpage()