Lines Matching +full:0 +full:x409
37 #define CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS 0
43 0xfffc8000, 0xfffca000, 0xfffcc000, 0xfffce000,
44 0xfffd0000, 0xfffd2000, 0xfffd4000, 0xfffd6000,
45 0xfffd8000, 0xfffda000, 0xfffdc000, 0xfffde000,
46 0xfffe0000, 0xfffe2000, 0xfffe4000, 0xfffe6000,
47 0xfffe8000, 0xfffea000, 0xfffec000, 0xfffee000,
49 0xc8000, 0xca000, 0xcc000, 0xce000,
50 0xd0000, 0xd2000, 0xd4000, 0xd6000,
51 0xd8000, 0xda000, 0xdc000, 0xde000,
52 0xe0000, 0xe2000, 0xe4000, 0xe6000,
53 0xe8000, 0xea000, 0xec000, 0xee000,
80 page, one with all 0xff for data. */
81 static u_char empty_write_ecc[6] = { 0x4b, 0x00, 0xe2, 0x0e, 0x93, 0xf7 };
89 static int debug = 0;
90 module_param(debug, int, 0);
93 module_param(try_dword, int, 0);
95 static int no_ecc_failures = 0;
96 module_param(no_ecc_failures, int, 0);
98 static int no_autopart = 0;
99 module_param(no_autopart, int, 0);
101 static int show_firmware_partition = 0;
102 module_param(show_firmware_partition, int, 0);
107 static int inftl_bbt_write = 0;
109 module_param(inftl_bbt_write, int, 0);
112 module_param(doc_config_location, ulong, 0);
142 memset(syn, 0, sizeof(syn)); in doc_ecc_decode()
144 ds[0] = ((ecc[4] & 0xff) >> 0) | ((ecc[5] & 0x03) << 8); in doc_ecc_decode()
145 ds[1] = ((ecc[5] & 0xfc) >> 2) | ((ecc[2] & 0x0f) << 6); in doc_ecc_decode()
146 ds[2] = ((ecc[2] & 0xf0) >> 4) | ((ecc[3] & 0x3f) << 4); in doc_ecc_decode()
147 ds[3] = ((ecc[3] & 0xc0) >> 6) | ((ecc[0] & 0xff) << 2); in doc_ecc_decode()
151 for (i = 0; i < NROOTS; i++) in doc_ecc_decode()
152 s[i] = ds[0]; in doc_ecc_decode()
155 * s[i] = ds[3]x^3 + ds[2]x^2 + ds[1]x^1 + ds[0] in doc_ecc_decode()
159 if (ds[j] == 0) in doc_ecc_decode()
162 for (i = 0; i < NROOTS; i++) in doc_ecc_decode()
167 for (i = 0; i < NROOTS; i++) { in doc_ecc_decode()
172 nerr = decode_rs16(rs, NULL, NULL, 1019, syn, 0, errpos, 0, errval); in doc_ecc_decode()
175 if (nerr < 0) in doc_ecc_decode()
183 for (i = 0; i < nerr; i++) { in doc_ecc_decode()
195 if ((index >= 0 && index < SECTOR_SIZE) || index == (SECTOR_SIZE + 1)) { in doc_ecc_decode()
203 if (bitpos == 0) in doc_ecc_decode()
205 if ((index >= 0 && index < SECTOR_SIZE) || index == (SECTOR_SIZE + 1)) { in doc_ecc_decode()
222 for (i = 0; i < cycles; i++) { in DoC_Delay()
264 return 0; in _DoC_WaitReady()
270 int ret = 0; in DoC_WaitReady()
311 for (i = 0; i < len; i++) { in doc2000_writebuf()
332 for (i = 0; i < len; i++) in doc2000_readbuf()
335 for (i = 0; i < len / 4; i++) in doc2000_readbuf()
347 u8 addr = 0; in doc200x_readid()
349 NAND_OP_CMD(NAND_CMD_READID, 0), in doc200x_readid()
351 NAND_OP_8BIT_DATA_IN(2, id, 0), in doc200x_readid()
371 ret = ((u16)id[0] << 8) | id[1]; in doc200x_ident_chip()
384 if (((ident.byte[0] << 8) | ident.byte[1]) == ret) { in doc200x_ident_chip()
404 mfrid = doc200x_ident_chip(mtd, 0); in doc2000_count_chips()
431 for (i = 0; i < len; i++) in doc2001_writebuf()
434 WriteDOC(0x00, docptr, WritePipeTerm); in doc2001_writebuf()
446 for (i = 0; i < len - 1; i++) in doc2001_readbuf()
447 buf[i] = ReadDOC(docptr, Mil_CDSN_IO + (i & 0xff)); in doc2001_readbuf()
461 for (i = 0; i < len; i++) { in doc2001plus_writebuf()
483 for (i = 0; i < len - 2; i++) { in doc2001plus_readbuf()
524 for (i = 0; i < instr->ctx.addr.naddrs; i++) { in doc200x_exec_instr()
582 for (i = 0; i < op->ninstrs; i++) in doc200x_exec_op()
586 doc200x_write_control(doc, 0); in doc200x_exec_op()
588 return 0; in doc200x_exec_op()
593 WriteDOC(0x00, doc->virtadr, Mplus_WritePipeTerm); in doc2001plus_write_pipe_term()
594 WriteDOC(0x00, doc->virtadr, Mplus_WritePipeTerm); in doc2001plus_write_pipe_term()
610 for (i = 0; i < instr->ctx.addr.naddrs; i++) { in doc2001plus_exec_instr()
617 WriteDOC(0, doc->virtadr, Mplus_FlashControl); in doc2001plus_exec_instr()
654 for (i = 0; i < op->ninstrs; i++) in doc2001plus_exec_op()
658 WriteDOC(0, doc->virtadr, Mplus_FlashSelect); in doc2001plus_exec_op()
660 return 0; in doc2001plus_exec_op()
711 WriteDOC(0, docptr, 2k_CDSN_IO); in doc200x_calculate_ecc()
712 WriteDOC(0, docptr, 2k_CDSN_IO); in doc200x_calculate_ecc()
713 WriteDOC(0, docptr, 2k_CDSN_IO); in doc200x_calculate_ecc()
716 WriteDOC(0, docptr, Mplus_NOP); in doc200x_calculate_ecc()
717 WriteDOC(0, docptr, Mplus_NOP); in doc200x_calculate_ecc()
718 WriteDOC(0, docptr, Mplus_NOP); in doc200x_calculate_ecc()
720 WriteDOC(0, docptr, NOP); in doc200x_calculate_ecc()
721 WriteDOC(0, docptr, NOP); in doc200x_calculate_ecc()
722 WriteDOC(0, docptr, NOP); in doc200x_calculate_ecc()
725 for (i = 0; i < 6; i++) { in doc200x_calculate_ecc()
731 emptymatch = 0; in doc200x_calculate_ecc()
737 #if 0 in doc200x_calculate_ecc()
738 /* If emptymatch=1, we might have an all-0xff data buffer. Check. */ in doc200x_calculate_ecc()
743 for (i = 0; i < 512; i++) { in doc200x_calculate_ecc()
744 if (dat[i] == 0xff) in doc200x_calculate_ecc()
746 emptymatch = 0; in doc200x_calculate_ecc()
750 /* If emptymatch still =1, we do have an all-0xff data buffer. in doc200x_calculate_ecc()
751 Return all-0xff ecc value instead of the computed one, so in doc200x_calculate_ecc()
754 memset(ecc_code, 0xff, 6); in doc200x_calculate_ecc()
756 return 0; in doc200x_calculate_ecc()
762 int i, ret = 0; in doc200x_correct_data()
784 if (dummy & 0x80) { in doc200x_correct_data()
785 for (i = 0; i < 6; i++) { in doc200x_correct_data()
793 if (ret > 0) in doc200x_correct_data()
803 ret = 0; in doc200x_correct_data()
816 oobregion->offset = 0; in doc200x_ooblayout_ecc()
819 return 0; in doc200x_ooblayout_ecc()
848 return 0; in doc200x_ooblayout_free()
870 for (offs = 0; offs < mtd->size; offs += mtd->erasesize) { in find_media_headers()
875 pr_warn("ECC error scanning DOC at 0x%x\n", offs); in find_media_headers()
879 pr_info("Found DiskOnChip %s Media Header at 0x%x\n", id, offs); in find_media_headers()
891 return 0; in find_media_headers()
900 return 0; in find_media_headers()
910 int ret = 0; in nftl_partscan()
914 int numparts = 0; in nftl_partscan()
922 return 0; in nftl_partscan()
944 if (mh->UnitSizeFactor == 0x00) { in nftl_partscan()
950 mh->UnitSizeFactor = 0xff; in nftl_partscan()
956 …pr_warn("UnitSizeFactor=0x00 detected. Correct value is assumed to be 0x%02x.\n", mh->UnitSizeFac… in nftl_partscan()
964 if (mh->UnitSizeFactor != 0xff) { in nftl_partscan()
965 this->bbt_erase_shift += (0xff - mh->UnitSizeFactor); in nftl_partscan()
966 memorg->pages_per_eraseblock <<= (0xff - mh->UnitSizeFactor); in nftl_partscan()
967 mtd->erasesize <<= (0xff - mh->UnitSizeFactor); in nftl_partscan()
974 …pr_err("UnitSizeFactor of 0x%02x is inconsistent with device size. Aborting.\n", mh->UnitSizeFact… in nftl_partscan()
984 parts[0].name = " DiskOnChip Firmware / Media Header partition"; in nftl_partscan()
985 parts[0].offset = 0; in nftl_partscan()
986 parts[0].size = offs; in nftl_partscan()
1015 int ret = 0; in inftl_partscan()
1019 int numparts = 0; in inftl_partscan()
1021 int vshift, lastvunit = 0; in inftl_partscan()
1030 return 0; in inftl_partscan()
1033 if (!find_media_headers(mtd, buf, "BNAND", 0)) in inftl_partscan()
1057 ((unsigned char *) &mh->OsakVersion)[0] & 0xf, in inftl_partscan()
1058 ((unsigned char *) &mh->OsakVersion)[1] & 0xf, in inftl_partscan()
1059 ((unsigned char *) &mh->OsakVersion)[2] & 0xf, in inftl_partscan()
1060 ((unsigned char *) &mh->OsakVersion)[3] & 0xf, in inftl_partscan()
1078 for (i = 0; (i < 4); i++) { in inftl_partscan()
1091 " flags = 0x%x\n" in inftl_partscan()
1098 (i == 0) && (ip->firstUnit > 0)) { in inftl_partscan()
1099 parts[0].name = " DiskOnChip IPL / Media Header partition"; in inftl_partscan()
1100 parts[0].offset = 0; in inftl_partscan()
1101 parts[0].size = (uint64_t)mtd->erasesize * ip->firstUnit; in inftl_partscan()
1137 memset((char *)parts, 0, sizeof(parts)); in nftl_scan_bbt()
1147 this->bbt_td->pages[0] = doc->mh0_page + 1; in nftl_scan_bbt()
1153 this->bbt_md->pages[0] = doc->mh1_page + 1; in nftl_scan_bbt()
1162 return mtd_device_register(mtd, parts, no_autopart ? 0 : numparts); in nftl_scan_bbt()
1181 this->bbt_td->pages[0] = 2; in inftl_scan_bbt()
1191 this->bbt_td->reserved_block_code = 0x01; in inftl_scan_bbt()
1201 this->bbt_md->reserved_block_code = 0x01; in inftl_scan_bbt()
1209 memset((char *)parts, 0, sizeof(parts)); in inftl_scan_bbt()
1216 return mtd_device_register(mtd, parts, no_autopart ? 0 : numparts); in inftl_scan_bbt()
1275 return 0; in doc200x_attach_chip()
1286 return 0; in doc200x_attach_chip()
1309 int ret = 0; in doc_probe()
1315 pr_err("Diskonchip ioremap failed: 0x%x bytes at 0x%lx\n", in doc_probe()
1350 case 0: in doc_probe()
1353 for (tmp = 0; (tmp < 4); tmp++) in doc_probe()
1392 pr_warn("Possible DiskOnChip at 0x%lx failed TOGGLE test, dropping.\n", physadr); in doc_probe()
1426 pr_debug("Found alias of DOC at 0x%lx to 0x%lx\n", in doc_probe()
1432 pr_notice("DiskOnChip found at 0x%lx\n", physadr); in doc_probe()
1452 doc->rs_decoder = init_rs(10, 0x409, FCR, 1, NROOTS); in doc_probe()
1506 return 0; in doc_probe()
1548 int i, ret = 0; in init_nanddoc()
1551 pr_info("Using configured DiskOnChip probe address 0x%lx\n", in init_nanddoc()
1554 if (ret < 0) in init_nanddoc()
1557 for (i = 0; i < ARRAY_SIZE(doc_locations); i++) { in init_nanddoc()