Lines Matching refs:this

131  * Fabrice Bellard figured this out in the old docecc code. I added
292 static void doc2000_write_byte(struct nand_chip *this, u_char datum)
294 struct doc_priv *doc = nand_get_controller_data(this);
303 static void doc2000_writebuf(struct nand_chip *this, const u_char *buf,
306 struct doc_priv *doc = nand_get_controller_data(this);
320 static void doc2000_readbuf(struct nand_chip *this, u_char *buf, int len)
322 struct doc_priv *doc = nand_get_controller_data(this);
345 static void doc200x_readid(struct nand_chip *this, unsigned int cs, u8 *id)
359 this->controller->ops->exec_op(this, &op, false);
364 struct nand_chip *this = mtd_to_nand(mtd);
365 struct doc_priv *doc = nand_get_controller_data(this);
369 doc200x_readid(this, nr, id);
381 doc200x_readid(this, nr, NULL);
395 struct nand_chip *this = mtd_to_nand(mtd);
396 struct doc_priv *doc = nand_get_controller_data(this);
415 static void doc2001_write_byte(struct nand_chip *this, u_char datum)
417 struct doc_priv *doc = nand_get_controller_data(this);
425 static void doc2001_writebuf(struct nand_chip *this, const u_char *buf, int len)
427 struct doc_priv *doc = nand_get_controller_data(this);
437 static void doc2001_readbuf(struct nand_chip *this, u_char *buf, int len)
439 struct doc_priv *doc = nand_get_controller_data(this);
453 static void doc2001plus_writebuf(struct nand_chip *this, const u_char *buf, int len)
455 struct doc_priv *doc = nand_get_controller_data(this);
470 static void doc2001plus_readbuf(struct nand_chip *this, u_char *buf, int len)
472 struct doc_priv *doc = nand_get_controller_data(this);
510 static void doc200x_exec_instr(struct nand_chip *this,
513 struct doc_priv *doc = nand_get_controller_data(this);
519 doc2000_write_byte(this, instr->ctx.cmd.opcode);
528 doc2000_write_byte(this, addr);
530 doc2001_write_byte(this, addr);
537 doc2000_readbuf(this, instr->ctx.data.buf.in,
540 doc2001_readbuf(this, instr->ctx.data.buf.in,
547 doc2000_writebuf(this, instr->ctx.data.buf.out,
550 doc2001_writebuf(this, instr->ctx.data.buf.out,
563 static int doc200x_exec_op(struct nand_chip *this,
567 struct doc_priv *doc = nand_get_controller_data(this);
583 doc200x_exec_instr(this, &op->instrs[i]);
597 static void doc2001plus_exec_instr(struct nand_chip *this,
600 struct doc_priv *doc = nand_get_controller_data(this);
621 doc2001plus_readbuf(this, instr->ctx.data.buf.in,
625 doc2001plus_writebuf(this, instr->ctx.data.buf.out,
638 static int doc2001plus_exec_op(struct nand_chip *this,
642 struct doc_priv *doc = nand_get_controller_data(this);
655 doc2001plus_exec_instr(this, &op->instrs[i]);
663 static void doc200x_enable_hwecc(struct nand_chip *this, int mode)
665 struct doc_priv *doc = nand_get_controller_data(this);
681 static void doc2001plus_enable_hwecc(struct nand_chip *this, int mode)
683 struct doc_priv *doc = nand_get_controller_data(this);
700 static int doc200x_calculate_ecc(struct nand_chip *this, const u_char *dat,
703 struct doc_priv *doc = nand_get_controller_data(this);
740 /* Note: this somewhat expensive test should not be triggered
759 static int doc200x_correct_data(struct nand_chip *this, u_char *dat,
763 struct doc_priv *doc = nand_get_controller_data(this);
864 struct nand_chip *this = mtd_to_nand(mtd);
865 struct doc_priv *doc = nand_get_controller_data(this);
881 doc->mh0_page = offs >> this->page_shift;
886 doc->mh1_page = offs >> this->page_shift;
895 offs = doc->mh0_page << this->page_shift;
907 struct nand_chip *this = mtd_to_nand(mtd);
908 struct doc_priv *doc = nand_get_controller_data(this);
913 const unsigned psize = 1 << this->page_shift;
918 memorg = nanddev_get_memorg(&this->base);
941 blocks = mtd->size >> this->phys_erase_shift;
961 Unfortunately, we didn't know before this point what these values
962 should be. Thus, this code is somewhat dependent on the exact
965 this->bbt_erase_shift += (0xff - mh->UnitSizeFactor);
969 blocks = mtd->size >> this->bbt_erase_shift;
980 offs <<= this->page_shift;
992 parts[numparts].size = (mh->NumEraseUnits - numheaders) << this->bbt_erase_shift;
1013 struct nand_chip *this = mtd_to_nand(mtd);
1014 struct doc_priv *doc = nand_get_controller_data(this);
1026 end -= (INFTL_BBT_RESERVED_BLOCKS << this->phys_erase_shift);
1035 doc->mh1_page = doc->mh0_page + (4096 >> this->page_shift);
1063 vshift = this->phys_erase_shift + mh->BlockMultiplierBits;
1071 blocks = doc->chips_per_floor << (this->chip_shift - this->phys_erase_shift);
1133 struct nand_chip *this = mtd_to_nand(mtd);
1134 struct doc_priv *doc = nand_get_controller_data(this);
1143 this->bbt_td->options = NAND_BBT_ABSPAGE | NAND_BBT_8BIT |
1146 this->bbt_td->veroffs = 7;
1147 this->bbt_td->pages[0] = doc->mh0_page + 1;
1149 this->bbt_md->options = NAND_BBT_ABSPAGE | NAND_BBT_8BIT |
1152 this->bbt_md->veroffs = 7;
1153 this->bbt_md->pages[0] = doc->mh1_page + 1;
1155 this->bbt_md = NULL;
1158 ret = nand_create_bbt(this);
1168 struct nand_chip *this = mtd_to_nand(mtd);
1169 struct doc_priv *doc = nand_get_controller_data(this);
1172 if (nanddev_ntargets(&this->base) > doc->chips_per_floor) {
1178 this->bbt_td->options = NAND_BBT_2BIT | NAND_BBT_ABSPAGE;
1180 this->bbt_td->options |= NAND_BBT_WRITE;
1181 this->bbt_td->pages[0] = 2;
1182 this->bbt_md = NULL;
1184 this->bbt_td->options = NAND_BBT_LASTBLOCK | NAND_BBT_8BIT | NAND_BBT_VERSION;
1186 this->bbt_td->options |= NAND_BBT_WRITE;
1187 this->bbt_td->offs = 8;
1188 this->bbt_td->len = 8;
1189 this->bbt_td->veroffs = 7;
1190 this->bbt_td->maxblocks = INFTL_BBT_RESERVED_BLOCKS;
1191 this->bbt_td->reserved_block_code = 0x01;
1192 this->bbt_td->pattern = "MSYS_BBT";
1194 this->bbt_md->options = NAND_BBT_LASTBLOCK | NAND_BBT_8BIT | NAND_BBT_VERSION;
1196 this->bbt_md->options |= NAND_BBT_WRITE;
1197 this->bbt_md->offs = 8;
1198 this->bbt_md->len = 8;
1199 this->bbt_md->veroffs = 7;
1200 this->bbt_md->maxblocks = INFTL_BBT_RESERVED_BLOCKS;
1201 this->bbt_md->reserved_block_code = 0x01;
1202 this->bbt_md->pattern = "TBB_SYSM";
1205 ret = nand_create_bbt(this);
1221 struct nand_chip *this = mtd_to_nand(mtd);
1222 struct doc_priv *doc = nand_get_controller_data(this);
1234 struct nand_chip *this = mtd_to_nand(mtd);
1235 struct doc_priv *doc = nand_get_controller_data(this);
1260 struct nand_chip *this = mtd_to_nand(mtd);
1261 struct doc_priv *doc = nand_get_controller_data(this);
1264 this->ecc.hwctl = doc2001plus_enable_hwecc;
1402 /* Use the alias resolution register to determine if this is