Lines Matching refs:chip

81 #define MSG_STATUSACQCTRLCHIP	"Could not acquire status for ctrl#%d chip#%d"
83 #define MSG_NOCHIP "There is no such chip configured (chip#%d "\
178 * ctrl == 0xff && chip == 0xff : '--all' flag specified
179 * ctrl != 0xff && chip != 0xff : both ctrl & chip were specified
180 * ctrl != 0xff && chip == 0xff : only ctrl was specified
196 /* If --all or -a is specified, ctl==chip==0xff */
250 opencdev(int *cdevd, int ctrl, int chip)
254 sprintf(fname, "/dev/nandsim%d.%d", ctrl, chip);
281 int chip = 0, ctl = 0, err = 0, fd, idx, idx2, start, stop;
286 err = parse_devstring(gargv[2], &ctl, &chip);
351 int chip = 0, ctl = 0, err = 0, fd, running, state;
353 err = parse_devstring(gargv[2], &ctl, &chip);
388 int chip = 0, ctl = 0, err = 0, fd, running;
390 err = parse_devstring(gargv[2], &ctl, &chip);
418 int chip, ctl, err = 0, fd = -1, i;
424 /* Set loglevel (ctrl:chip pair independant) */
447 err = parse_devstring(gargv[2], &ctl, &chip);
451 else if (chip == 0xff) {
456 if (!assert_chip_connected(ctl, chip))
500 mods.chip_num = chip;
520 int chip = 0, ctl = 0, err = 0, fd;
523 err = parse_devstring(gargv[2], &ctl, &chip);
527 if (chip == 0xff) {
538 if (!assert_chip_connected(ctl, chip))
546 sim_err.chip_num = chip;
567 int c, cdevd, chip = 0, ctl = 0, err = 0, fd, idx;
584 err = parse_devstring(gargv[2], &ctl, &chip);
588 if (chip == 0xff || ctl == 0xff) {
594 bs.chip_num = chip;
596 if (!assert_chip_connected(ctl, chip))
599 if (opencdev(&cdevd, ctl, chip) != EX_OK)
609 bs.chip_num = chip;
662 int chip = 0, ctl = 0, err = 0, fd, i, start = 0, state, stop = 0;
665 err = parse_devstring(gargv[2], &ctl, &chip);
674 if (ctl != 0xff && chip == 0xff) {
678 start = chip;
679 stop = chip;
706 error("Could not freeze ctrl#%d chip#%d", ctl, i);
719 int chip = 0, ctl = 0, err = 0, fd, idx, start = 0, stop = 0;
722 err = parse_devstring(gargv[2], &ctl, &chip);
770 int cdevd, chip = 0, ctl = 0, err = 0;
773 err = parse_devstring(gargv[2], &ctl, &chip);
778 if (chip == 0xff) {
786 if (!assert_chip_connected(ctl, chip))
789 if (opencdev(&cdevd, ctl, chip) != EX_OK)
792 err = printstats(ctl, chip, pageno, cdevd);
807 int chip = 0, ctl = 0, err = EX_OK, fd, dumpfd;
811 err = parse_devstring(gargv[2], &ctl, &chip);
815 if (chip == 0xff || ctl == 0xff) {
820 if (!assert_chip_connected(ctl, chip))
823 if (opencdev(&fd, ctl, chip) != EX_OK)
828 error("Cannot get parameters for chip %d:%d", ctl, chip);
835 dump.chip_num = chip;
862 bs.chip_num = chip;
906 error("Could not dump ctrl#%d chip#%d "
907 "block#%d", ctl, chip, blkidx);
935 int chip = 0, ctl = 0, err = 0, fd, dumpfd = -1;
940 err = parse_devstring(gargv[2], &ctl, &chip);
948 if (!assert_chip_connected(ctl, chip))
951 /* Get chip geometry */
952 if (opencdev(&fd, ctl, chip) != EX_OK)
957 error("Cannot get parameters for chip %d:%d", ctl, chip);
975 /* Expected dump file size for chip */
979 error("File size does not match chip geometry (file size: %d"
990 /* Read chip params saved in dumpfile */
995 error("Supplied dump is created for a chip with different "
996 "chip configuration!");
1015 dump.chip_num = chip;
1028 bs.chip_num = chip;
1037 "controller: %d, chip: %d!", blkidx, ctl, chip);
1056 error("Could not restore block#%d of ctrl#%d chip#%d"
1057 ": %s", blkidx, ctl, chip, strerror(errno));
1073 int chip = 0, ctl = 0, err = 0, fd, idx, idx2, state;
1077 err = parse_devstring(gargv[2], &ctl, &chip);
1083 /* Every chip at every controller */
1089 if (chip == 0xff) {
1090 /* Every chip at selected controller */
1094 /* Selected chip at selected controller */
1095 chipstart = chipstop = chip;
1128 /* There is no such chip running */
1135 /* If chip isn't explicitly specified -- destroy ctrl */
1136 if (chip == 0xff) {
1198 printchip(struct sim_chip *chip, uint8_t verbose)
1201 if (chip->created == 0)
1212 "chip_width=%db\n", chip->num, chip->ctrl_num,
1213 chip->device_id, chip->manufact_id,chip->device_model,
1214 chip->manufacturer, chip->col_addr_cycles,
1215 chip->row_addr_cycles, chip->page_size,
1216 chip->oob_size, chip->pgs_per_blk, chip->blks_per_lun,
1217 chip->luns,chip->prog_time, chip->erase_time,
1218 chip->read_time, chip->error_ratio, chip->wear_level,
1219 (chip->is_wp == 0) ? 'N':'Y', chip->width);
1224 chip->num, chip->device_model, chip->manufacturer,
1225 chip->page_size, (chip->is_wp == 0) ? "NO":"YES");
1300 struct sim_chip chip;
1303 chip.ctrl_num = ctrl_no;
1304 chip.num = chip_no;
1309 err = ioctl(fd, NANDSIM_STATUS_CHIP, &chip);
1311 error("Could not acquire conf for chip#%d", chip_no);
1315 *created = chip.created;
1361 /* Gather information about chip */
1365 error("Could not acquire chip info for chip attached to cs#"