Lines Matching refs:cword

368 	cfiword_t cword;  in flash_write_cmd()  local
371 flash_make_cmd(info, cmd, &cword); in flash_write_cmd()
375 cword.w8, info->chipwidth << CFI_FLASH_SHIFT_WIDTH); in flash_write_cmd()
376 flash_write8(cword.w8, addr); in flash_write_cmd()
380 cmd, cword.w16, in flash_write_cmd()
382 flash_write16(cword.w16, addr); in flash_write_cmd()
386 cmd, cword.w32, in flash_write_cmd()
388 flash_write32(cword.w32, addr); in flash_write_cmd()
395 print_longlong(str, cword.w64); in flash_write_cmd()
402 flash_write64(cword.w64, addr); in flash_write_cmd()
424 cfiword_t cword; in flash_isequal() local
428 flash_make_cmd(info, cmd, &cword); in flash_isequal()
433 debug("is= %x %x\n", flash_read8(addr), cword.w8); in flash_isequal()
434 retval = (flash_read8(addr) == cword.w8); in flash_isequal()
437 debug("is= %4.4x %4.4x\n", flash_read16(addr), cword.w16); in flash_isequal()
438 retval = (flash_read16(addr) == cword.w16); in flash_isequal()
441 debug("is= %8.8x %8.8x\n", flash_read32(addr), cword.w32); in flash_isequal()
442 retval = (flash_read32(addr) == cword.w32); in flash_isequal()
451 print_longlong(str2, cword.w64); in flash_isequal()
455 retval = (flash_read64(addr) == cword.w64); in flash_isequal()
472 cfiword_t cword; in flash_isset() local
476 flash_make_cmd(info, cmd, &cword); in flash_isset()
479 retval = ((flash_read8(addr) & cword.w8) == cword.w8); in flash_isset()
482 retval = ((flash_read16(addr) & cword.w16) == cword.w16); in flash_isset()
485 retval = ((flash_read32(addr) & cword.w32) == cword.w32); in flash_isset()
488 retval = ((flash_read64(addr) & cword.w64) == cword.w64); in flash_isset()
505 cfiword_t cword; in flash_toggle() local
509 flash_make_cmd(info, cmd, &cword); in flash_toggle()
721 static void flash_add_byte(flash_info_t *info, cfiword_t *cword, uchar c) in flash_add_byte() argument
731 cword->w8 = c; in flash_add_byte()
737 cword->w16 = (cword->w16 >> 8) | w; in flash_add_byte()
739 cword->w16 = (cword->w16 << 8) | c; in flash_add_byte()
746 cword->w32 = (cword->w32 >> 8) | l; in flash_add_byte()
748 cword->w32 = (cword->w32 << 8) | c; in flash_add_byte()
755 cword->w64 = (cword->w64 >> 8) | ll; in flash_add_byte()
757 cword->w64 = (cword->w64 << 8) | c; in flash_add_byte()
793 static int flash_write_cfiword(flash_info_t *info, ulong dest, cfiword_t cword) in flash_write_cfiword() argument
803 flag = ((flash_read8(dstaddr) & cword.w8) == cword.w8); in flash_write_cfiword()
806 flag = ((flash_read16(dstaddr) & cword.w16) == cword.w16); in flash_write_cfiword()
809 flag = ((flash_read32(dstaddr) & cword.w32) == cword.w32); in flash_write_cfiword()
812 flag = ((flash_read64(dstaddr) & cword.w64) == cword.w64); in flash_write_cfiword()
850 flash_write8(cword.w8, dstaddr); in flash_write_cfiword()
853 flash_write16(cword.w16, dstaddr); in flash_write_cfiword()
856 flash_write32(cword.w32, dstaddr); in flash_write_cfiword()
859 flash_write64(cword.w64, dstaddr); in flash_write_cfiword()
871 return flash_status_poll(info, &cword, dstaddr, in flash_write_cfiword()
1161 cfiword_t cword; in flash_erase() local
1164 cword.w64 = 0xffffffffffffffffULL; in flash_erase()
1166 st = flash_status_poll(info, &cword, dest, in flash_erase()
1330 cfiword_t cword; in write_buff() local
1355 cword.w32 = 0; in write_buff()
1358 flash_add_byte(info, &cword, flash_read8(p + i)); in write_buff()
1361 flash_add_byte(info, &cword, *src++); in write_buff()
1365 flash_add_byte(info, &cword, flash_read8(p + i)); in write_buff()
1367 rc = flash_write_cfiword(info, wp, cword); in write_buff()
1382 cword.w32 = 0; in write_buff()
1384 flash_add_byte(info, &cword, *src++); in write_buff()
1385 rc = flash_write_cfiword(info, wp, cword); in write_buff()
1411 cword.w32 = 0; in write_buff()
1413 flash_add_byte(info, &cword, *src++); in write_buff()
1414 rc = flash_write_cfiword(info, wp, cword); in write_buff()
1432 cword.w32 = 0; in write_buff()
1435 flash_add_byte(info, &cword, *src++); in write_buff()
1439 flash_add_byte(info, &cword, flash_read8(p + i)); in write_buff()
1441 return flash_write_cfiword(info, wp, cword); in write_buff()