Question using a SRAM with mtdblock device driver

Jorge Fernandez Monteagudo jorgefm at cirsa.com
Tue Dec 5 02:00:25 PST 2017


Hi all! It's my first message to the mailing list!

I don't know this is the place to ask a question about a problem I'm having with a static RAM
with a battery in a custom board handled with the mtdblock.c and map_ram.c from a
linux 3.14.52 kernel. I hope it's the correct place 😊

I've enabled the mtdblock.c pr_debug traces and I've done the next test:

# mount /dev/mtdblock0 /persistence
# echo "Hello" > /tmp/kk.txt
# echo "-----------------" > /dev/kmsg ; cp /tmp/kk.txt /persistence/ ; sync; echo "*****************" > /dev/kmsg
# dmesg
 
[ 8586.716039] -----------------
[ 8586.721637] mtdblock: read on "8000000.sram" at 0x25000, size 0x200
[ 8586.721695] mtdblock: read on "8000000.sram" at 0x25200, size 0x200
[ 8586.721978] mtdblock: read on "8000000.sram" at 0x4c00, size 0x200
[ 8586.722032] mtdblock: read on "8000000.sram" at 0x4e00, size 0x200
[ 8586.722186] mtdblock: read on "8000000.sram" at 0x5800, size 0x200
[ 8586.722237] mtdblock: read on "8000000.sram" at 0x5a00, size 0x200
[ 8586.722539] mtdblock: read on "8000000.sram" at 0x4800, size 0x200
[ 8586.722592] mtdblock: read on "8000000.sram" at 0x4a00, size 0x200
[ 8586.728215] mtdblock: write on "8000000.sram" at 0x12a800, size 0x200
[ 8586.728277] mtdblock: write on "8000000.sram" at 0x12aa00, size 0x200
[ 8586.728632] mtdblock: write on "8000000.sram" at 0x28800, size 0x200
[ 8586.728687] mtdblock: write on "8000000.sram" at 0x28a00, size 0x200
[ 8586.728938] mtdblock: write on "8000000.sram" at 0x28c00, size 0x200
[ 8586.728993] mtdblock: write on "8000000.sram" at 0x28e00, size 0x200
[ 8586.729051] mtdblock: write on "8000000.sram" at 0x29000, size 0x200
[ 8586.729099] mtdblock: write on "8000000.sram" at 0x29200, size 0x200
[ 8586.729153] mtdblock: write on "8000000.sram" at 0x29400, size 0x200
[ 8586.729199] mtdblock: write on "8000000.sram" at 0x29600, size 0x200
[ 8586.729252] mtdblock: write on "8000000.sram" at 0x29800, size 0x200
[ 8586.729298] mtdblock: write on "8000000.sram" at 0x29a00, size 0x200
[ 8586.729351] mtdblock: write on "8000000.sram" at 0x29c00, size 0x200
[ 8586.729397] mtdblock: write on "8000000.sram" at 0x29e00, size 0x200
[ 8586.729448] mtdblock: write on "8000000.sram" at 0x2a000, size 0x200
[ 8586.729494] mtdblock: write on "8000000.sram" at 0x2a200, size 0x200
[ 8586.729545] mtdblock: write on "8000000.sram" at 0x2a400, size 0x200
[ 8586.729590] mtdblock: write on "8000000.sram" at 0x2a600, size 0x200
[ 8586.729771] mtdblock: write on "8000000.sram" at 0x2a800, size 0x200
[ 8586.729823] mtdblock: write on "8000000.sram" at 0x2aa00, size 0x200
[ 8586.730297] mtdblock: write on "8000000.sram" at 0x800, size 0x200
[ 8586.730352] mtdblock: write on "8000000.sram" at 0xa00, size 0x200
[ 8586.730422] mtdblock: write on "8000000.sram" at 0x4800, size 0x200
[ 8586.730472] mtdblock: write on "8000000.sram" at 0x4a00, size 0x200
[ 8586.730527] mtdblock: write on "8000000.sram" at 0x4c00, size 0x200
[ 8586.730574] mtdblock: write on "8000000.sram" at 0x4e00, size 0x200
[ 8586.730631] mtdblock: write on "8000000.sram" at 0x5000, size 0x200
[ 8586.730679] mtdblock: write on "8000000.sram" at 0x5200, size 0x200
[ 8586.730739] mtdblock: write on "8000000.sram" at 0x5800, size 0x200
[ 8586.730786] mtdblock: write on "8000000.sram" at 0x5a00, size 0x200
[ 8586.730849] mtdblock: write on "8000000.sram" at 0x25000, size 0x200
[ 8586.730897] mtdblock: write on "8000000.sram" at 0x25200, size 0x200
[ 8586.731645] *****************

I guess that the writes are not verified. Is there some way to force to check
 
every write the driver do? We are facing some RAM devices with incorrect
bits and I think that it could be detected when a write is checked reading the
content back.

Is it possible?

Regards
Jorge


More information about the linux-mtd mailing list