• Home
  • Raw
  • Download

Lines Matching refs:flash

43 #define ONENAND_CORE(flash)		(flash->data)  argument
44 #define ONENAND_CORE_SPARE(flash, this, offset) \ argument
45 ((flash->data) + (this->chipsize) + (offset >> 5))
78 struct onenand_flash flash; member
230 struct onenand_flash *flash = this->priv; in onenand_data_handle() local
246 src = ONENAND_CORE(flash) + offset; in onenand_data_handle()
252 src = ONENAND_CORE_SPARE(flash, this, offset); in onenand_data_handle()
259 dest = ONENAND_CORE(flash) + offset; in onenand_data_handle()
278 dest = ONENAND_CORE_SPARE(flash, this, offset); in onenand_data_handle()
287 memset(ONENAND_CORE(flash) + offset, 0xff, mtd->erasesize); in onenand_data_handle()
288 memset(ONENAND_CORE_SPARE(flash, this, offset), 0xff, in onenand_data_handle()
381 static int __init flash_init(struct onenand_flash *flash) in flash_init() argument
386 flash->base = kzalloc(131072, GFP_KERNEL); in flash_init()
387 if (!flash->base) { in flash_init()
395 ONENAND_CORE(flash) = vmalloc(size + (size >> 5)); in flash_init()
396 if (!ONENAND_CORE(flash)) { in flash_init()
398 kfree(flash->base); in flash_init()
402 memset(ONENAND_CORE(flash), 0xff, size + (size >> 5)); in flash_init()
405 writew(manuf_id, flash->base + ONENAND_REG_MANUFACTURER_ID); in flash_init()
406 writew(device_id, flash->base + ONENAND_REG_DEVICE_ID); in flash_init()
407 writew(version_id, flash->base + ONENAND_REG_VERSION_ID); in flash_init()
413 writew(buffer_size, flash->base + ONENAND_REG_DATA_BUFFER_SIZE); in flash_init()
424 static void flash_exit(struct onenand_flash *flash) in flash_exit() argument
426 vfree(ONENAND_CORE(flash)); in flash_exit()
427 kfree(flash->base); in flash_exit()
451 if (flash_init(&info->flash)) { in onenand_sim_init()
460 info->onenand.base = info->flash.base; in onenand_sim_init()
461 info->onenand.priv = &info->flash; in onenand_sim_init()
468 flash_exit(&info->flash); in onenand_sim_init()
482 struct onenand_flash *flash = this->priv; in onenand_sim_exit() local
485 flash_exit(flash); in onenand_sim_exit()