<div dir="ltr">I would like to propose a patch along the attached to make some of the ONFI support routines work on 16-bit devices. It does the following:<div><ul style><li style>Always call nand_flash_detect_onfi(), even for known chips. Without this, onfi_version stays at 0 and nand_onfi_get_features and nand_onfi_set_features will always fail with EINVAL.<br>
</li><li style>For the READID, GET_FEATURES, and SET_FEATURES commands, the column address is always 1 byte, regardless of bus-width.</li><li style>nand_onfi_set_features(), nand_onfi_get_features(), and nand_flash_detect_onfi() need to use 8-bit transfers, regardless of bus-width.</li>
</ul><div style>I see that the linux-mtd tree has a NAND_BUSWIDTH_AUTO features, but I don't see how that's supposed to help for, say, nand_onfi-set_features() or nand_onfi_get_features() as nand_set_defaults() will eventually set the 16-bit transfer routines for 16-bit devices.</div>
</div><div style><br></div><div style>The patch is relative to linux-mtd GIT tree.</div><div style><br></div><div style>Thanks,</div><div style><br></div><div style> --david</div><div style><br></div></div>