2009-04-08 13:25:50 Using dd with OTP memory driver
ian davidson (UNITED KINGDOM)
Message: 72428
Can dd be used to write to the OTP memory driver?
I have built the kernel with On-Chip OTP memory support (with writing enabled), the driver initialised OK; done mknod with mode bits 666; dd works OK reading the OTP memory.
So to read the last 8 byte record of the "Unsecured general purpose space" at Page Address 0xDF I do:
root:/mnt/DPLtarget/otp> dd if=/dev/otp of=cps223 bs=8 skip=223 seek=223 count=1
1+0 records in
1+0 records out
root:/mnt/DPLtarget/otp>
And get file cps223 of 8 bytes - all zero - which is fine.
I have created an 8 byte file (jill) which I want to write into the same place and do:
root:/mnt/DPLtarget/otp> dd if=jill of=/dev/otp bs=8 skip=0 seek=223 count=1
dd: writing '/dev/otp': Invalid argument
1+0 records in
0+0 records out
root:/mnt/DPLtarget/otp>
Am I using dd incorrectly?
Also how do I enable pr_debug( ) in the driver for this device,
Many thanks,
Ian Davidson
root:/mnt/DPLtarget/otp> version
kernel: Linux release 2.6.22.19-ADI-2008R1.5-svn, build #104 Mon Apr 6 17:57:24 BST 2009
toolchain: bfin-uclinux-gcc release gcc version 4.1.2 (ADI svn)
user-dist: release 2008R1.5, build #96 Mon Apr 6 17:57:47 BST 2009
root:/mnt/DPLtarget/otp> cat /proc/version
Linux version 2.6.22.19-ADI-2008R1.5-svn (iand@vgc-ds1.vitecnet.local) (gcc version 4.1.2 (ADI svn)) #104 Mon Apr 6 17:57:24 BST 2009
root:/mnt/DPLtarget/otp>
Processor is BF527C
QuoteReplyEditDelete
2009-04-08 13:56:14 Re: Using dd with OTP memory driver
ian davidson (UNITED KINGDOM)
Message: 72429
hang on a bit, I've just tried it with u-boot ang got an error:
dpl_u-boot> otp write 100000 60 1
Writing one time programmable memory
Make sure your operating voltages and temperature are within spec
source address: 0x00100000
OTP destination: lower page 0x060 - lower page 0x060
number to write: 1 halfpages
type "YES" (no quotes) to confirm: YES
OTP memory write: addr 0x00100000 page 0x060 count 1 ...
ERROR at page 0x060 (lower-halfpage): 0x003: OTP fuse write error
So I guess wen need to check operating voltages and temperatures on oour target,
or perhaps this page is protected.
Ian
QuoteReplyEditDelete
2009-04-08 16:51:30 Re: Using dd with OTP memory driver
Mike Frysinger (UNITED STATES)
Message: 72435
OTP writing was not supported in the last release. only current trunk supports it (u-boot and linux).
further, you need to have a new enough part ... bf54x-0.0 for example did not support writing.
QuoteReplyEditDelete
2009-04-09 07:31:42 Re: Using dd with OTP memory driver
ian davidson (UNITED KINGDOM)
Message: 72463
thanks Mike