2010-03-22 03:22:49 flash_unlock operation not supported
Shivakumar ammanna (INDIA)
Message: 87552
Hello,
I'm trying to unlock the parellal nor flash but ends up in "operation not supported" error!. Any reasons for this cause?.
device details furnished below.
1. ADSP-BF537/0.2.
2. output of cat /proc/mtd
mtd0: 00040000 00010000 "bootloader(nor)"
mtd1: 00100000 00010000 "linux kernel(nor)"
mtd2: 002b0000 00010000 "file system(nor)"
mtd3: 00010000 00010000 "MAC Address(nor)"
mtd4: 00800000 00020000 "mtdram test device"
mtd5: 00040000 00010000 "bootloader(spi)"
mtd6: 003c0000 00010000 "linux kernel(spi)"
mtd7: 00000000 00000000 "file system(spi)"
3. strace of flash_unlock /dev/mtd2
root:/> strace flash_unlock /dev/mtd2
ioctl(0, SMTD_open
NDCTL_TMTD_ioctl
MR_TIMTD_ioctl
MEBASE or SNDMTD_close
RV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B57600 opost isig icanon echo ...}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B57600
opost isig icanon echo ...}) = 0
open("/dev/mtd2", O_RDWR|O_LARGEFILE) = 3
ioctl(3, MEMGETINFO, 0x2adedc) = 0
ioctl(3, MEMUNLOCK, 0x2adefc) = -1 EOPNOTSUPP (Operation not supported
)
write(2, "Could not unlock MTD device: ", 29Could not unlock MTD device: ) = 29
write(2, "/dev/mtd2", 9/dev/mtd2) = 9
write(2, "\n", 1
) = 1
close(3) = 0
_exit(1) = ?
QuoteReplyEditDelete
2010-03-22 03:29:47 Re: flash_unlock operation not supported
Mike Frysinger (UNITED STATES)
Message: 87554
if the deivce doesnt support locking, then you cant unlock it. this is expected behavior.
QuoteReplyEditDelete
2010-03-22 06:47:09 Re: flash_unlock operation not supported
Shivakumar ammanna (INDIA)
Message: 87563
Hello Mike,
Thanks for your reply, why flash_erase command is returning an 'EIO'?
root:/dev> flash_erase /dev/mtd2
MTD_open
ErMTD_ioctl
MTD_ioctl
ase TMTD_ioctl
MTD do_erase_oneblock(): ERASE 0x00140000
otal 1 Units
Performing Flash Erase of length 65536 at offset 0x0
MTD_close
MTD Erase failure: Input/output error
QuoteReplyEditDelete
2010-03-22 07:12:34 Re: flash_unlock operation not supported
Shivakumar ammanna (INDIA)
Message: 87564
Hello Mike,
this problem is not occuring with spi flash, am I missing out anything with respect to parallel flash?
I'm facing this problem only with parallel flash on flash_write and flash_erase operations.
QuoteReplyEditDelete
2010-03-22 15:55:40 Re: flash_unlock operation not supported
Mike Frysinger (UNITED STATES)
Message: 87584
run that through strace and check the flags in your partition map
you havent described your hardware (board/rev/etc...) or software (kernel/dist/toolchain) stack at all ...