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.
160 * Reset BCH here, too. We got failures otherwise :( in gpmi_init()
161 * See later BCH reset for explanation of MX23 and MX28 handling in gpmi_init()
177 /* 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()
367 * P : the page size for BCH module. in set_geometry_by_ecc_info()
544 dev_dbg(this->dev, "BCH Geometry :\n" in set_geometry_for_large_oob()
588 * enough space for BCH. in legacy_set_geometry()
703 /* use legacy bch geometry settings by default*/ in common_nfc_set_geometry()
706 dev_dbg(this->dev, "use legacy bch geometry\n"); in common_nfc_set_geometry()
714 dev_dbg(this->dev, "use large oob bch geometry\n"); in common_nfc_set_geometry()
721 dev_dbg(this->dev, "use minimum ecc bch geometry\n"); in common_nfc_set_geometry()
725 dev_err(this->dev, "none of the bch geometry setting works\n"); in common_nfc_set_geometry()
730 /* 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()
2843 /* re-init the BCH registers */ in gpmi_pm_resume()
2846 dev_err(this->dev, "Error setting BCH : %d\n", ret); in gpmi_pm_resume()