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()
1821 int chipnum; in cfi_amdstd_write_words() local
1825 chipnum = to >> cfi->chipshift; in cfi_amdstd_write_words()
1826 ofs = to - (chipnum << cfi->chipshift); in cfi_amdstd_write_words()
1827 chipstart = cfi->chips[chipnum].start; in cfi_amdstd_write_words()
1837 mutex_lock(&cfi->chips[chipnum].mutex); in cfi_amdstd_write_words()
1839 if (cfi->chips[chipnum].state != FL_READY) { in cfi_amdstd_write_words()
1841 add_wait_queue(&cfi->chips[chipnum].wq, &wait); in cfi_amdstd_write_words()
1843 mutex_unlock(&cfi->chips[chipnum].mutex); in cfi_amdstd_write_words()
1846 remove_wait_queue(&cfi->chips[chipnum].wq, &wait); in cfi_amdstd_write_words()
1853 mutex_unlock(&cfi->chips[chipnum].mutex); in cfi_amdstd_write_words()
1860 ret = do_write_oneword(map, &cfi->chips[chipnum], in cfi_amdstd_write_words()
1871 chipnum ++; in cfi_amdstd_write_words()
1873 if (chipnum == cfi->numchips) in cfi_amdstd_write_words()
1884 ret = do_write_oneword(map, &cfi->chips[chipnum], in cfi_amdstd_write_words()
1895 chipnum ++; in cfi_amdstd_write_words()
1897 if (chipnum == cfi->numchips) in cfi_amdstd_write_words()
1899 chipstart = cfi->chips[chipnum].start; in cfi_amdstd_write_words()
1908 mutex_lock(&cfi->chips[chipnum].mutex); in cfi_amdstd_write_words()
1910 if (cfi->chips[chipnum].state != FL_READY) { in cfi_amdstd_write_words()
1912 add_wait_queue(&cfi->chips[chipnum].wq, &wait); in cfi_amdstd_write_words()
1914 mutex_unlock(&cfi->chips[chipnum].mutex); in cfi_amdstd_write_words()
1917 remove_wait_queue(&cfi->chips[chipnum].wq, &wait); in cfi_amdstd_write_words()
1923 mutex_unlock(&cfi->chips[chipnum].mutex); in cfi_amdstd_write_words()
1927 ret = do_write_oneword(map, &cfi->chips[chipnum], in cfi_amdstd_write_words()
2102 int chipnum; in cfi_amdstd_write_buffers() local
2105 chipnum = to >> cfi->chipshift; in cfi_amdstd_write_buffers()
2106 ofs = to - (chipnum << cfi->chipshift); in cfi_amdstd_write_buffers()
2113 ret = cfi_amdstd_write_words(mtd, ofs + (chipnum<<cfi->chipshift), in cfi_amdstd_write_buffers()
2122 chipnum ++; in cfi_amdstd_write_buffers()
2124 if (chipnum == cfi->numchips) in cfi_amdstd_write_buffers()
2139 ret = do_write_buffer(map, &cfi->chips[chipnum], in cfi_amdstd_write_buffers()
2150 chipnum ++; in cfi_amdstd_write_buffers()
2152 if (chipnum == cfi->numchips) in cfi_amdstd_write_buffers()
2160 ret = cfi_amdstd_write_words(mtd, ofs + (chipnum<<cfi->chipshift), in cfi_amdstd_write_buffers()
2314 int chipnum; in cfi_amdstd_panic_write() local
2316 chipnum = to >> cfi->chipshift; in cfi_amdstd_panic_write()
2317 ofs = to - (chipnum << cfi->chipshift); in cfi_amdstd_panic_write()
2318 chipstart = cfi->chips[chipnum].start; in cfi_amdstd_panic_write()
2327 ret = cfi_amdstd_panic_wait(map, &cfi->chips[chipnum], bus_ofs); in cfi_amdstd_panic_write()
2339 ret = do_panic_write_oneword(map, &cfi->chips[chipnum], in cfi_amdstd_panic_write()
2350 chipnum++; in cfi_amdstd_panic_write()
2352 if (chipnum == cfi->numchips) in cfi_amdstd_panic_write()
2363 ret = do_panic_write_oneword(map, &cfi->chips[chipnum], in cfi_amdstd_panic_write()
2374 chipnum++; in cfi_amdstd_panic_write()
2376 if (chipnum == cfi->numchips) in cfi_amdstd_panic_write()
2379 chipstart = cfi->chips[chipnum].start; in cfi_amdstd_panic_write()
2387 ret = cfi_amdstd_panic_wait(map, &cfi->chips[chipnum], ofs); in cfi_amdstd_panic_write()
2395 ret = do_panic_write_oneword(map, &cfi->chips[chipnum], in cfi_amdstd_panic_write()
2808 int chipnum; in cfi_ppb_unlock() local
2833 chipnum = 0; in cfi_ppb_unlock()
2848 sect[sectors].chip = &cfi->chips[chipnum]; in cfi_ppb_unlock()
2851 map, &cfi->chips[chipnum], adr, 0, in cfi_ppb_unlock()
2866 chipnum++; in cfi_ppb_unlock()
2868 if (chipnum >= cfi->numchips) in cfi_ppb_unlock()