Lines Matching refs:this

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