Can someone please give me a hint howto send a command to a flash chip, in my case to enable on-die-ecc?
I found at some place how to read the byte, but I don’t understand how to modify it for write (chip->write_byte isn’t the way):
- ############################################## /
/ MICRON: Test on-die ECC status; return: 1/On or 0/Off */
int test_on_die_ecc(struct mtd_info *mtd)
{
struct nand_chip *chip = mtd->priv;
int addr = 0x90;
uint8_t data, data_;
chip->cmdfunc(mtd,NAND_CMD_GET_FEATURES,addr,-1);
ndelay(2000);
data = chip->read_byte(mtd);
return((data & 0x08) ? 1 : 0 );
}