Lines Matching full:bch
21 #include "bch-regs.h"
25 #define GPMI_NAND_BCH_REGS_ADDR_RES_NAME "bch"
26 #define GPMI_NAND_BCH_INTERRUPT_RES_NAME "bch"
66 * But in MX23, there is a hardware bug in the BCH block (see erratum #2847).
67 * If you try to soft reset the BCH block, it becomes unusable until
69 * boots by NAND, the ROM of the chip will initialize the BCH blocks itself.
70 * So If the driver tries to reset the BCH again, the BCH will not work anymore.
162 * Reset BCH here, too. We got failures otherwise :( in gpmi_init()
163 * See later BCH reset for explanation of MX23 and MX28 handling in gpmi_init()
179 /* Select BCH ECC. */ in gpmi_init()
208 /* start to print out the BCH info */ in gpmi_dump_info()
209 dev_err(this->dev, "Show BCH registers :\n"); in gpmi_dump_info()
214 dev_err(this->dev, "BCH Geometry :\n" in gpmi_dump_info()
318 * P : the page size for BCH module. in set_geometry_by_ecc_info()
411 * enough space for BCH. in legacy_set_geometry()
535 /* Configures the geometry for BCH. */
552 * Due to erratum #2847 of the MX23, the BCH cannot be soft reset on this in bch_set_geometry()
553 * chip, otherwise it will lock up. So we skip resetting BCH on the MX23. in bch_set_geometry()
794 /* Clears a BCH interrupt. */
828 * raw_len is the length to read/write including bch data which in gpmi_raw_len_to_len()
831 if (this->bch) in gpmi_raw_len_to_len()
1010 dev_err(this->dev, "error requesting BCH IRQ\n"); in acquire_bch_irq()
1330 this->bch = true; in gpmi_ecc_read_page()
1424 this->bch = true; in gpmi_ecc_read_subpage()
1430 dev_dbg(this->dev, "page:%d(%d:%d)%d, chunk:(%d:%d), BCH PG size:%d\n", in gpmi_ecc_read_subpage()
1449 this->bch = true; in gpmi_ecc_write_page()
1579 * The tricky part in the GPMI/BCH controller is that it stores ECC bits
1664 * The tricky part in the GPMI/BCH controller is that it stores ECC bits
2019 /* Set up the NFC geometry which is used by BCH. */ in gpmi_set_geometry()
2022 dev_err(this->dev, "Error setting BCH geometry : %d\n", ret); in gpmi_set_geometry()
2191 if (this->bch) { in gpmi_chain_data_read()
2206 if (!this->bch) in gpmi_chain_data_read()
2237 if (this->bch) { in gpmi_chain_data_write()
2249 (this->bch ? MXS_DMA_CTRL_WAIT4END : 0)); in gpmi_chain_data_write()
2253 if (!this->bch) in gpmi_chain_data_write()
2365 if (this->bch) { in gpmi_nfc_exec_op()
2379 if (this->bch && buf_read) { in gpmi_nfc_exec_op()
2397 if (this->bch && buf_read) { in gpmi_nfc_exec_op()
2400 dev_err(this->dev, "BCH timeout, last DMA\n"); in gpmi_nfc_exec_op()
2426 this->bch = false; in gpmi_nfc_exec_op()
2624 /* re-init the BCH registers */ in gpmi_pm_resume()
2627 dev_err(this->dev, "Error setting BCH : %d\n", ret); in gpmi_pm_resume()