Lines Matching refs:map
98 static int chip_ready (struct map_info *map, struct flchip *chip, unsigned long adr, int mode);
99 static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr, int mode);
100 static void put_chip(struct map_info *map, struct flchip *chip, unsigned long adr);
173 struct map_info *map = mtd->priv; in fixup_convert_atmel_pri() local
174 struct cfi_private *cfi = map->fldrv_priv; in fixup_convert_atmel_pri()
213 struct map_info *map = mtd->priv; in fixup_at49bv640dx_lock() local
214 struct cfi_private *cfi = map->fldrv_priv; in fixup_at49bv640dx_lock()
225 struct map_info *map = mtd->priv; in fixup_intel_strataflash() local
226 struct cfi_private *cfi = map->fldrv_priv; in fixup_intel_strataflash()
238 struct map_info *map = mtd->priv; in fixup_no_write_suspend() local
239 struct cfi_private *cfi = map->fldrv_priv; in fixup_no_write_suspend()
251 struct map_info *map = mtd->priv; in fixup_st_m28w320ct() local
252 struct cfi_private *cfi = map->fldrv_priv; in fixup_st_m28w320ct()
260 struct map_info *map = mtd->priv; in fixup_st_m28w320cb() local
261 struct cfi_private *cfi = map->fldrv_priv; in fixup_st_m28w320cb()
280 struct map_info *map = mtd->priv; in fixup_LH28F640BF() local
281 struct cfi_private *cfi = map->fldrv_priv; in fixup_LH28F640BF()
288 map_write(map, CMD(0x60), 0); in fixup_LH28F640BF()
289 map_write(map, CMD(0x04), 0); in fixup_LH28F640BF()
300 struct map_info *map = mtd->priv; in fixup_use_point() local
301 if (!mtd->_point && map_is_linear(map)) { in fixup_use_point()
309 struct map_info *map = mtd->priv; in fixup_use_write_buffers() local
310 struct cfi_private *cfi = map->fldrv_priv; in fixup_use_write_buffers()
323 struct map_info *map = mtd->priv; in fixup_unlock_powerup_lock() local
324 struct cfi_private *cfi = map->fldrv_priv; in fixup_unlock_powerup_lock()
392 read_pri_intelext(struct map_info *map, __u16 adr) in read_pri_intelext() argument
394 struct cfi_private *cfi = map->fldrv_priv; in read_pri_intelext()
400 extp = (struct cfi_pri_intelext *)cfi_read_pri(map, adr, extp_size, "Intel/Sharp"); in read_pri_intelext()
497 struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary) in cfi_cmdset_0001() argument
499 struct cfi_private *cfi = map->fldrv_priv; in cfi_cmdset_0001()
506 mtd->priv = map; in cfi_cmdset_0001()
520 mtd->name = map->name; in cfi_cmdset_0001()
535 extp = read_pri_intelext(map, adr); in cfi_cmdset_0001()
606 map->fldrv = &cfi_intelext_chipdrv; in cfi_cmdset_0001()
610 struct mtd_info *cfi_cmdset_0003(struct map_info *map, int primary) __attribute__((alias("cfi_cmdse…
611 struct mtd_info *cfi_cmdset_0200(struct map_info *map, int primary) __attribute__((alias("cfi_cmdse…
618 struct map_info *map = mtd->priv; in cfi_intelext_setup() local
619 struct cfi_private *cfi = map->fldrv_priv; in cfi_intelext_setup()
699 struct map_info *map = mtd->priv; in cfi_intelext_partition_fixup() local
759 map->name, mtd->writesize, in cfi_intelext_partition_fixup()
812 map->name, cfi->numchips, cfi->interleave, in cfi_intelext_partition_fixup()
815 map->fldrv_priv = newcfi; in cfi_intelext_partition_fixup()
826 static int chip_ready (struct map_info *map, struct flchip *chip, unsigned long adr, int mode) in chip_ready() argument
829 struct cfi_private *cfi = map->fldrv_priv; in chip_ready()
842 status = map_read(map, adr); in chip_ready()
843 if (map_word_andequal(map, status, status_OK, status_OK)) in chip_ready()
848 if (chip->priv && map_word_andequal(map, status, status_PWS, status_PWS)) in chip_ready()
881 map_write(map, CMD(0xB0), chip->in_progress_block_addr); in chip_ready()
888 map_write(map, CMD(0x70), chip->in_progress_block_addr); in chip_ready()
893 status = map_read(map, chip->in_progress_block_addr); in chip_ready()
894 if (map_word_andequal(map, status, status_OK, status_OK)) in chip_ready()
900 put_chip(map, chip, adr); in chip_ready()
902 "suspended: status = 0x%lx\n", map->name, status.x[0]); in chip_ready()
943 static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr, int mode) in get_chip() argument
989 ret = chip_ready(map, contender, contender->start, mode); in get_chip()
1005 put_chip(map, contender, contender->start); in get_chip()
1032 ret = chip_ready(map, chip, adr, mode); in get_chip()
1039 static void put_chip(struct map_info *map, struct flchip *chip, unsigned long adr) in put_chip() argument
1041 struct cfi_private *cfi = map->fldrv_priv; in put_chip()
1055 put_chip(map, loaner, loaner->start); in put_chip()
1089 map_write(map, CMD(0xd0), chip->in_progress_block_addr); in put_chip()
1090 map_write(map, CMD(0x70), chip->in_progress_block_addr); in put_chip()
1105 printk(KERN_ERR "%s: put_chip() called with oldstate %d!!\n", map->name, chip->oldstate); in put_chip()
1123 static void xip_disable(struct map_info *map, struct flchip *chip, in xip_disable() argument
1127 (void) map_read(map, adr); /* ensure mmu mapping is up to date */ in xip_disable()
1131 static void __xipram xip_enable(struct map_info *map, struct flchip *chip, in xip_enable() argument
1134 struct cfi_private *cfi = map->fldrv_priv; in xip_enable()
1136 map_write(map, CMD(0xff), adr); in xip_enable()
1139 (void) map_read(map, adr); in xip_enable()
1158 struct map_info *map, struct flchip *chip, in xip_wait_for_operation() argument
1161 struct cfi_private *cfi = map->fldrv_priv; in xip_wait_for_operation()
1190 map_write(map, CMD(0xb0), adr); in xip_wait_for_operation()
1191 map_write(map, CMD(0x70), adr); in xip_wait_for_operation()
1203 status = map_read(map, adr); in xip_wait_for_operation()
1204 } while (!map_word_andequal(map, status, OK, OK)); in xip_wait_for_operation()
1209 if (!map_word_bitsset(map, status, CMD(0x40))) in xip_wait_for_operation()
1214 if (!map_word_bitsset(map, status, CMD(0x04))) in xip_wait_for_operation()
1220 map_write(map, CMD(0xff), adr); in xip_wait_for_operation()
1221 (void) map_read(map, adr); in xip_wait_for_operation()
1248 map_write(map, CMD(0xd0), adr); in xip_wait_for_operation()
1249 map_write(map, CMD(0x70), adr); in xip_wait_for_operation()
1260 status = map_read(map, adr); in xip_wait_for_operation()
1262 } while (!map_word_andequal(map, status, OK, OK) in xip_wait_for_operation()
1275 #define XIP_INVAL_CACHED_RANGE(map, from, size) \ argument
1276 INVALIDATE_CACHED_RANGE(map, from, size)
1278 #define INVAL_CACHE_AND_WAIT(map, chip, cmd_adr, inval_adr, inval_len, usec, usec_max) \ argument
1279 xip_wait_for_operation(map, chip, cmd_adr, usec_max)
1283 #define xip_disable(map, chip, adr) argument
1284 #define xip_enable(map, chip, adr) argument
1289 struct map_info *map, struct flchip *chip, in inval_cache_and_wait_for_operation() argument
1293 struct cfi_private *cfi = map->fldrv_priv; in inval_cache_and_wait_for_operation()
1300 INVALIDATE_CACHED_RANGE(map, inval_adr, inval_len); in inval_cache_and_wait_for_operation()
1322 status = map_read(map, cmd_adr); in inval_cache_and_wait_for_operation()
1323 if (map_word_andequal(map, status, status_OK, status_OK)) in inval_cache_and_wait_for_operation()
1337 map_write(map, CMD(0x70), cmd_adr); in inval_cache_and_wait_for_operation()
1368 #define WAIT_TIMEOUT(map, chip, adr, udelay, udelay_max) \ argument
1369 INVAL_CACHE_AND_WAIT(map, chip, adr, 0, 0, udelay, udelay_max);
1372 static int do_point_onechip (struct map_info *map, struct flchip *chip, loff_t adr, size_t len) in do_point_onechip() argument
1375 struct cfi_private *cfi = map->fldrv_priv; in do_point_onechip()
1381 cmd_addr = adr & ~(map_bankwidth(map)-1); in do_point_onechip()
1385 ret = get_chip(map, chip, cmd_addr, FL_POINT); in do_point_onechip()
1389 map_write(map, CMD(0xff), cmd_addr); in do_point_onechip()
1402 struct map_info *map = mtd->priv; in cfi_intelext_point() local
1403 struct cfi_private *cfi = map->fldrv_priv; in cfi_intelext_point()
1408 if (!map->virt) in cfi_intelext_point()
1417 *virt = map->virt + cfi->chips[chipnum].start + ofs; in cfi_intelext_point()
1419 *phys = map->phys + cfi->chips[chipnum].start + ofs; in cfi_intelext_point()
1438 ret = do_point_onechip(map, &cfi->chips[chipnum], ofs, thislen); in cfi_intelext_point()
1454 struct map_info *map = mtd->priv; in cfi_intelext_unpoint() local
1455 struct cfi_private *cfi = map->fldrv_priv; in cfi_intelext_unpoint()
1484 printk(KERN_ERR "%s: Error: unpoint called on non pointed region\n", map->name); in cfi_intelext_unpoint()
1488 put_chip(map, chip, chip->start); in cfi_intelext_unpoint()
1499 static inline int do_read_onechip(struct map_info *map, struct flchip *chip, loff_t adr, size_t len… in do_read_onechip() argument
1502 struct cfi_private *cfi = map->fldrv_priv; in do_read_onechip()
1508 cmd_addr = adr & ~(map_bankwidth(map)-1); in do_read_onechip()
1511 ret = get_chip(map, chip, cmd_addr, FL_READY); in do_read_onechip()
1518 map_write(map, CMD(0xff), cmd_addr); in do_read_onechip()
1523 map_copy_from(map, buf, adr, len); in do_read_onechip()
1525 put_chip(map, chip, cmd_addr); in do_read_onechip()
1533 struct map_info *map = mtd->priv; in cfi_intelext_read() local
1534 struct cfi_private *cfi = map->fldrv_priv; in cfi_intelext_read()
1554 ret = do_read_onechip(map, &cfi->chips[chipnum], ofs, thislen, buf); in cfi_intelext_read()
1568 static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip, in do_write_oneword() argument
1571 struct cfi_private *cfi = map->fldrv_priv; in do_write_oneword()
1589 ret = get_chip(map, chip, adr, mode); in do_write_oneword()
1595 XIP_INVAL_CACHED_RANGE(map, adr, map_bankwidth(map)); in do_write_oneword()
1596 ENABLE_VPP(map); in do_write_oneword()
1597 xip_disable(map, chip, adr); in do_write_oneword()
1598 map_write(map, write_cmd, adr); in do_write_oneword()
1599 map_write(map, datum, adr); in do_write_oneword()
1602 ret = INVAL_CACHE_AND_WAIT(map, chip, adr, in do_write_oneword()
1603 adr, map_bankwidth(map), in do_write_oneword()
1607 xip_enable(map, chip, adr); in do_write_oneword()
1608 printk(KERN_ERR "%s: word write error (status timeout)\n", map->name); in do_write_oneword()
1613 status = map_read(map, adr); in do_write_oneword()
1614 if (map_word_bitsset(map, status, CMD(0x1a))) { in do_write_oneword()
1618 map_write(map, CMD(0x50), adr); in do_write_oneword()
1619 map_write(map, CMD(0x70), adr); in do_write_oneword()
1620 xip_enable(map, chip, adr); in do_write_oneword()
1625 printk(KERN_ERR "%s: word write error (bad VPP)\n", map->name); in do_write_oneword()
1628 printk(KERN_ERR "%s: word write error (status 0x%lx)\n", map->name, chipstatus); in do_write_oneword()
1635 xip_enable(map, chip, adr); in do_write_oneword()
1636 out: DISABLE_VPP(map); in do_write_oneword()
1637 put_chip(map, chip, adr); in do_write_oneword()
1645 struct map_info *map = mtd->priv; in cfi_intelext_write_words() local
1646 struct cfi_private *cfi = map->fldrv_priv; in cfi_intelext_write_words()
1655 if (ofs & (map_bankwidth(map)-1)) { in cfi_intelext_write_words()
1656 unsigned long bus_ofs = ofs & ~(map_bankwidth(map)-1); in cfi_intelext_write_words()
1661 n = min_t(int, len, map_bankwidth(map)-gap); in cfi_intelext_write_words()
1662 datum = map_word_ff(map); in cfi_intelext_write_words()
1663 datum = map_word_load_partial(map, datum, buf, gap, n); in cfi_intelext_write_words()
1665 ret = do_write_oneword(map, &cfi->chips[chipnum], in cfi_intelext_write_words()
1683 while(len >= map_bankwidth(map)) { in cfi_intelext_write_words()
1684 map_word datum = map_word_load(map, buf); in cfi_intelext_write_words()
1686 ret = do_write_oneword(map, &cfi->chips[chipnum], in cfi_intelext_write_words()
1691 ofs += map_bankwidth(map); in cfi_intelext_write_words()
1692 buf += map_bankwidth(map); in cfi_intelext_write_words()
1693 (*retlen) += map_bankwidth(map); in cfi_intelext_write_words()
1694 len -= map_bankwidth(map); in cfi_intelext_write_words()
1704 if (len & (map_bankwidth(map)-1)) { in cfi_intelext_write_words()
1707 datum = map_word_ff(map); in cfi_intelext_write_words()
1708 datum = map_word_load_partial(map, datum, buf, 0, len); in cfi_intelext_write_words()
1710 ret = do_write_oneword(map, &cfi->chips[chipnum], in cfi_intelext_write_words()
1722 static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip, in do_write_buffer() argument
1726 struct cfi_private *cfi = map->fldrv_priv; in do_write_buffer()
1750 ret = get_chip(map, chip, cmd_adr, FL_WRITING); in do_write_buffer()
1756 XIP_INVAL_CACHED_RANGE(map, initial_adr, initial_len); in do_write_buffer()
1757 ENABLE_VPP(map); in do_write_buffer()
1758 xip_disable(map, chip, cmd_adr); in do_write_buffer()
1765 map_write(map, CMD(0x70), cmd_adr); in do_write_buffer()
1768 status = map_read(map, cmd_adr); in do_write_buffer()
1769 if (map_word_bitsset(map, status, CMD(0x30))) { in do_write_buffer()
1770 xip_enable(map, chip, cmd_adr); in do_write_buffer()
1772 xip_disable(map, chip, cmd_adr); in do_write_buffer()
1773 map_write(map, CMD(0x50), cmd_adr); in do_write_buffer()
1774 map_write(map, CMD(0x70), cmd_adr); in do_write_buffer()
1778 map_write(map, write_cmd, cmd_adr); in do_write_buffer()
1779 ret = WAIT_TIMEOUT(map, chip, cmd_adr, 0, 0); in do_write_buffer()
1782 map_word Xstatus = map_read(map, cmd_adr); in do_write_buffer()
1783 map_write(map, CMD(0x70), cmd_adr); in do_write_buffer()
1785 status = map_read(map, cmd_adr); in do_write_buffer()
1786 map_write(map, CMD(0x50), cmd_adr); in do_write_buffer()
1787 map_write(map, CMD(0x70), cmd_adr); in do_write_buffer()
1788 xip_enable(map, chip, cmd_adr); in do_write_buffer()
1790 map->name, Xstatus.x[0], status.x[0]); in do_write_buffer()
1795 word_gap = (-adr & (map_bankwidth(map)-1)); in do_write_buffer()
1796 words = DIV_ROUND_UP(len - word_gap, map_bankwidth(map)); in do_write_buffer()
1800 word_gap = map_bankwidth(map) - word_gap; in do_write_buffer()
1802 datum = map_word_ff(map); in do_write_buffer()
1806 map_write(map, CMD(words), cmd_adr ); in do_write_buffer()
1812 int n = map_bankwidth(map) - word_gap; in do_write_buffer()
1818 if (!word_gap && len < map_bankwidth(map)) in do_write_buffer()
1819 datum = map_word_ff(map); in do_write_buffer()
1821 datum = map_word_load_partial(map, datum, in do_write_buffer()
1827 if (!len || word_gap == map_bankwidth(map)) { in do_write_buffer()
1828 map_write(map, datum, adr); in do_write_buffer()
1829 adr += map_bankwidth(map); in do_write_buffer()
1843 map_write(map, CMD(0xd0), cmd_adr); in do_write_buffer()
1846 ret = INVAL_CACHE_AND_WAIT(map, chip, cmd_adr, in do_write_buffer()
1851 map_write(map, CMD(0x70), cmd_adr); in do_write_buffer()
1853 xip_enable(map, chip, cmd_adr); in do_write_buffer()
1854 printk(KERN_ERR "%s: buffer write error (status timeout)\n", map->name); in do_write_buffer()
1859 status = map_read(map, cmd_adr); in do_write_buffer()
1860 if (map_word_bitsset(map, status, CMD(0x1a))) { in do_write_buffer()
1864 map_write(map, CMD(0x50), cmd_adr); in do_write_buffer()
1865 map_write(map, CMD(0x70), cmd_adr); in do_write_buffer()
1866 xip_enable(map, chip, cmd_adr); in do_write_buffer()
1871 printk(KERN_ERR "%s: buffer write error (bad VPP)\n", map->name); in do_write_buffer()
1874 printk(KERN_ERR "%s: buffer write error (status 0x%lx)\n", map->name, chipstatus); in do_write_buffer()
1881 xip_enable(map, chip, cmd_adr); in do_write_buffer()
1882 out: DISABLE_VPP(map); in do_write_buffer()
1883 put_chip(map, chip, cmd_adr); in do_write_buffer()
1891 struct map_info *map = mtd->priv; in cfi_intelext_writev() local
1892 struct cfi_private *cfi = map->fldrv_priv; in cfi_intelext_writev()
1915 ret = do_write_buffer(map, &cfi->chips[chipnum], in cfi_intelext_writev()
1951 static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip, in do_erase_oneblock() argument
1954 struct cfi_private *cfi = map->fldrv_priv; in do_erase_oneblock()
1963 ret = get_chip(map, chip, adr, FL_ERASING); in do_erase_oneblock()
1969 XIP_INVAL_CACHED_RANGE(map, adr, len); in do_erase_oneblock()
1970 ENABLE_VPP(map); in do_erase_oneblock()
1971 xip_disable(map, chip, adr); in do_erase_oneblock()
1974 map_write(map, CMD(0x50), adr); in do_erase_oneblock()
1977 map_write(map, CMD(0x20), adr); in do_erase_oneblock()
1978 map_write(map, CMD(0xD0), adr); in do_erase_oneblock()
1984 ret = INVAL_CACHE_AND_WAIT(map, chip, adr, in do_erase_oneblock()
1989 map_write(map, CMD(0x70), adr); in do_erase_oneblock()
1991 xip_enable(map, chip, adr); in do_erase_oneblock()
1992 printk(KERN_ERR "%s: block erase error: (status timeout)\n", map->name); in do_erase_oneblock()
1997 map_write(map, CMD(0x70), adr); in do_erase_oneblock()
1999 status = map_read(map, adr); in do_erase_oneblock()
2002 if (map_word_bitsset(map, status, CMD(0x3a))) { in do_erase_oneblock()
2006 map_write(map, CMD(0x50), adr); in do_erase_oneblock()
2007 map_write(map, CMD(0x70), adr); in do_erase_oneblock()
2008 xip_enable(map, chip, adr); in do_erase_oneblock()
2011 …printk(KERN_ERR "%s: block erase error: (bad command sequence, status 0x%lx)\n", map->name, chipst… in do_erase_oneblock()
2018 printk(KERN_ERR "%s: block erase error: (bad VPP)\n", map->name); in do_erase_oneblock()
2022 DISABLE_VPP(map); in do_erase_oneblock()
2023 put_chip(map, chip, adr); in do_erase_oneblock()
2027 … printk(KERN_ERR "%s: block erase failed at 0x%08lx (status 0x%lx)\n", map->name, adr, chipstatus); in do_erase_oneblock()
2034 xip_enable(map, chip, adr); in do_erase_oneblock()
2035 out: DISABLE_VPP(map); in do_erase_oneblock()
2036 put_chip(map, chip, adr); in do_erase_oneblock()
2049 struct map_info *map = mtd->priv; in cfi_intelext_sync() local
2050 struct cfi_private *cfi = map->fldrv_priv; in cfi_intelext_sync()
2059 ret = get_chip(map, chip, chip->start, FL_SYNCING); in cfi_intelext_sync()
2088 static int __xipram do_getlockstatus_oneblock(struct map_info *map, in do_getlockstatus_oneblock() argument
2093 struct cfi_private *cfi = map->fldrv_priv; in do_getlockstatus_oneblock()
2097 xip_disable(map, chip, adr+(2*ofs_factor)); in do_getlockstatus_oneblock()
2098 map_write(map, CMD(0x90), adr+(2*ofs_factor)); in do_getlockstatus_oneblock()
2100 status = cfi_read_query(map, adr+(2*ofs_factor)); in do_getlockstatus_oneblock()
2101 xip_enable(map, chip, 0); in do_getlockstatus_oneblock()
2106 static int __xipram do_printlockstatus_oneblock(struct map_info *map, in do_printlockstatus_oneblock() argument
2112 adr, do_getlockstatus_oneblock(map, chip, adr, len, thunk)); in do_printlockstatus_oneblock()
2120 static int __xipram do_xxlock_oneblock(struct map_info *map, struct flchip *chip, in do_xxlock_oneblock() argument
2123 struct cfi_private *cfi = map->fldrv_priv; in do_xxlock_oneblock()
2131 ret = get_chip(map, chip, adr, FL_LOCKING); in do_xxlock_oneblock()
2137 ENABLE_VPP(map); in do_xxlock_oneblock()
2138 xip_disable(map, chip, adr); in do_xxlock_oneblock()
2140 map_write(map, CMD(0x60), adr); in do_xxlock_oneblock()
2142 map_write(map, CMD(0x01), adr); in do_xxlock_oneblock()
2145 map_write(map, CMD(0xD0), adr); in do_xxlock_oneblock()
2164 ret = WAIT_TIMEOUT(map, chip, adr, mdelay, mdelay * 1000); in do_xxlock_oneblock()
2166 map_write(map, CMD(0x70), adr); in do_xxlock_oneblock()
2168 xip_enable(map, chip, adr); in do_xxlock_oneblock()
2169 printk(KERN_ERR "%s: block unlock error: (status timeout)\n", map->name); in do_xxlock_oneblock()
2173 xip_enable(map, chip, adr); in do_xxlock_oneblock()
2174 out: DISABLE_VPP(map); in do_xxlock_oneblock()
2175 put_chip(map, chip, adr); in do_xxlock_oneblock()
2237 typedef int (*otp_op_t)(struct map_info *map, struct flchip *chip,
2242 do_otp_read(struct map_info *map, struct flchip *chip, u_long offset, in do_otp_read() argument
2245 struct cfi_private *cfi = map->fldrv_priv; in do_otp_read()
2249 ret = get_chip(map, chip, chip->start, FL_JEDEC_QUERY); in do_otp_read()
2256 INVALIDATE_CACHED_RANGE(map, chip->start + offset, size); in do_otp_read()
2258 xip_disable(map, chip, chip->start); in do_otp_read()
2260 map_write(map, CMD(0x90), chip->start); in do_otp_read()
2263 map_copy_from(map, buf, chip->start + offset, size); in do_otp_read()
2264 xip_enable(map, chip, chip->start); in do_otp_read()
2267 INVALIDATE_CACHED_RANGE(map, chip->start + offset, size); in do_otp_read()
2269 put_chip(map, chip, chip->start); in do_otp_read()
2275 do_otp_write(struct map_info *map, struct flchip *chip, u_long offset, in do_otp_write() argument
2281 unsigned long bus_ofs = offset & ~(map_bankwidth(map)-1); in do_otp_write()
2283 int n = min_t(int, size, map_bankwidth(map)-gap); in do_otp_write()
2284 map_word datum = map_word_ff(map); in do_otp_write()
2286 datum = map_word_load_partial(map, datum, buf, gap, n); in do_otp_write()
2287 ret = do_write_oneword(map, chip, bus_ofs, datum, FL_OTP_WRITE); in do_otp_write()
2300 do_otp_lock(struct map_info *map, struct flchip *chip, u_long offset, in do_otp_lock() argument
2303 struct cfi_private *cfi = map->fldrv_priv; in do_otp_lock()
2310 datum = map_word_ff(map); in do_otp_lock()
2311 datum = map_word_clr(map, datum, CMD(1 << grpno)); in do_otp_lock()
2312 return do_write_oneword(map, chip, prot, datum, FL_OTP_WRITE); in do_otp_lock()
2319 struct map_info *map = mtd->priv; in cfi_intelext_otp_walk() local
2320 struct cfi_private *cfi = map->fldrv_priv; in cfi_intelext_otp_walk()
2394 ret = do_otp_read(map, chip, in cfi_intelext_otp_walk()
2397 map_bankwidth(map), in cfi_intelext_otp_walk()
2405 !map_word_bitsset(map, lockword, in cfi_intelext_otp_walk()
2420 ret = action(map, chip, data_offset, in cfi_intelext_otp_walk()
2526 struct map_info *map = mtd->priv; in cfi_intelext_suspend() local
2527 struct cfi_private *cfi = map->fldrv_priv; in cfi_intelext_suspend()
2549 map_write(map, CMD(0xFF), cfi->chips[i].start); in cfi_intelext_suspend()
2621 struct map_info *map = mtd->priv; in cfi_intelext_resume() local
2622 struct cfi_private *cfi = map->fldrv_priv; in cfi_intelext_resume()
2637 map_write(map, CMD(0xFF), cfi->chips[i].start); in cfi_intelext_resume()
2652 struct map_info *map = mtd->priv; in cfi_intelext_reset() local
2653 struct cfi_private *cfi = map->fldrv_priv; in cfi_intelext_reset()
2663 ret = get_chip(map, chip, chip->start, FL_SHUTDOWN); in cfi_intelext_reset()
2665 map_write(map, CMD(0xff), chip->start); in cfi_intelext_reset()
2667 put_chip(map, chip, chip->start); in cfi_intelext_reset()
2687 struct map_info *map = mtd->priv; in cfi_intelext_destroy() local
2688 struct cfi_private *cfi = map->fldrv_priv; in cfi_intelext_destroy()