Lines Matching refs:nand_chip

88 	struct nand_chip *nand_chip = mtd_to_nand(mtd);  in bcm47xxnflash_ops_bcm4706_read()  local
89 struct bcm47xxnflash *b47n = nand_get_controller_data(nand_chip); in bcm47xxnflash_ops_bcm4706_read()
96 BUG_ON(b47n->curr_page_addr & ~nand_chip->pagemask); in bcm47xxnflash_ops_bcm4706_read()
138 struct nand_chip *nand_chip = mtd_to_nand(mtd); in bcm47xxnflash_ops_bcm4706_write() local
139 struct bcm47xxnflash *b47n = nand_get_controller_data(nand_chip); in bcm47xxnflash_ops_bcm4706_write()
146 BUG_ON(b47n->curr_page_addr & ~nand_chip->pagemask); in bcm47xxnflash_ops_bcm4706_write()
169 static void bcm47xxnflash_ops_bcm4706_cmd_ctrl(struct nand_chip *nand_chip, in bcm47xxnflash_ops_bcm4706_cmd_ctrl() argument
172 struct bcm47xxnflash *b47n = nand_get_controller_data(nand_chip); in bcm47xxnflash_ops_bcm4706_cmd_ctrl()
189 static void bcm47xxnflash_ops_bcm4706_select_chip(struct nand_chip *chip, in bcm47xxnflash_ops_bcm4706_select_chip()
195 static int bcm47xxnflash_ops_bcm4706_dev_ready(struct nand_chip *nand_chip) in bcm47xxnflash_ops_bcm4706_dev_ready() argument
197 struct bcm47xxnflash *b47n = nand_get_controller_data(nand_chip); in bcm47xxnflash_ops_bcm4706_dev_ready()
209 static void bcm47xxnflash_ops_bcm4706_cmdfunc(struct nand_chip *nand_chip, in bcm47xxnflash_ops_bcm4706_cmdfunc() argument
213 struct mtd_info *mtd = nand_to_mtd(nand_chip); in bcm47xxnflash_ops_bcm4706_cmdfunc()
214 struct bcm47xxnflash *b47n = nand_get_controller_data(nand_chip); in bcm47xxnflash_ops_bcm4706_cmdfunc()
226 nand_chip->legacy.cmd_ctrl(nand_chip, command, NAND_CTRL_CLE); in bcm47xxnflash_ops_bcm4706_cmdfunc()
229 nand_wait_ready(nand_chip); in bcm47xxnflash_ops_bcm4706_cmdfunc()
307 static u8 bcm47xxnflash_ops_bcm4706_read_byte(struct nand_chip *nand_chip) in bcm47xxnflash_ops_bcm4706_read_byte() argument
309 struct mtd_info *mtd = nand_to_mtd(nand_chip); in bcm47xxnflash_ops_bcm4706_read_byte()
310 struct bcm47xxnflash *b47n = nand_get_controller_data(nand_chip); in bcm47xxnflash_ops_bcm4706_read_byte()
335 static void bcm47xxnflash_ops_bcm4706_read_buf(struct nand_chip *nand_chip, in bcm47xxnflash_ops_bcm4706_read_buf() argument
338 struct bcm47xxnflash *b47n = nand_get_controller_data(nand_chip); in bcm47xxnflash_ops_bcm4706_read_buf()
343 bcm47xxnflash_ops_bcm4706_read(nand_to_mtd(nand_chip), buf, in bcm47xxnflash_ops_bcm4706_read_buf()
351 static void bcm47xxnflash_ops_bcm4706_write_buf(struct nand_chip *nand_chip, in bcm47xxnflash_ops_bcm4706_write_buf() argument
354 struct bcm47xxnflash *b47n = nand_get_controller_data(nand_chip); in bcm47xxnflash_ops_bcm4706_write_buf()
358 bcm47xxnflash_ops_bcm4706_write(nand_to_mtd(nand_chip), buf, in bcm47xxnflash_ops_bcm4706_write_buf()
372 struct nand_chip *nand_chip = (struct nand_chip *)&b47n->nand_chip; in bcm47xxnflash_ops_bcm4706_init() local
382 nand_chip->legacy.select_chip = bcm47xxnflash_ops_bcm4706_select_chip; in bcm47xxnflash_ops_bcm4706_init()
383 nand_chip->legacy.cmd_ctrl = bcm47xxnflash_ops_bcm4706_cmd_ctrl; in bcm47xxnflash_ops_bcm4706_init()
384 nand_chip->legacy.dev_ready = bcm47xxnflash_ops_bcm4706_dev_ready; in bcm47xxnflash_ops_bcm4706_init()
385 b47n->nand_chip.legacy.cmdfunc = bcm47xxnflash_ops_bcm4706_cmdfunc; in bcm47xxnflash_ops_bcm4706_init()
386 b47n->nand_chip.legacy.read_byte = bcm47xxnflash_ops_bcm4706_read_byte; in bcm47xxnflash_ops_bcm4706_init()
387 b47n->nand_chip.legacy.read_buf = bcm47xxnflash_ops_bcm4706_read_buf; in bcm47xxnflash_ops_bcm4706_init()
388 b47n->nand_chip.legacy.write_buf = bcm47xxnflash_ops_bcm4706_write_buf; in bcm47xxnflash_ops_bcm4706_init()
389 b47n->nand_chip.legacy.set_features = nand_get_set_features_notsupp; in bcm47xxnflash_ops_bcm4706_init()
390 b47n->nand_chip.legacy.get_features = nand_get_set_features_notsupp; in bcm47xxnflash_ops_bcm4706_init()
392 nand_chip->legacy.chip_delay = 50; in bcm47xxnflash_ops_bcm4706_init()
393 b47n->nand_chip.bbt_options = NAND_BBT_USE_FLASH; in bcm47xxnflash_ops_bcm4706_init()
395 b47n->nand_chip.ecc.engine_type = NAND_ECC_ENGINE_TYPE_NONE; in bcm47xxnflash_ops_bcm4706_init()
421 err = nand_scan(&b47n->nand_chip, 1); in bcm47xxnflash_ops_bcm4706_init()
428 chipsize = nanddev_target_size(&b47n->nand_chip.base) >> 20; in bcm47xxnflash_ops_bcm4706_init()
437 col_bits = b47n->nand_chip.page_shift + 1; in bcm47xxnflash_ops_bcm4706_init()