Lines Matching +full:0 +full:xdc000

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));
144 ds[0] = ((ecc[4] & 0xff) >> 0) | ((ecc[5] & 0x03) << 8);
145 ds[1] = ((ecc[5] & 0xfc) >> 2) | ((ecc[2] & 0x0f) << 6);
146 ds[2] = ((ecc[2] & 0xf0) >> 4) | ((ecc[3] & 0x3f) << 4);
147 ds[3] = ((ecc[3] & 0xc0) >> 6) | ((ecc[0] & 0xff) << 2);
151 for (i = 0; i < NROOTS; i++)
152 s[i] = ds[0];
155 * s[i] = ds[3]x^3 + ds[2]x^2 + ds[1]x^1 + ds[0]
159 if (ds[j] == 0)
162 for (i = 0; i < NROOTS; i++)
167 for (i = 0; i < NROOTS; i++) {
172 nerr = decode_rs16(rs, NULL, NULL, 1019, syn, 0, errpos, 0, errval);
175 if (nerr < 0)
183 for (i = 0; i < nerr; i++) {
195 if ((index >= 0 && index < SECTOR_SIZE) || index == (SECTOR_SIZE + 1)) {
203 if (bitpos == 0)
205 if ((index >= 0 && index < SECTOR_SIZE) || index == (SECTOR_SIZE + 1)) {
222 for (i = 0; i < cycles; i++) {
264 return 0;
270 int ret = 0;
311 for (i = 0; i < len; i++) {
332 for (i = 0; i < len; i++)
335 for (i = 0; i < len / 4; i++)
347 u8 addr = 0;
349 NAND_OP_CMD(NAND_CMD_READID, 0),
351 NAND_OP_8BIT_DATA_IN(2, id, 0),
371 ret = ((u16)id[0] << 8) | id[1];
384 if (((ident.byte[0] << 8) | ident.byte[1]) == ret) {
404 mfrid = doc200x_ident_chip(mtd, 0);
431 for (i = 0; i < len; i++)
434 WriteDOC(0x00, docptr, WritePipeTerm);
446 for (i = 0; i < len - 1; i++)
447 buf[i] = ReadDOC(docptr, Mil_CDSN_IO + (i & 0xff));
461 for (i = 0; i < len; i++) {
483 for (i = 0; i < len - 2; i++) {
524 for (i = 0; i < instr->ctx.addr.naddrs; i++) {
582 for (i = 0; i < op->ninstrs; i++)
586 doc200x_write_control(doc, 0);
588 return 0;
593 WriteDOC(0x00, doc->virtadr, Mplus_WritePipeTerm);
594 WriteDOC(0x00, doc->virtadr, Mplus_WritePipeTerm);
610 for (i = 0; i < instr->ctx.addr.naddrs; i++) {
617 WriteDOC(0, doc->virtadr, Mplus_FlashControl);
654 for (i = 0; i < op->ninstrs; i++)
658 WriteDOC(0, doc->virtadr, Mplus_FlashSelect);
660 return 0;
711 WriteDOC(0, docptr, 2k_CDSN_IO);
712 WriteDOC(0, docptr, 2k_CDSN_IO);
713 WriteDOC(0, docptr, 2k_CDSN_IO);
716 WriteDOC(0, docptr, Mplus_NOP);
717 WriteDOC(0, docptr, Mplus_NOP);
718 WriteDOC(0, docptr, Mplus_NOP);
720 WriteDOC(0, docptr, NOP);
721 WriteDOC(0, docptr, NOP);
722 WriteDOC(0, docptr, NOP);
725 for (i = 0; i < 6; i++) {
731 emptymatch = 0;
737 #if 0
738 /* If emptymatch=1, we might have an all-0xff data buffer. Check. */
743 for (i = 0; i < 512; i++) {
744 if (dat[i] == 0xff)
746 emptymatch = 0;
750 /* If emptymatch still =1, we do have an all-0xff data buffer.
751 Return all-0xff ecc value instead of the computed one, so
754 memset(ecc_code, 0xff, 6);
756 return 0;
762 int i, ret = 0;
784 if (dummy & 0x80) {
785 for (i = 0; i < 6; i++) {
793 if (ret > 0)
803 ret = 0;
816 oobregion->offset = 0;
819 return 0;
848 return 0;
870 for (offs = 0; offs < mtd->size; offs += mtd->erasesize) {
875 pr_warn("ECC error scanning DOC at 0x%x\n", offs);
879 pr_info("Found DiskOnChip %s Media Header at 0x%x\n", id, offs);
891 return 0;
900 return 0;
910 int ret = 0;
914 int numparts = 0;
922 return 0;
944 if (mh->UnitSizeFactor == 0x00) {
950 mh->UnitSizeFactor = 0xff;
956 pr_warn("UnitSizeFactor=0x00 detected. Correct value is assumed to be 0x%02x.\n", mh->UnitSizeFactor);
964 if (mh->UnitSizeFactor != 0xff) {
965 this->bbt_erase_shift += (0xff - mh->UnitSizeFactor);
966 memorg->pages_per_eraseblock <<= (0xff - mh->UnitSizeFactor);
967 mtd->erasesize <<= (0xff - mh->UnitSizeFactor);
974 pr_err("UnitSizeFactor of 0x%02x is inconsistent with device size. Aborting.\n", mh->UnitSizeFactor);
984 parts[0].name = " DiskOnChip Firmware / Media Header partition";
985 parts[0].offset = 0;
986 parts[0].size = offs;
1015 int ret = 0;
1019 int numparts = 0;
1021 int vshift, lastvunit = 0;
1030 return 0;
1033 if (!find_media_headers(mtd, buf, "BNAND", 0))
1057 ((unsigned char *) &mh->OsakVersion)[0] & 0xf,
1058 ((unsigned char *) &mh->OsakVersion)[1] & 0xf,
1059 ((unsigned char *) &mh->OsakVersion)[2] & 0xf,
1060 ((unsigned char *) &mh->OsakVersion)[3] & 0xf,
1078 for (i = 0; (i < 4); i++) {
1091 " flags = 0x%x\n"
1098 (i == 0) && (ip->firstUnit > 0)) {
1099 parts[0].name = " DiskOnChip IPL / Media Header partition";
1100 parts[0].offset = 0;
1101 parts[0].size = (uint64_t)mtd->erasesize * ip->firstUnit;
1137 memset((char *)parts, 0, sizeof(parts));
1147 this->bbt_td->pages[0] = doc->mh0_page + 1;
1153 this->bbt_md->pages[0] = doc->mh1_page + 1;
1162 return mtd_device_register(mtd, parts, no_autopart ? 0 : numparts);
1181 this->bbt_td->pages[0] = 2;
1191 this->bbt_td->reserved_block_code = 0x01;
1201 this->bbt_md->reserved_block_code = 0x01;
1209 memset((char *)parts, 0, sizeof(parts));
1216 return mtd_device_register(mtd, parts, no_autopart ? 0 : numparts);
1275 return 0;
1286 return 0;
1309 int ret = 0;
1315 pr_err("Diskonchip ioremap failed: 0x%x bytes at 0x%lx\n",
1350 case 0:
1353 for (tmp = 0; (tmp < 4); tmp++)
1392 pr_warn("Possible DiskOnChip at 0x%lx failed TOGGLE test, dropping.\n", physadr);
1426 pr_debug("Found alias of DOC at 0x%lx to 0x%lx\n",
1432 pr_notice("DiskOnChip found at 0x%lx\n", physadr);
1452 doc->rs_decoder = init_rs(10, 0x409, FCR, 1, NROOTS);
1504 return 0;
1546 int i, ret = 0;
1549 pr_info("Using configured DiskOnChip probe address 0x%lx\n",
1552 if (ret < 0)
1555 for (i = 0; i < ARRAY_SIZE(doc_locations); i++) {