Am Dienstag, 4. Februar 2014 16:42:28 UTC+1 schrieb st...@gmx.li: > > 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 ); > } > > > --- > Can you help me what do I have to do send this below? > > ECC can be enabled using the following sequence: > EFh(cmd)-90h(addr)-08h(data)-00h(data)-00h(data)-00h(data)-wait(tFEAT). > > ECC can be disabled using the following sequence: > EFh(cmd)-90h(addr)-00h(data)-00h(data)-00h(data)-00h(data)-wait(tFEAT). >
- 2 days later: I could solve it on my own. :) int set_on_die_ecc(struct mtd_info *mtd) { struct nand_chip *chip = mtd->priv; int addr = 0x90; uint8_t buf[8] = {8,0,0,0,0,0,0,0}; chip->cmdfunc(mtd,NAND_CMD_SET_FEATURES,addr,-1); ndelay(1000); chip->write_buf(mtd, buf, 8); printf("set_on_die_ecc\n"); OnDieECC_enabled = 1; return ( 0 ); } -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.