Lines Matching full:bch

22 #include "bch-regs.h"
26 #define GPMI_NAND_BCH_REGS_ADDR_RES_NAME "bch"
27 #define GPMI_NAND_BCH_INTERRUPT_RES_NAME "bch"
67 * But in MX23, there is a hardware bug in the BCH block (see erratum #2847).
68 * If you try to soft reset the BCH block, it becomes unusable until
70 * boots by NAND, the ROM of the chip will initialize the BCH blocks itself.
71 * So If the driver tries to reset the BCH again, the BCH will not work anymore.
161 * Reset BCH here, too. We got failures otherwise :( in gpmi_init()
162 * See later BCH reset for explanation of MX23 and MX28 handling in gpmi_init()
178 /* Select BCH ECC. */ in gpmi_init()
209 /* start to print out the BCH info */ in gpmi_dump_info()
210 dev_err(this->dev, "Show BCH registers :\n"); in gpmi_dump_info()
215 dev_err(this->dev, "BCH Geometry :\n" in gpmi_dump_info()
368 * P : the page size for BCH module. in set_geometry_by_ecc_info()
545 dev_dbg(this->dev, "BCH Geometry :\n" in set_geometry_for_large_oob()
589 * enough space for BCH. in legacy_set_geometry()
704 /* use legacy bch geometry settings by default*/ in common_nfc_set_geometry()
707 dev_dbg(this->dev, "use legacy bch geometry\n"); in common_nfc_set_geometry()
715 dev_dbg(this->dev, "use large oob bch geometry\n"); in common_nfc_set_geometry()
722 dev_dbg(this->dev, "use minimum ecc bch geometry\n"); in common_nfc_set_geometry()
726 dev_err(this->dev, "none of the bch geometry setting works\n"); in common_nfc_set_geometry()
731 /* Configures the geometry for BCH. */
747 * Due to erratum #2847 of the MX23, the BCH cannot be soft reset on this in bch_set_geometry()
748 * chip, otherwise it will lock up. So we skip resetting BCH on the MX23. in bch_set_geometry()
1003 /* Clears a BCH interrupt. */
1037 * raw_len is the length to read/write including bch data which in gpmi_raw_len_to_len()
1040 if (this->bch) in gpmi_raw_len_to_len()
1231 dev_err(this->dev, "error requesting BCH IRQ\n"); in acquire_bch_irq()
1552 this->bch = true; in gpmi_ecc_read_page()
1666 this->bch = true; in gpmi_ecc_read_subpage()
1672 dev_dbg(this->dev, "page:%d(%d:%d)%d, chunk:(%d:%d), BCH PG size:%d\n", in gpmi_ecc_read_subpage()
1690 this->bch = true; in gpmi_ecc_write_page()
1818 * The tricky part in the GPMI/BCH controller is that it stores ECC bits
1903 * The tricky part in the GPMI/BCH controller is that it stores ECC bits
2258 /* Set up the NFC geometry which is used by BCH. */ in gpmi_set_geometry()
2261 dev_err(this->dev, "Error setting BCH geometry : %d\n", ret); in gpmi_set_geometry()
2430 if (this->bch) { in gpmi_chain_data_read()
2445 if (!this->bch) in gpmi_chain_data_read()
2476 if (this->bch) { in gpmi_chain_data_write()
2488 (this->bch ? MXS_DMA_CTRL_WAIT4END : 0)); in gpmi_chain_data_write()
2492 if (!this->bch) in gpmi_chain_data_write()
2602 if (this->bch) { in gpmi_nfc_exec_op()
2616 if (this->bch && buf_read) { in gpmi_nfc_exec_op()
2634 if (this->bch && buf_read) { in gpmi_nfc_exec_op()
2637 dev_err(this->dev, "BCH timeout, last DMA\n"); in gpmi_nfc_exec_op()
2663 this->bch = false; in gpmi_nfc_exec_op()
2838 /* re-init the BCH registers */ in gpmi_pm_resume()
2841 dev_err(this->dev, "Error setting BCH : %d\n", ret); in gpmi_pm_resume()