|
68 | 68 | #define GPMC_ECC_BCH_RESULT_1 0x244 /* not available on OMAP2 */
|
69 | 69 | #define GPMC_ECC_BCH_RESULT_2 0x248 /* not available on OMAP2 */
|
70 | 70 | #define GPMC_ECC_BCH_RESULT_3 0x24c /* not available on OMAP2 */
|
| 71 | +#define GPMC_ECC_BCH_RESULT_4 0x300 /* not available on OMAP2 */ |
| 72 | +#define GPMC_ECC_BCH_RESULT_5 0x304 /* not available on OMAP2 */ |
| 73 | +#define GPMC_ECC_BCH_RESULT_6 0x308 /* not available on OMAP2 */ |
71 | 74 |
|
72 | 75 | /* GPMC ECC control settings */
|
73 | 76 | #define GPMC_ECC_CTRL_ECCCLEAR 0x100
|
@@ -666,6 +669,12 @@ void gpmc_update_nand_reg(struct gpmc_nand_regs *reg, int cs)
|
666 | 669 | GPMC_BCH_SIZE * i;
|
667 | 670 | reg->gpmc_bch_result3[i] = gpmc_base + GPMC_ECC_BCH_RESULT_3 +
|
668 | 671 | GPMC_BCH_SIZE * i;
|
| 672 | + reg->gpmc_bch_result4[i] = gpmc_base + GPMC_ECC_BCH_RESULT_4 + |
| 673 | + i * GPMC_BCH_SIZE; |
| 674 | + reg->gpmc_bch_result5[i] = gpmc_base + GPMC_ECC_BCH_RESULT_5 + |
| 675 | + i * GPMC_BCH_SIZE; |
| 676 | + reg->gpmc_bch_result6[i] = gpmc_base + GPMC_ECC_BCH_RESULT_6 + |
| 677 | + i * GPMC_BCH_SIZE; |
669 | 678 | }
|
670 | 679 | }
|
671 | 680 |
|
@@ -1401,6 +1410,12 @@ static int gpmc_probe_nand_child(struct platform_device *pdev,
|
1401 | 1410 | else
|
1402 | 1411 | gpmc_nand_data->ecc_opt =
|
1403 | 1412 | OMAP_ECC_BCH8_CODE_HW_DETECTION_SW;
|
| 1413 | + else if (!strcmp(s, "bch16")) |
| 1414 | + if (gpmc_nand_data->elm_of_node) |
| 1415 | + gpmc_nand_data->ecc_opt = |
| 1416 | + OMAP_ECC_BCH16_CODE_HW; |
| 1417 | + else |
| 1418 | + pr_err("%s: BCH16 requires ELM support\n", __func__); |
1404 | 1419 | else
|
1405 | 1420 | pr_err("%s: ti,nand-ecc-opt invalid value\n", __func__);
|
1406 | 1421 |
|
|
0 commit comments