Lines Matching refs:chipnum
1240 int chipnum; in cfi_amdstd_read() local
1244 chipnum = (from >> cfi->chipshift); in cfi_amdstd_read()
1245 ofs = from - (chipnum << cfi->chipshift); in cfi_amdstd_read()
1250 if (chipnum >= cfi->numchips) in cfi_amdstd_read()
1258 ret = do_read_onechip(map, &cfi->chips[chipnum], ofs, thislen, buf); in cfi_amdstd_read()
1267 chipnum++; in cfi_amdstd_read()
1348 int chipnum; in cfi_amdstd_secsi_read() local
1353 chipnum=from>>3; in cfi_amdstd_secsi_read()
1359 if (chipnum >= cfi->numchips) in cfi_amdstd_secsi_read()
1367 ret = do_read_secsi_onechip(map, &cfi->chips[chipnum], ofs, in cfi_amdstd_secsi_read()
1377 chipnum++; in cfi_amdstd_secsi_read()
1488 int chipnum; in cfi_amdstd_otp_walk() local
1499 for (chipnum = 0; chipnum < cfi->numchips; chipnum++) { in cfi_amdstd_otp_walk()
1500 chip = &cfi->chips[chipnum]; in cfi_amdstd_otp_walk()
1819 int chipnum; in cfi_amdstd_write_words() local
1823 chipnum = to >> cfi->chipshift; in cfi_amdstd_write_words()
1824 ofs = to - (chipnum << cfi->chipshift); in cfi_amdstd_write_words()
1825 chipstart = cfi->chips[chipnum].start; in cfi_amdstd_write_words()
1835 mutex_lock(&cfi->chips[chipnum].mutex); in cfi_amdstd_write_words()
1837 if (cfi->chips[chipnum].state != FL_READY) { in cfi_amdstd_write_words()
1839 add_wait_queue(&cfi->chips[chipnum].wq, &wait); in cfi_amdstd_write_words()
1841 mutex_unlock(&cfi->chips[chipnum].mutex); in cfi_amdstd_write_words()
1844 remove_wait_queue(&cfi->chips[chipnum].wq, &wait); in cfi_amdstd_write_words()
1851 mutex_unlock(&cfi->chips[chipnum].mutex); in cfi_amdstd_write_words()
1858 ret = do_write_oneword(map, &cfi->chips[chipnum], in cfi_amdstd_write_words()
1869 chipnum ++; in cfi_amdstd_write_words()
1871 if (chipnum == cfi->numchips) in cfi_amdstd_write_words()
1882 ret = do_write_oneword(map, &cfi->chips[chipnum], in cfi_amdstd_write_words()
1893 chipnum ++; in cfi_amdstd_write_words()
1895 if (chipnum == cfi->numchips) in cfi_amdstd_write_words()
1897 chipstart = cfi->chips[chipnum].start; in cfi_amdstd_write_words()
1906 mutex_lock(&cfi->chips[chipnum].mutex); in cfi_amdstd_write_words()
1908 if (cfi->chips[chipnum].state != FL_READY) { in cfi_amdstd_write_words()
1910 add_wait_queue(&cfi->chips[chipnum].wq, &wait); in cfi_amdstd_write_words()
1912 mutex_unlock(&cfi->chips[chipnum].mutex); in cfi_amdstd_write_words()
1915 remove_wait_queue(&cfi->chips[chipnum].wq, &wait); in cfi_amdstd_write_words()
1921 mutex_unlock(&cfi->chips[chipnum].mutex); in cfi_amdstd_write_words()
1925 ret = do_write_oneword(map, &cfi->chips[chipnum], in cfi_amdstd_write_words()
2099 int chipnum; in cfi_amdstd_write_buffers() local
2102 chipnum = to >> cfi->chipshift; in cfi_amdstd_write_buffers()
2103 ofs = to - (chipnum << cfi->chipshift); in cfi_amdstd_write_buffers()
2110 ret = cfi_amdstd_write_words(mtd, ofs + (chipnum<<cfi->chipshift), in cfi_amdstd_write_buffers()
2119 chipnum ++; in cfi_amdstd_write_buffers()
2121 if (chipnum == cfi->numchips) in cfi_amdstd_write_buffers()
2136 ret = do_write_buffer(map, &cfi->chips[chipnum], in cfi_amdstd_write_buffers()
2147 chipnum ++; in cfi_amdstd_write_buffers()
2149 if (chipnum == cfi->numchips) in cfi_amdstd_write_buffers()
2157 ret = cfi_amdstd_write_words(mtd, ofs + (chipnum<<cfi->chipshift), in cfi_amdstd_write_buffers()
2311 int chipnum; in cfi_amdstd_panic_write() local
2313 chipnum = to >> cfi->chipshift; in cfi_amdstd_panic_write()
2314 ofs = to - (chipnum << cfi->chipshift); in cfi_amdstd_panic_write()
2315 chipstart = cfi->chips[chipnum].start; in cfi_amdstd_panic_write()
2324 ret = cfi_amdstd_panic_wait(map, &cfi->chips[chipnum], bus_ofs); in cfi_amdstd_panic_write()
2336 ret = do_panic_write_oneword(map, &cfi->chips[chipnum], in cfi_amdstd_panic_write()
2347 chipnum++; in cfi_amdstd_panic_write()
2349 if (chipnum == cfi->numchips) in cfi_amdstd_panic_write()
2360 ret = do_panic_write_oneword(map, &cfi->chips[chipnum], in cfi_amdstd_panic_write()
2371 chipnum++; in cfi_amdstd_panic_write()
2373 if (chipnum == cfi->numchips) in cfi_amdstd_panic_write()
2376 chipstart = cfi->chips[chipnum].start; in cfi_amdstd_panic_write()
2384 ret = cfi_amdstd_panic_wait(map, &cfi->chips[chipnum], ofs); in cfi_amdstd_panic_write()
2392 ret = do_panic_write_oneword(map, &cfi->chips[chipnum], in cfi_amdstd_panic_write()
2799 int chipnum; in cfi_ppb_unlock() local
2824 chipnum = 0; in cfi_ppb_unlock()
2839 sect[sectors].chip = &cfi->chips[chipnum]; in cfi_ppb_unlock()
2842 map, &cfi->chips[chipnum], adr, 0, in cfi_ppb_unlock()
2857 chipnum++; in cfi_ppb_unlock()
2859 if (chipnum >= cfi->numchips) in cfi_ppb_unlock()