Lines Matching refs:nand_chip

156 	struct nand_chip		nand;
273 struct nand_chip *nand = mtd->priv; in omap_read_buf8()
309 struct nand_chip *nand = mtd->priv; in omap_read_buf16()
958 struct nand_chip *chip = mtd->priv; in omap_enable_hwecc()
1002 static int omap_wait(struct mtd_info *mtd, struct nand_chip *chip) in omap_wait()
1004 struct nand_chip *this = mtd->priv; in omap_wait()
1064 struct nand_chip *chip = mtd->priv; in omap_enable_hwecc_bch()
1507 static int omap_write_page_bch(struct mtd_info *mtd, struct nand_chip *chip, in omap_write_page_bch()
1546 static int omap_read_page_bch(struct mtd_info *mtd, struct nand_chip *chip, in omap_read_page_bch()
1658 struct nand_chip *nand_chip; in omap_nand_probe() local
1689 nand_chip = &info->nand; in omap_nand_probe()
1690 nand_chip->ecc.priv = NULL; in omap_nand_probe()
1693 nand_chip->IO_ADDR_R = devm_ioremap_resource(&pdev->dev, res); in omap_nand_probe()
1694 if (IS_ERR(nand_chip->IO_ADDR_R)) in omap_nand_probe()
1695 return PTR_ERR(nand_chip->IO_ADDR_R); in omap_nand_probe()
1699 nand_chip->controller = &omap_gpmc_controller; in omap_nand_probe()
1701 nand_chip->IO_ADDR_W = nand_chip->IO_ADDR_R; in omap_nand_probe()
1702 nand_chip->cmd_ctrl = omap_hwcontrol; in omap_nand_probe()
1712 nand_chip->dev_ready = omap_dev_ready; in omap_nand_probe()
1713 nand_chip->chip_delay = 0; in omap_nand_probe()
1715 nand_chip->waitfunc = omap_wait; in omap_nand_probe()
1716 nand_chip->chip_delay = 50; in omap_nand_probe()
1720 nand_chip->bbt_options |= NAND_BBT_USE_FLASH | NAND_BBT_NO_OOB; in omap_nand_probe()
1722 nand_chip->options |= NAND_SKIP_BBTSCAN; in omap_nand_probe()
1725 nand_chip->options |= pdata->devsize & NAND_BUSWIDTH_16; in omap_nand_probe()
1735 nand_chip->read_buf = omap_read_buf_pref; in omap_nand_probe()
1736 nand_chip->write_buf = omap_write_buf_pref; in omap_nand_probe()
1768 nand_chip->read_buf = omap_read_buf_dma_pref; in omap_nand_probe()
1769 nand_chip->write_buf = omap_write_buf_dma_pref; in omap_nand_probe()
1806 nand_chip->read_buf = omap_read_buf_irq_pref; in omap_nand_probe()
1807 nand_chip->write_buf = omap_write_buf_irq_pref; in omap_nand_probe()
1827 nand_chip->ecc.mode = NAND_ECC_SOFT; in omap_nand_probe()
1832 nand_chip->ecc.mode = NAND_ECC_HW; in omap_nand_probe()
1833 nand_chip->ecc.bytes = 3; in omap_nand_probe()
1834 nand_chip->ecc.size = 512; in omap_nand_probe()
1835 nand_chip->ecc.strength = 1; in omap_nand_probe()
1836 nand_chip->ecc.calculate = omap_calculate_ecc; in omap_nand_probe()
1837 nand_chip->ecc.hwctl = omap_enable_hwecc; in omap_nand_probe()
1838 nand_chip->ecc.correct = omap_correct_data; in omap_nand_probe()
1840 ecclayout->eccbytes = nand_chip->ecc.bytes * in omap_nand_probe()
1842 nand_chip->ecc.size); in omap_nand_probe()
1843 if (nand_chip->options & NAND_BUSWIDTH_16) in omap_nand_probe()
1856 nand_chip->ecc.mode = NAND_ECC_HW; in omap_nand_probe()
1857 nand_chip->ecc.size = 512; in omap_nand_probe()
1858 nand_chip->ecc.bytes = 7; in omap_nand_probe()
1859 nand_chip->ecc.strength = 4; in omap_nand_probe()
1860 nand_chip->ecc.hwctl = omap_enable_hwecc_bch; in omap_nand_probe()
1861 nand_chip->ecc.correct = nand_bch_correct_data; in omap_nand_probe()
1862 nand_chip->ecc.calculate = omap_calculate_ecc_bch; in omap_nand_probe()
1864 ecclayout->eccbytes = nand_chip->ecc.bytes * in omap_nand_probe()
1866 nand_chip->ecc.size); in omap_nand_probe()
1870 if (((i + 1) % nand_chip->ecc.bytes) == 0) in omap_nand_probe()
1877 nand_chip->ecc.priv = nand_bch_init(mtd, in omap_nand_probe()
1878 nand_chip->ecc.size, in omap_nand_probe()
1879 nand_chip->ecc.bytes, in omap_nand_probe()
1881 if (!nand_chip->ecc.priv) { in omap_nand_probe()
1890 nand_chip->ecc.mode = NAND_ECC_HW; in omap_nand_probe()
1891 nand_chip->ecc.size = 512; in omap_nand_probe()
1893 nand_chip->ecc.bytes = 7 + 1; in omap_nand_probe()
1894 nand_chip->ecc.strength = 4; in omap_nand_probe()
1895 nand_chip->ecc.hwctl = omap_enable_hwecc_bch; in omap_nand_probe()
1896 nand_chip->ecc.correct = omap_elm_correct_data; in omap_nand_probe()
1897 nand_chip->ecc.calculate = omap_calculate_ecc_bch; in omap_nand_probe()
1898 nand_chip->ecc.read_page = omap_read_page_bch; in omap_nand_probe()
1899 nand_chip->ecc.write_page = omap_write_page_bch; in omap_nand_probe()
1901 ecclayout->eccbytes = nand_chip->ecc.bytes * in omap_nand_probe()
1903 nand_chip->ecc.size); in omap_nand_probe()
1912 info->mtd.writesize / nand_chip->ecc.size, in omap_nand_probe()
1913 nand_chip->ecc.size, nand_chip->ecc.bytes); in omap_nand_probe()
1920 nand_chip->ecc.mode = NAND_ECC_HW; in omap_nand_probe()
1921 nand_chip->ecc.size = 512; in omap_nand_probe()
1922 nand_chip->ecc.bytes = 13; in omap_nand_probe()
1923 nand_chip->ecc.strength = 8; in omap_nand_probe()
1924 nand_chip->ecc.hwctl = omap_enable_hwecc_bch; in omap_nand_probe()
1925 nand_chip->ecc.correct = nand_bch_correct_data; in omap_nand_probe()
1926 nand_chip->ecc.calculate = omap_calculate_ecc_bch; in omap_nand_probe()
1928 ecclayout->eccbytes = nand_chip->ecc.bytes * in omap_nand_probe()
1930 nand_chip->ecc.size); in omap_nand_probe()
1934 if (((i + 1) % nand_chip->ecc.bytes) == 0) in omap_nand_probe()
1941 nand_chip->ecc.priv = nand_bch_init(mtd, in omap_nand_probe()
1942 nand_chip->ecc.size, in omap_nand_probe()
1943 nand_chip->ecc.bytes, in omap_nand_probe()
1945 if (!nand_chip->ecc.priv) { in omap_nand_probe()
1954 nand_chip->ecc.mode = NAND_ECC_HW; in omap_nand_probe()
1955 nand_chip->ecc.size = 512; in omap_nand_probe()
1957 nand_chip->ecc.bytes = 13 + 1; in omap_nand_probe()
1958 nand_chip->ecc.strength = 8; in omap_nand_probe()
1959 nand_chip->ecc.hwctl = omap_enable_hwecc_bch; in omap_nand_probe()
1960 nand_chip->ecc.correct = omap_elm_correct_data; in omap_nand_probe()
1961 nand_chip->ecc.calculate = omap_calculate_ecc_bch; in omap_nand_probe()
1962 nand_chip->ecc.read_page = omap_read_page_bch; in omap_nand_probe()
1963 nand_chip->ecc.write_page = omap_write_page_bch; in omap_nand_probe()
1966 info->mtd.writesize / nand_chip->ecc.size, in omap_nand_probe()
1967 nand_chip->ecc.size, nand_chip->ecc.bytes); in omap_nand_probe()
1972 ecclayout->eccbytes = nand_chip->ecc.bytes * in omap_nand_probe()
1974 nand_chip->ecc.size); in omap_nand_probe()
1985 nand_chip->ecc.mode = NAND_ECC_HW; in omap_nand_probe()
1986 nand_chip->ecc.size = 512; in omap_nand_probe()
1987 nand_chip->ecc.bytes = 26; in omap_nand_probe()
1988 nand_chip->ecc.strength = 16; in omap_nand_probe()
1989 nand_chip->ecc.hwctl = omap_enable_hwecc_bch; in omap_nand_probe()
1990 nand_chip->ecc.correct = omap_elm_correct_data; in omap_nand_probe()
1991 nand_chip->ecc.calculate = omap_calculate_ecc_bch; in omap_nand_probe()
1992 nand_chip->ecc.read_page = omap_read_page_bch; in omap_nand_probe()
1993 nand_chip->ecc.write_page = omap_write_page_bch; in omap_nand_probe()
1996 info->mtd.writesize / nand_chip->ecc.size, in omap_nand_probe()
1997 nand_chip->ecc.size, nand_chip->ecc.bytes); in omap_nand_probe()
2002 ecclayout->eccbytes = nand_chip->ecc.bytes * in omap_nand_probe()
2004 nand_chip->ecc.size); in omap_nand_probe()
2031 nand_chip->ecc.layout = ecclayout; in omap_nand_probe()
2051 if (nand_chip->ecc.priv) { in omap_nand_probe()
2052 nand_bch_free(nand_chip->ecc.priv); in omap_nand_probe()
2053 nand_chip->ecc.priv = NULL; in omap_nand_probe()
2061 struct nand_chip *nand_chip = mtd->priv; in omap_nand_remove() local
2064 if (nand_chip->ecc.priv) { in omap_nand_remove()
2065 nand_bch_free(nand_chip->ecc.priv); in omap_nand_remove()
2066 nand_chip->ecc.priv = NULL; in omap_nand_remove()