Lines Matching defs:page

178  * the largest page size we support is 8K, this will have 16 steps/codewords
371 * @data_buffer: our local DMA buffer for page read/writes,
495 * of a page, consisting of all data, ecc, spare
792 static void set_address(struct qcom_nand_host *host, u16 column, int page)
799 nandc_set_reg(chip, NAND_ADDR0, page << 16 | column);
800 nandc_set_reg(chip, NAND_ADDR1, page >> 16 & 0xff);
1217 * before reading a NAND page.
1234 * before reading each codeword in NAND page.
1264 * single codeword in page
1276 * before writing a NAND page.
1291 * before writing each codeword in NAND page.
1396 * verify if the page is erased or not, and fix up the page for RS ECC by
1404 * an erased page flags an error in NAND_FLASH_STATUS, check if the page
1464 u8 *data_buf, u8 *oob_buf, int page, int cw)
1473 nand_read_page_op(chip, page, 0, NULL, 0);
1483 set_address(host, host->cw_size * cw, page);
1538 * error. The page will be assumed as erased if this count is less than or
1553 int page, unsigned int max_bitflips)
1583 cw_oob_buf, page, cw);
1588 * make sure it isn't an erased page reported
1607 * reads back status registers set by the controller to notify page read
1611 u8 *oob_buf, int page)
1661 * complete page is read i.e. data_buf is not NULL.
1676 * EIO will be returned for page read.
1705 uncorrectable_cws, page,
1710 * helper to perform the actual page read operation, used by ecc->read_page(),
1714 u8 *oob_buf, int page)
1781 dev_err(nandc->dev, "failure to read page/oob\n");
1785 return parse_read_errors(host, data_buf_start, oob_buf_start, page);
1789 * a helper that copies the last step/codeword of a page (containing free oob)
1792 static int copy_last_cw(struct qcom_nand_host *host, int page)
1807 set_address(host, host->cw_size * (ecc->steps - 1), page);
1821 static bool qcom_nandc_is_boot_partition(struct qcom_nand_host *host, int page)
1829 * optimize the page check by:
1831 * 1. Checking if the page lies after the last boot partition.
1841 if (page > end)
1845 if (page < end && page >= start)
1854 if (page < end && page >= start)
1861 static void qcom_nandc_codeword_fixup(struct qcom_nand_host *host, int page)
1863 bool codeword_fixup = qcom_nandc_is_boot_partition(host, page);
1886 int oob_required, int page)
1894 qcom_nandc_codeword_fixup(host, page);
1896 nand_read_page_op(chip, page, 0, NULL, 0);
1901 set_address(host, 0, page);
1909 return read_page_ecc(host, data_buf, oob_buf, page);
1914 int oob_required, int page)
1923 qcom_nandc_codeword_fixup(host, page);
1927 page, cw);
1939 static int qcom_nandc_read_oob(struct nand_chip *chip, int page)
1946 qcom_nandc_codeword_fixup(host, page);
1952 set_address(host, 0, page);
1955 return read_page_ecc(host, NULL, chip->oob_poi, page);
1960 int oob_required, int page)
1969 qcom_nandc_codeword_fixup(host, page);
1971 nand_prog_page_begin_op(chip, page, 0, NULL, 0);
1973 set_address(host, 0, page);
2023 dev_err(nandc->dev, "failure to write page\n");
2033 int page)
2043 qcom_nandc_codeword_fixup(host, page);
2045 nand_prog_page_begin_op(chip, page, 0, NULL, 0);
2096 dev_err(nandc->dev, "failure to write raw page\n");
2110 static int qcom_nandc_write_oob(struct nand_chip *chip, int page)
2121 qcom_nandc_codeword_fixup(host, page);
2135 set_address(host, host->cw_size * (ecc->steps - 1), page);
2158 int page, ret, bbpos, bad = 0;
2160 page = (int)(ofs >> chip->page_shift) & chip->pagemask;
2163 * configure registers for a raw sub page read, the address is set to
2171 ret = copy_last_cw(host, page);
2195 int page, ret;
2207 page = (int)(ofs >> chip->page_shift) & chip->pagemask;
2211 set_address(host, host->cw_size * (ecc->steps - 1), page);
2229 * NAND controller page layout info
2242 * n = Number of codewords in the page
2248 * 2K page: n = 4, spare = 16 bytes
2249 * 4K page: n = 8, spare = 32 bytes
2250 * 8K page: n = 16, spare = 64 bytes
2252 * the qcom nand controller operates at a sub page/codeword level. each
2260 * When we access a page with ECC enabled, the reserved bytes(s) are not
2276 * n = Number of codewords in the page
2300 * n = Number of codewords in the page
2308 * inaccessible Bad Block byte(s) are ignored when we write to a page/oob,
2309 * and assumed as 0xffs when we read a page/oob. The ECC, unused and
2937 dev_err(nandc->dev, "failure in submitting param page descriptor\n");
3113 * Initially allocate BAM transaction to read ONFI param page.
3283 * of a page with ECC disabled. currently, the nand_base and nand_bbt