Lines Matching refs:nand

46 #include <dev/nand/nand.h>
47 #include <dev/nand/nandbus.h>
226 chip->nand = device_get_softc(nfc);
407 send_read_page(device_t nand, uint8_t start_command, uint8_t end_command,
410 device_t nandbus = device_get_parent(nand);
415 if (nand_send_address(nand, row, column, -1))
428 generic_read_page(device_t nand, uint32_t page, void *buf, uint32_t len,
436 nand_debug(NDBG_GEN,"%p raw read page %x[%x] at %x", nand, page, len, offset);
437 chip = device_get_softc(nand);
438 nandbus = device_get_parent(nand);
445 if (send_read_page(nand, NAND_CMD_READ, NAND_CMD_READ_END, row,
463 generic_read_oob(device_t nand, uint32_t page, void* buf, uint32_t len,
470 nand_debug(NDBG_GEN,"%p raw read oob %x[%x] at %x", nand, page, len, offset);
471 chip = device_get_softc(nand);
472 nandbus = device_get_parent(nand);
483 if (send_read_page(nand, NAND_CMD_READ, NAND_CMD_READ_END, row,
498 send_start_program_page(device_t nand, uint32_t row, uint32_t column)
500 device_t nandbus = device_get_parent(nand);
505 if (nand_send_address(nand, row, column, -1))
525 generic_program_page(device_t nand, uint32_t page, void *buf, uint32_t len,
533 nand_debug(NDBG_GEN,"%p raw prog page %x[%x] at %x", nand, page, len,
535 chip = device_get_softc(nand);
536 nandbus = device_get_parent(nand);
546 if (send_start_program_page(nand, row, offset))
566 generic_program_page_intlv(device_t nand, uint32_t page, void *buf,
574 nand_debug(NDBG_GEN,"%p raw prog page %x[%x] at %x", nand, page, len, offset);
575 chip = device_get_softc(nand);
576 nandbus = device_get_parent(nand);
586 if (send_start_program_page(nand, row, offset))
606 generic_program_oob(device_t nand, uint32_t page, void* buf, uint32_t len,
613 nand_debug(NDBG_GEN,"%p raw prog oob %x[%x] at %x", nand, page, len,
615 chip = device_get_softc(nand);
616 nandbus = device_get_parent(nand);
627 if (send_start_program_page(nand, row, offset))
644 send_erase_block(device_t nand, uint32_t row, uint8_t second_command)
646 device_t nandbus = device_get_parent(nand);
651 if (nand_send_address(nand, row, -1, -1))
664 generic_erase_block(device_t nand, uint32_t block)
671 nand_debug(NDBG_GEN,"%p erase block %x", nand, block);
672 nandbus = device_get_parent(nand);
673 chip = device_get_softc(nand);
681 nand_debug(NDBG_GEN,"%p erase block row %x", nand, row);
686 send_erase_block(nand, row, NAND_CMD_ERASE_END);
700 generic_erase_block_intlv(device_t nand, uint32_t block)
707 nand_debug(NDBG_GEN,"%p erase block %x", nand, block);
708 nandbus = device_get_parent(nand);
709 chip = device_get_softc(nand);
720 send_erase_block(nand, row, NAND_CMD_ERASE_INTLV);
777 send_small_read_page(device_t nand, uint8_t start_command,
780 device_t nandbus = device_get_parent(nand);
785 if (nand_send_address(nand, row, column, -1))
796 small_read_page(device_t nand, uint32_t page, void *buf, uint32_t len,
804 nand_debug(NDBG_GEN,"%p small read page %x[%x] at %x", nand, page, len, offset);
805 chip = device_get_softc(nand);
806 nandbus = device_get_parent(nand);
814 if (send_small_read_page(nand, NAND_CMD_SMALLA, row, offset))
836 small_read_oob(device_t nand, uint32_t page, void *buf, uint32_t len,
844 nand_debug(NDBG_GEN,"%p small read oob %x[%x] at %x", nand, page, len, offset);
845 chip = device_get_softc(nand);
846 nandbus = device_get_parent(nand);
853 if (send_small_read_page(nand, NAND_CMD_SMALLOOB, row, 0))
870 small_program_page(device_t nand, uint32_t page, void* buf, uint32_t len,
877 nand_debug(NDBG_GEN,"%p small prog page %x[%x] at %x", nand, page, len, offset);
878 chip = device_get_softc(nand);
879 nandbus = device_get_parent(nand);
897 if (send_start_program_page(nand, row, offset))
914 small_program_oob(device_t nand, uint32_t page, void* buf, uint32_t len,
921 nand_debug(NDBG_GEN,"%p small prog oob %x[%x] at %x", nand, page, len, offset);
922 chip = device_get_softc(nand);
923 nandbus = device_get_parent(nand);
936 if (send_start_program_page(nand, row, offset))
953 nand_send_address(device_t nand, int32_t row, int32_t col, int8_t id)
961 nandbus = device_get_parent(nand);
962 ivar = device_get_ivars(nand);
1058 nand_chng_read_col(device_t nand, uint32_t col, void *buf, size_t len)
1063 chip = device_get_softc(nand);
1064 nandbus = device_get_parent(nand);
1130 if (send_read_page(nand, NAND_CMD_READ, NAND_CMD_READ_CPBK, row, 0))
1210 if (send_start_program_page(nand, row, 0))
1330 nand_debug(NDBG_GEN,"nand get feature");
1356 nand_debug(NDBG_GEN,"nand set feature");