Lines Matching full:flash
378 /* ---------- FLASH stuff ---------- */
383 #define FLASH_DIR_COOKIE "*** ADAPTEC FLASH DIRECTORY *** "
572 d = asd_read_reg_byte(asd_ha, asd_ha->hw_prof.flash.bar); in asd_poll_flash()
573 d ^= asd_read_reg_byte(asd_ha, asd_ha->hw_prof.flash.bar); in asd_poll_flash()
588 asd_write_reg_byte(asd_ha, asd_ha->hw_prof.flash.bar, FLASH_RESET); in asd_reset_flash()
597 asd_read_reg_string(asd_ha, buffer, asd_ha->hw_prof.flash.bar+offs, in asd_read_flash_seg()
603 * asd_find_flash_dir - finds and reads the flash directory
605 * @flash_dir: pointer to flash directory structure
607 * If found, the flash directory segment will be copied to
619 asd_ha->hw_prof.flash.dir_offs = v; in asd_find_flash_dir()
636 &asd_ha->hw_prof.flash.bar)) { in asd_flash_getid()
641 asd_ha->hw_prof.flash.present = 1; in asd_flash_getid()
642 asd_ha->hw_prof.flash.wide = reg & FLASHW ? 1 : 0; in asd_flash_getid()
645 ASD_DPRINTK("couldn't reset flash(%d)\n", err); in asd_flash_getid()
756 * since when it was read, its size was taken from the flash directory,
866 * @flash_dir: pointer to the flash directory
979 * @flash_dir: pointer to the flash directory
1044 * asd_read_flash - read flash memory
1062 ASD_DPRINTK("couldn't find flash directory\n"); in asd_read_flash()
1067 asd_printk("unsupported flash dir version:0x%x\n", in asd_read_flash()
1090 * asd_verify_flash_seg - verify data with flash memory
1093 * @dest_offset: offset from flash memory
1104 reg = asd_ha->hw_prof.flash.bar; in asd_verify_flash_seg()
1121 * asd_write_flash_seg - write data into flash memory
1124 * @dest_offset: offset from flash memory
1134 reg = asd_ha->hw_prof.flash.bar; in asd_write_flash_seg()
1139 ASD_DPRINTK("couldn't find the type of flash. err=%d\n", err); in asd_write_flash_seg()
1153 ASD_DPRINTK("couldn't reset flash. err=%d\n", err); in asd_write_flash_seg()
1160 switch (asd_ha->hw_prof.flash.method) { in asd_write_flash_seg()
1200 ASD_DPRINTK("couldn't reset flash. err=%d\n", err); in asd_write_flash_seg()
1218 reg = asd_ha->hw_prof.flash.bar; in asd_chk_write_status()
1264 * asd_hwi_erase_nv_sector - Erase the flash memory sectors.
1266 * @flash_addr: pointer to offset from flash memory
1274 reg = asd_ha->hw_prof.flash.bar; in asd_erase_nv_sector()
1280 * Erasing an flash sector needs to be done in six consecutive in asd_erase_nv_sector()
1284 switch (asd_ha->hw_prof.flash.method) { in asd_erase_nv_sector()
1323 /* get Flash memory base address */ in asd_check_flash_type()
1324 reg = asd_ha->hw_prof.flash.bar; in asd_check_flash_type()
1326 /* Determine flash info */ in asd_check_flash_type()
1329 ASD_DPRINTK("couldn't reset flash. err=%d\n", err); in asd_check_flash_type()
1333 asd_ha->hw_prof.flash.method = FLASH_METHOD_UNKNOWN; in asd_check_flash_type()
1334 asd_ha->hw_prof.flash.manuf = FLASH_MANUF_ID_UNKNOWN; in asd_check_flash_type()
1335 asd_ha->hw_prof.flash.dev_id = FLASH_DEV_ID_UNKNOWN; in asd_check_flash_type()
1337 /* Get flash info. This would most likely be AMD Am29LV family flash. in asd_check_flash_type()
1341 inc = asd_ha->hw_prof.flash.wide ? 2 : 1; in asd_check_flash_type()
1351 ASD_DPRINTK("couldn't reset flash. err=%d\n", err); in asd_check_flash_type()
1354 ASD_DPRINTK("Flash MethodA manuf_id(0x%x) dev_id(0x%x) " in asd_check_flash_type()
1366 asd_ha->hw_prof.flash.method = FLASH_METHOD_A; in asd_check_flash_type()
1376 asd_ha->hw_prof.flash.method = FLASH_METHOD_A; in asd_check_flash_type()
1386 asd_ha->hw_prof.flash.method = FLASH_METHOD_A; in asd_check_flash_type()
1393 asd_ha->hw_prof.flash.method = FLASH_METHOD_A; in asd_check_flash_type()
1399 if (asd_ha->hw_prof.flash.method == FLASH_METHOD_UNKNOWN) { in asd_check_flash_type()
1402 ASD_DPRINTK("couldn't reset flash. err=%d\n", err); in asd_check_flash_type()
1414 ASD_DPRINTK("Flash MethodB manuf_id(0x%x) dev_id(0x%x) sec_prot" in asd_check_flash_type()
1419 ASD_DPRINTK("couldn't reset flash. err=%d\n", err); in asd_check_flash_type()
1427 asd_ha->hw_prof.flash.method = FLASH_METHOD_B; in asd_check_flash_type()
1436 asd_ha->hw_prof.flash.method = FLASH_METHOD_B; in asd_check_flash_type()
1445 asd_ha->hw_prof.flash.method = FLASH_METHOD_B; in asd_check_flash_type()
1452 asd_ha->hw_prof.flash.method = FLASH_METHOD_B; in asd_check_flash_type()
1459 asd_ha->hw_prof.flash.method = FLASH_METHOD_B; in asd_check_flash_type()
1468 if (asd_ha->hw_prof.flash.method == FLASH_METHOD_UNKNOWN) in asd_check_flash_type()
1471 asd_ha->hw_prof.flash.manuf = manuf_id; in asd_check_flash_type()
1472 asd_ha->hw_prof.flash.dev_id = dev_id; in asd_check_flash_type()
1473 asd_ha->hw_prof.flash.sec_prot = sec_prot; in asd_check_flash_type()