micron devices do an extra READID in nand_micron.c:micron_nand_init that nandsim isn't prepared for, and loading fails $ modprobe nandsim id_bytes=0x2c,0x38,0x00,0x26,0x85,0x00,0x00,0x00 dmesg: Feb 17 16:31:51 pro kernel: [nandsim] warning: write_byte: command (0x90) wasn't expected, expected state is STATE_READY, ignore previous states Feb 17 16:31:51 pro kernel: nand: No NAND device found Feb 17 16:31:51 pro kernel: [nandsim] error: Could not scan NAND Simulator device advice on how to patch it up? josh
more info with dyndbg and stuff enabled Feb 18 17:10:47 pro kernel: [nandsim] log: reset chip Feb 18 17:10:47 pro kernel: [nandsim] debug: switch_to_ready_state: switch to STATE_READY state Feb 18 17:10:47 pro kernel: [nandsim] debug: command byte corresponding to STATE_CMD_READID state accepted Feb 18 17:10:47 pro kernel: [nandsim] debug: switch_state: operation is unknown, try to find it Feb 18 17:10:47 pro kernel: [nandsim] debug: find_operation: operation found, index: 9, state: STATE_CMD_READID, nxstate STATE_ADDR_ZERO Feb 18 17:10:47 pro kernel: [nandsim] debug: write_byte: address byte 0x0 was accepted (1 bytes input, 1 expected) Feb 18 17:10:47 pro kernel: [nandsim] debug: address (0x0, 0x0) is accepted Feb 18 17:10:47 pro kernel: [nandsim] debug: switch_state: operation is known, switch to the next state, state: STATE_ADDR_ZERO, nxstate: STATE_DATAOUT_ID Feb 18 17:10:47 pro kernel: [nandsim] debug: switch_state: the next state is data I/O, switch, state: STATE_DATAOUT_ID, nxstate: STATE_READY Feb 18 17:10:47 pro kernel: [nandsim] debug: read_byte: read ID byte 0, total = 8 Feb 18 17:10:47 pro kernel: [nandsim] debug: read_byte: read ID byte 1, total = 8 Feb 18 17:10:47 pro kernel: [nandsim] debug: switch_to_ready_state: switch to STATE_READY state Feb 18 17:10:47 pro kernel: [nandsim] debug: command byte corresponding to STATE_CMD_READID state accepted Feb 18 17:10:47 pro kernel: [nandsim] debug: switch_state: operation is unknown, try to find it Feb 18 17:10:47 pro kernel: [nandsim] debug: find_operation: operation found, index: 9, state: STATE_CMD_READID, nxstate STATE_ADDR_ZERO Feb 18 17:10:47 pro kernel: [nandsim] debug: write_byte: address byte 0x0 was accepted (1 bytes input, 1 expected) Feb 18 17:10:47 pro kernel: [nandsim] debug: address (0x0, 0x0) is accepted Feb 18 17:10:47 pro kernel: [nandsim] debug: switch_state: operation is known, switch to the next state, state: STATE_ADDR_ZERO, nxstate: STATE_DATAOUT_ID Feb 18 17:10:47 pro kernel: [nandsim] debug: switch_state: the next state is data I/O, switch, state: STATE_DATAOUT_ID, nxstate: STATE_READY Feb 18 17:10:47 pro kernel: [nandsim] debug: read_byte: read ID byte 0, total = 8 Feb 18 17:10:47 pro kernel: [nandsim] debug: read_byte: read ID byte 1, total = 8 Feb 18 17:10:47 pro kernel: [nandsim] debug: read_byte: read ID byte 2, total = 8 Feb 18 17:10:47 pro kernel: [nandsim] debug: read_byte: read ID byte 3, total = 8 Feb 18 17:10:47 pro kernel: [nandsim] debug: read_byte: read ID byte 4, total = 8 Feb 18 17:10:47 pro kernel: [nandsim] debug: read_byte: read ID byte 5, total = 8 Feb 18 17:10:47 pro kernel: [nandsim] debug: read_byte: read ID byte 6, total = 8 Feb 18 17:10:47 pro kernel: [nandsim] debug: read_byte: read ID byte 7, total = 8 Feb 18 17:10:47 pro kernel: [nandsim] debug: read_byte: all bytes were read Feb 18 17:10:47 pro kernel: [nandsim] debug: switch_state: operation is known, switch to the next state, state: STATE_READY, nxstate: STATE_READY Feb 18 17:10:47 pro kernel: [nandsim] debug: switch_state: operation complete, switch to STATE_READY state Feb 18 17:10:47 pro kernel: [nandsim] debug: switch_to_ready_state: switch to STATE_READY state Feb 18 17:10:47 pro kernel: [nandsim] debug: command byte corresponding to STATE_CMD_READID state accepted Feb 18 17:10:47 pro kernel: [nandsim] debug: switch_state: operation is unknown, try to find it Feb 18 17:10:47 pro kernel: [nandsim] debug: find_operation: operation found, index: 9, state: STATE_CMD_READID, nxstate STATE_ADDR_ZERO Feb 18 17:10:47 pro kernel: [nandsim] debug: write_byte: address byte 0x20 was accepted (1 bytes input, 1 expected) Feb 18 17:10:47 pro kernel: [nandsim] debug: address (0x20, 0x0) is accepted Feb 18 17:10:47 pro kernel: [nandsim] debug: switch_state: operation is known, switch to the next state, state: STATE_ADDR_ZERO, nxstate: STATE_DATAOUT_ID Feb 18 17:10:47 pro kernel: [nandsim] debug: switch_state: the next state is data I/O, switch, state: STATE_DATAOUT_ID, nxstate: STATE_READY Feb 18 17:10:47 pro kernel: [nandsim] debug: read_byte: read ID byte 0, total = 8 Feb 18 17:10:47 pro kernel: [nandsim] debug: read_byte: read ID byte 1, total = 8 Feb 18 17:10:47 pro kernel: [nandsim] debug: read_byte: read ID byte 2, total = 8 Feb 18 17:10:47 pro kernel: [nandsim] debug: read_byte: read ID byte 3, total = 8 Feb 18 17:10:47 pro kernel: [nandsim] warning: write_byte: command (0x90) wasn't expected, expected state is STATE_READY, ignore previous states Feb 18 17:10:47 pro kernel: [nandsim] debug: switch_to_ready_state: switch to STATE_READY state Feb 18 17:10:47 pro kernel: [nandsim] debug: command byte corresponding to STATE_CMD_READID state accepted Feb 18 17:10:47 pro kernel: [nandsim] debug: switch_state: operation is unknown, try to find it Feb 18 17:10:47 pro kernel: [nandsim] debug: find_operation: operation found, index: 9, state: STATE_CMD_READID, nxstate STATE_ADDR_ZERO Feb 18 17:10:47 pro kernel: [nandsim] debug: write_byte: address byte 0x40 was accepted (1 bytes input, 1 expected) Feb 18 17:10:47 pro kernel: [nandsim] debug: address (0x40, 0x0) is accepted Feb 18 17:10:47 pro kernel: [nandsim] debug: switch_state: operation is known, switch to the next state, state: STATE_ADDR_ZERO, nxstate: STATE_DATAOUT_ID Feb 18 17:10:47 pro kernel: [nandsim] debug: switch_state: the next state is data I/O, switch, state: STATE_DATAOUT_ID, nxstate: STATE_READY Feb 18 17:10:47 pro kernel: [nandsim] debug: read_byte: read ID byte 0, total = 8 Feb 18 17:10:47 pro kernel: [nandsim] debug: read_byte: read ID byte 1, total = 8 Feb 18 17:10:47 pro kernel: [nandsim] debug: read_byte: read ID byte 2, total = 8 Feb 18 17:10:47 pro kernel: [nandsim] debug: read_byte: read ID byte 3, total = 8 Feb 18 17:10:47 pro kernel: [nandsim] debug: read_byte: read ID byte 4, total = 8 Feb 18 17:10:47 pro kernel: nand: No NAND device found Feb 18 17:10:47 pro kernel: [nandsim] error: Could not scan NAND Simulator device