Lines Matching refs:status

29 /* group B requests can run even while status reports "busy" */
81 /* Return the status of the DataFlash device */
86 u8 status;
92 ret = spi_write_then_read(spi, &opcode, 1, NULL, &status, 1);
93 return ret ? -EIO : status;
103 int status;
109 status = dataflash_status(spi);
110 if (status < 0)
111 status = 0;
113 if (status & (1 << 7)) /* RDY/nBSY */
114 return status;
131 int status;
157 status = spi_claim_bus(spi);
158 if (status) {
160 return status;
184 status = spi_write_then_read(spi, command, 4, NULL, NULL, 0);
185 if (status < 0) {
190 status = dataflash_waitready(spi);
191 if (status < 0) {
193 return status;
224 int status;
242 status = spi_claim_bus(spi);
243 if (status) {
245 return status;
259 status = spi_write_then_read(spi, command, 8, NULL, buf, len);
263 return status;
282 int status = -EINVAL;
300 status = spi_claim_bus(spi);
301 if (status) {
303 return status;
338 status = spi_write_then_read(spi, command, 4,
340 if (status < 0) {
346 status = dataflash_waitready(spi);
347 if (status < 0) {
350 return status;
364 status = spi_write_then_read(spi, command, 4,
366 if (status < 0) {
371 status = dataflash_waitready(spi);
372 if (status < 0) {
374 return status;
388 status = spi_write_then_read(spi, command, 4,
390 if (status < 0) {
396 status = dataflash_waitready(spi);
399 if (status & (1 << 6)) {
401 pageaddr, status);
403 status = -EIO;
406 status = 0;
523 int status;
533 status = dataflash_status(spi);
534 if (status < 0) {
535 debug("dataflash: status error %d\n",
536 status);
537 return ERR_PTR(status);
539 if (status & 0x1) {
609 * or else the ID code embedded in the status bits:
626 int status;
632 status = spi_claim_bus(spi);
633 if (status)
634 return status;
647 status = add_dataflash(dev, info->name, info->nr_pages,
650 if (status < 0)
653 return status;
658 * capacity using bits in the status byte.
660 status = dataflash_status(spi);
661 if (status <= 0 || status == 0xff) {
662 printf("dataflash: read status error %d\n", status);
663 if (status == 0 || status == 0xff)
664 status = -ENODEV;
673 switch (status & 0x3c) {
675 status = add_dataflash(dev, "AT45DB011B", 512, 264, 9, 0);
678 status = add_dataflash(dev, "AT45DB021B", 1024, 264, 9, 0);
681 status = add_dataflash(dev, "AT45DB041x", 2048, 264, 9, 0);
684 status = add_dataflash(dev, "AT45DB081B", 4096, 264, 9, 0);
687 status = add_dataflash(dev, "AT45DB161x", 4096, 528, 10, 0);
690 status = add_dataflash(dev, "AT45DB321x", 8192, 528, 10, 0);
694 status = add_dataflash(dev, "AT45DB642x", 8192, 1056, 11, 0);
698 printf("dataflash: unsupported device (%x)\n", status & 0x3c);
699 status = -ENODEV;
703 return status;
709 return status;