Lines Matching full:adr

125 		__u16 adr = primary?cfi->cfiq->P_ADR:cfi->cfiq->A_ADR;  in cfi_cmdset_0020()  local
128 extp = (struct cfi_pri_intelext*)cfi_read_pri(map, adr, sizeof(*extp), "ST Microelectronics"); in cfi_cmdset_0020()
249 static inline int do_read_onechip(struct map_info *map, struct flchip *chip, loff_t adr, size_t len… in do_read_onechip() argument
258 adr += chip->start; in do_read_onechip()
261 cmd_addr = adr & ~(map_bankwidth(map)-1); in do_read_onechip()
362 map_copy_from(map, buf, adr, len); in do_read_onechip()
422 unsigned long adr, const u_char *buf, int len) in do_write_buffer() argument
431 if (adr & (map_bankwidth(map)-1)) in do_write_buffer()
435 adr += chip->start; in do_write_buffer()
436 cmd_adr = adr & ~(wbufsize-1); in do_write_buffer()
528 map_write(map, d, adr+z); in do_write_buffer()
562 map_write(map, CMD(0x70), adr); in do_write_buffer()
596 map_write(map, CMD(0x70), adr); in do_write_buffer()
733 static inline int do_erase_oneblock(struct map_info *map, struct flchip *chip, unsigned long adr) in do_erase_oneblock() argument
742 adr += chip->start; in do_erase_oneblock()
756 map_write(map, CMD(0x70), adr); in do_erase_oneblock()
760 status = map_read(map, adr); in do_erase_oneblock()
790 map_write(map, CMD(0x50), adr); in do_erase_oneblock()
793 map_write(map, CMD(0x20), adr); in do_erase_oneblock()
794 map_write(map, CMD(0xD0), adr); in do_erase_oneblock()
818 status = map_read(map, adr); in do_erase_oneblock()
824 map_write(map, CMD(0x70), adr); in do_erase_oneblock()
826 …rase to complete timed out. Xstatus = %lx, status = %lx.\n", status.x[0], map_read(map, adr).x[0]); in do_erase_oneblock()
842 map_write(map, CMD(0x70), adr); in do_erase_oneblock()
844 status = map_read(map, adr); in do_erase_oneblock()
860 map_write(map, CMD(0x50), adr); in do_erase_oneblock()
861 map_write(map, CMD(0x70), adr); in do_erase_oneblock()
875 printk(KERN_DEBUG "Chip erase failed at 0x%08lx: status 0x%x. Retrying...\n", adr, chipstatus); in do_erase_oneblock()
881 printk(KERN_DEBUG "Chip erase failed at 0x%08lx: status 0x%x\n", adr, chipstatus); in do_erase_oneblock()
895 unsigned long adr, len; in cfi_staa_erase_varsize() local
944 adr = instr->addr - (chipnum << cfi->chipshift); in cfi_staa_erase_varsize()
950 ret = do_erase_oneblock(map, &cfi->chips[chipnum], adr); in cfi_staa_erase_varsize()
955 adr += regions[i].erasesize; in cfi_staa_erase_varsize()
958 …if (adr % (1<< cfi->chipshift) == (((unsigned long)regions[i].offset + (regions[i].erasesize * reg… in cfi_staa_erase_varsize()
961 if (adr >> cfi->chipshift) { in cfi_staa_erase_varsize()
962 adr = 0; in cfi_staa_erase_varsize()
1032 static inline int do_lock_oneblock(struct map_info *map, struct flchip *chip, unsigned long adr) in do_lock_oneblock() argument
1039 adr += chip->start; in do_lock_oneblock()
1053 map_write(map, CMD(0x70), adr); in do_lock_oneblock()
1057 status = map_read(map, adr); in do_lock_oneblock()
1086 map_write(map, CMD(0x60), adr); in do_lock_oneblock()
1087 map_write(map, CMD(0x01), adr); in do_lock_oneblock()
1100 status = map_read(map, adr); in do_lock_oneblock()
1106 map_write(map, CMD(0x70), adr); in do_lock_oneblock()
1108 …lock to complete timed out. Xstatus = %lx, status = %lx.\n", status.x[0], map_read(map, adr).x[0]); in do_lock_oneblock()
1131 unsigned long adr; in cfi_staa_lock() local
1144 adr = ofs - (chipnum << cfi->chipshift); in cfi_staa_lock()
1150 printk("before lock: block status register is %x\n",cfi_read_query(map, adr+(2*ofs_factor))); in cfi_staa_lock()
1154 ret = do_lock_oneblock(map, &cfi->chips[chipnum], adr); in cfi_staa_lock()
1158 printk("after lock: block status register is %x\n",cfi_read_query(map, adr+(2*ofs_factor))); in cfi_staa_lock()
1165 adr += mtd->erasesize; in cfi_staa_lock()
1168 if (adr >> cfi->chipshift) { in cfi_staa_lock()
1169 adr = 0; in cfi_staa_lock()
1178 static inline int do_unlock_oneblock(struct map_info *map, struct flchip *chip, unsigned long adr) in do_unlock_oneblock() argument
1185 adr += chip->start; in do_unlock_oneblock()
1199 map_write(map, CMD(0x70), adr); in do_unlock_oneblock()
1203 status = map_read(map, adr); in do_unlock_oneblock()
1232 map_write(map, CMD(0x60), adr); in do_unlock_oneblock()
1233 map_write(map, CMD(0xD0), adr); in do_unlock_oneblock()
1246 status = map_read(map, adr); in do_unlock_oneblock()
1252 map_write(map, CMD(0x70), adr); in do_unlock_oneblock()
1254 …lock to complete timed out. Xstatus = %lx, status = %lx.\n", status.x[0], map_read(map, adr).x[0]); in do_unlock_oneblock()
1277 unsigned long adr; in cfi_staa_unlock() local
1284 adr = ofs - (chipnum << cfi->chipshift); in cfi_staa_unlock()
1288 unsigned long temp_adr = adr; in cfi_staa_unlock()
1301 ret = do_unlock_oneblock(map, &cfi->chips[chipnum], adr); in cfi_staa_unlock()
1305 printk("after unlock: block status register is %x\n",cfi_read_query(map, adr+(2*ofs_factor))); in cfi_staa_unlock()