Lines Matching refs:layout

205 	struct nand_ecclayout layout;  member
529 struct nand_ecclayout *layout = ecc->layout; in sunxi_nfc_hw_ecc_read_page() local
549 offset = mtd->writesize + layout->eccpos[i * ecc->bytes] - 4; in sunxi_nfc_hw_ecc_read_page()
591 cnt = ecc->layout->oobfree[ecc->steps].length; in sunxi_nfc_hw_ecc_read_page()
594 ecc->layout->oobfree[ecc->steps].offset; in sunxi_nfc_hw_ecc_read_page()
615 struct nand_ecclayout *layout = ecc->layout; in sunxi_nfc_hw_ecc_write_page() local
636 offset = layout->eccpos[i * ecc->bytes] - 4 + mtd->writesize; in sunxi_nfc_hw_ecc_write_page()
640 layout->oobfree[i].offset), in sunxi_nfc_hw_ecc_write_page()
658 cnt = ecc->layout->oobfree[i].length; in sunxi_nfc_hw_ecc_write_page()
661 ecc->layout->oobfree[i].offset; in sunxi_nfc_hw_ecc_write_page()
925 struct nand_ecclayout *layout; in sunxi_nand_hw_common_ecc_ctrl_init() local
954 layout = &data->layout; in sunxi_nand_hw_common_ecc_ctrl_init()
962 layout->eccbytes = (ecc->bytes * nsectors); in sunxi_nand_hw_common_ecc_ctrl_init()
964 ecc->layout = layout; in sunxi_nand_hw_common_ecc_ctrl_init()
984 struct nand_ecclayout *layout; in sunxi_nand_hw_ecc_ctrl_init() local
995 layout = ecc->layout; in sunxi_nand_hw_ecc_ctrl_init()
1000 layout->oobfree[i].offset = in sunxi_nand_hw_ecc_ctrl_init()
1001 layout->oobfree[i - 1].offset + in sunxi_nand_hw_ecc_ctrl_init()
1002 layout->oobfree[i - 1].length + in sunxi_nand_hw_ecc_ctrl_init()
1004 layout->oobfree[i].length = 4; in sunxi_nand_hw_ecc_ctrl_init()
1011 layout->oobfree[i].length = 2; in sunxi_nand_hw_ecc_ctrl_init()
1012 layout->oobfree[i].offset = 2; in sunxi_nand_hw_ecc_ctrl_init()
1016 layout->eccpos[(ecc->bytes * i) + j] = in sunxi_nand_hw_ecc_ctrl_init()
1017 layout->oobfree[i].offset + in sunxi_nand_hw_ecc_ctrl_init()
1018 layout->oobfree[i].length + j; in sunxi_nand_hw_ecc_ctrl_init()
1022 layout->oobfree[nsectors].offset = in sunxi_nand_hw_ecc_ctrl_init()
1023 layout->oobfree[nsectors - 1].offset + in sunxi_nand_hw_ecc_ctrl_init()
1024 layout->oobfree[nsectors - 1].length + in sunxi_nand_hw_ecc_ctrl_init()
1026 layout->oobfree[nsectors].length = mtd->oobsize - in sunxi_nand_hw_ecc_ctrl_init()
1037 struct nand_ecclayout *layout; in sunxi_nand_hw_syndrome_ecc_ctrl_init() local
1050 layout = ecc->layout; in sunxi_nand_hw_syndrome_ecc_ctrl_init()
1054 layout->eccpos[i] = i; in sunxi_nand_hw_syndrome_ecc_ctrl_init()
1056 layout->oobfree[0].length = mtd->oobsize - i; in sunxi_nand_hw_syndrome_ecc_ctrl_init()
1057 layout->oobfree[0].offset = i; in sunxi_nand_hw_syndrome_ecc_ctrl_init()
1070 kfree(ecc->layout); in sunxi_nand_ecc_cleanup()
1117 ecc->layout = kzalloc(sizeof(*ecc->layout), GFP_KERNEL); in sunxi_nand_ecc_init()
1118 if (!ecc->layout) in sunxi_nand_ecc_init()
1120 ecc->layout->oobfree[0].length = mtd->oobsize; in sunxi_nand_ecc_init()