ssfdc 240 drivers/mtd/ssfdc.c static int build_logical_block_map(struct ssfdcr_record *ssfdc) ssfdc 245 drivers/mtd/ssfdc.c struct mtd_info *mtd = ssfdc->mbd.mtd; ssfdc 248 drivers/mtd/ssfdc.c ssfdc->map_len, ssfdc 249 drivers/mtd/ssfdc.c (unsigned long)ssfdc->map_len * ssfdc->erase_size / 1024); ssfdc 252 drivers/mtd/ssfdc.c for (phys_block = ssfdc->cis_block + 1; phys_block < ssfdc->map_len; ssfdc 254 drivers/mtd/ssfdc.c offset = (unsigned long)phys_block * ssfdc->erase_size; ssfdc 273 drivers/mtd/ssfdc.c ssfdc->logic_block_map[block_address] = ssfdc 286 drivers/mtd/ssfdc.c struct ssfdcr_record *ssfdc; ssfdc 299 drivers/mtd/ssfdc.c ssfdc = kzalloc(sizeof(struct ssfdcr_record), GFP_KERNEL); ssfdc 300 drivers/mtd/ssfdc.c if (!ssfdc) ssfdc 303 drivers/mtd/ssfdc.c ssfdc->mbd.mtd = mtd; ssfdc 304 drivers/mtd/ssfdc.c ssfdc->mbd.devnum = -1; ssfdc 305 drivers/mtd/ssfdc.c ssfdc->mbd.tr = tr; ssfdc 306 drivers/mtd/ssfdc.c ssfdc->mbd.readonly = 1; ssfdc 308 drivers/mtd/ssfdc.c ssfdc->cis_block = cis_sector / (mtd->erasesize >> SECTOR_SHIFT); ssfdc 309 drivers/mtd/ssfdc.c ssfdc->erase_size = mtd->erasesize; ssfdc 310 drivers/mtd/ssfdc.c ssfdc->map_len = (u32)mtd->size / mtd->erasesize; ssfdc 313 drivers/mtd/ssfdc.c ssfdc->cis_block, ssfdc->erase_size, ssfdc->map_len, ssfdc 314 drivers/mtd/ssfdc.c DIV_ROUND_UP(ssfdc->map_len, MAX_PHYS_BLK_PER_ZONE)); ssfdc 317 drivers/mtd/ssfdc.c ssfdc->heads = 16; ssfdc 318 drivers/mtd/ssfdc.c ssfdc->sectors = 32; ssfdc 319 drivers/mtd/ssfdc.c get_chs(mtd->size, NULL, &ssfdc->heads, &ssfdc->sectors); ssfdc 320 drivers/mtd/ssfdc.c ssfdc->cylinders = (unsigned short)(((u32)mtd->size >> SECTOR_SHIFT) / ssfdc 321 drivers/mtd/ssfdc.c ((long)ssfdc->sectors * (long)ssfdc->heads)); ssfdc 324 drivers/mtd/ssfdc.c ssfdc->cylinders, ssfdc->heads , ssfdc->sectors, ssfdc 325 drivers/mtd/ssfdc.c (long)ssfdc->cylinders * (long)ssfdc->heads * ssfdc 326 drivers/mtd/ssfdc.c (long)ssfdc->sectors); ssfdc 328 drivers/mtd/ssfdc.c ssfdc->mbd.size = (long)ssfdc->heads * (long)ssfdc->cylinders * ssfdc 329 drivers/mtd/ssfdc.c (long)ssfdc->sectors; ssfdc 332 drivers/mtd/ssfdc.c ssfdc->logic_block_map = ssfdc 333 drivers/mtd/ssfdc.c kmalloc_array(ssfdc->map_len, ssfdc 334 drivers/mtd/ssfdc.c sizeof(ssfdc->logic_block_map[0]), GFP_KERNEL); ssfdc 335 drivers/mtd/ssfdc.c if (!ssfdc->logic_block_map) ssfdc 337 drivers/mtd/ssfdc.c memset(ssfdc->logic_block_map, 0xff, sizeof(ssfdc->logic_block_map[0]) * ssfdc 338 drivers/mtd/ssfdc.c ssfdc->map_len); ssfdc 341 drivers/mtd/ssfdc.c if (build_logical_block_map(ssfdc) < 0) ssfdc 345 drivers/mtd/ssfdc.c if (add_mtd_blktrans_dev(&ssfdc->mbd)) ssfdc 349 drivers/mtd/ssfdc.c ssfdc->mbd.devnum + 'a', mtd->index, mtd->name); ssfdc 353 drivers/mtd/ssfdc.c kfree(ssfdc->logic_block_map); ssfdc 354 drivers/mtd/ssfdc.c kfree(ssfdc); ssfdc 359 drivers/mtd/ssfdc.c struct ssfdcr_record *ssfdc = (struct ssfdcr_record *)dev; ssfdc 364 drivers/mtd/ssfdc.c kfree(ssfdc->logic_block_map); ssfdc 370 drivers/mtd/ssfdc.c struct ssfdcr_record *ssfdc = (struct ssfdcr_record *)dev; ssfdc 373 drivers/mtd/ssfdc.c sectors_per_block = ssfdc->erase_size >> SECTOR_SHIFT; ssfdc 381 drivers/mtd/ssfdc.c BUG_ON(block_address >= ssfdc->map_len); ssfdc 383 drivers/mtd/ssfdc.c block_address = ssfdc->logic_block_map[block_address]; ssfdc 397 drivers/mtd/ssfdc.c if (read_physical_sector(ssfdc->mbd.mtd, buf, sect_no) < 0) ssfdc 408 drivers/mtd/ssfdc.c struct ssfdcr_record *ssfdc = (struct ssfdcr_record *)dev; ssfdc 411 drivers/mtd/ssfdc.c ssfdc->cylinders, ssfdc->heads, ssfdc->sectors); ssfdc 413 drivers/mtd/ssfdc.c geo->heads = ssfdc->heads; ssfdc 414 drivers/mtd/ssfdc.c geo->sectors = ssfdc->sectors; ssfdc 415 drivers/mtd/ssfdc.c geo->cylinders = ssfdc->cylinders;