* UBI Errors on DaVinci OMAP L-138/DA850
@ 2010-04-20 22:15 Caglar Akyuz
2010-04-29 5:25 ` Artem Bityutskiy
0 siblings, 1 reply; 2+ messages in thread
From: Caglar Akyuz @ 2010-04-20 22:15 UTC (permalink / raw)
To: linux-mtd
Hello,
Today I made my first attempt to try ubifs on a DaVinci processor, OMAP
L-138 or DA850 specifically. My board has a Micron SLC 128 MiB NAND chip with
part number MT29F1G08ABCHC(chip id is 0xa1)
I formatted and flashed my partition with commands:
$ubiformat /dev/mtd4
$ubiformat /dev/mtd4 -f rootfs.ubi
Then I tried to attach it with:
$ubiattach /dev/ubi_ctrl -m 4
However, I hit the FAQ entry at [1], namely driver returning -EBADMSG. Then I
tried to mount an empty flash with following commands in case my image has
something wrong:
$ubiformat /dev/mtd4
$ubiattach /dev/ubi_ctrl -m 4
$ubimkvol /dev/ubi0 -N filesytem -s 100MiB
$mount -t ubifs /dev/ubi0_0 /mnt/cf
But this resulted the same error message when I read/write something to/from the
flash. (To be honest I do not remember if the error was due to read, write or remount)
Then I tried formating and attaching my partition with '-s 2048' and -O '2048'
parameters respectively and -EBADMSG error went away. So I patched
nand_ids.c to add 'NAND_NO_SUBPAGE_WRITE' option to my NAND flash
(patch is attached) and after this operation I was able to use ubifs as expected
on my board.(Of course re-building my ubi image with new nand parameters)
I wonder:
* if this modification has any side effects?
* Is this error due to my NAND flash or DaVinci driver is doing something wrong?
Unfortunately, Micron datasheet is not publically available and I cannot check if it
is supporting 512 KiB sub-page operations or not.
Thanks in advance,
Caglar
[1] http://www.linux-mtd.infradead.org/faq/ubifs.html#L_ecc_error
____________________________________________________________________
--- drivers/mtd/nand/nand_ids.c 2010-04-21 01:04:15.094363619 +0300
+++ drivers/mtd/nand/nand_ids.c.mine 2010-04-21 01:04:02.480551529 +0300
@@ -80,7 +80,7 @@
{"NAND 64MiB 3,3V 16-bit", 0xC2, 0, 64, 0, LP_OPTIONS16},
/* 1 Gigabit */
- {"NAND 128MiB 1,8V 8-bit", 0xA1, 0, 128, 0, LP_OPTIONS},
+ {"NAND 128MiB 1,8V 8-bit", 0xA1, 0, 128, 0, LP_OPTIONS | NAND_NO_SUBPAGE_WRITE},
{"NAND 128MiB 3,3V 8-bit", 0xF1, 0, 128, 0, LP_OPTIONS},
{"NAND 128MiB 1,8V 16-bit", 0xB1, 0, 128, 0, LP_OPTIONS16},
{"NAND 128MiB 3,3V 16-bit", 0xC1, 0, 128, 0, LP_OPTIONS16},
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: UBI Errors on DaVinci OMAP L-138/DA850
2010-04-20 22:15 UBI Errors on DaVinci OMAP L-138/DA850 Caglar Akyuz
@ 2010-04-29 5:25 ` Artem Bityutskiy
0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2010-04-29 5:25 UTC (permalink / raw)
To: Caglar Akyuz; +Cc: Kevin Hilman, David Brownell, linux-mtd
On Wed, 2010-04-21 at 01:15 +0300, Caglar Akyuz wrote:
> Hello,
>
> Today I made my first attempt to try ubifs on a DaVinci processor, OMAP
> L-138 or DA850 specifically. My board has a Micron SLC 128 MiB NAND chip with
> part number MT29F1G08ABCHC(chip id is 0xa1)
>
> I formatted and flashed my partition with commands:
>
> $ubiformat /dev/mtd4
> $ubiformat /dev/mtd4 -f rootfs.ubi
>
> Then I tried to attach it with:
>
> $ubiattach /dev/ubi_ctrl -m 4
>
> However, I hit the FAQ entry at [1], namely driver returning -EBADMSG. Then I
> tried to mount an empty flash with following commands in case my image has
> something wrong:
>
> $ubiformat /dev/mtd4
> $ubiattach /dev/ubi_ctrl -m 4
> $ubimkvol /dev/ubi0 -N filesytem -s 100MiB
> $mount -t ubifs /dev/ubi0_0 /mnt/cf
>
> But this resulted the same error message when I read/write something to/from the
> flash. (To be honest I do not remember if the error was due to read, write or remount)
>
> Then I tried formating and attaching my partition with '-s 2048' and -O '2048'
> parameters respectively and -EBADMSG error went away. So I patched
> nand_ids.c to add 'NAND_NO_SUBPAGE_WRITE' option to my NAND flash
> (patch is attached) and after this operation I was able to use ubifs as expected
> on my board.(Of course re-building my ubi image with new nand parameters)
>
> I wonder:
>
> * if this modification has any side effects?
Probably sub-pages are not supported with this change?
> * Is this error due to my NAND flash or DaVinci driver is doing something wrong?
> Unfortunately, Micron datasheet is not publically available and I cannot check if it
> is supporting 512 KiB sub-page operations or not.
Most probably the flash does support sub-pages because of HW ECC
support. I do not know DaVinchi platform at all, but I guess what you
need to do is to set NAND_NO_SUBPAGE_WRITE in chip options in your
platform data. But it is better to talk to DaVinchi guys (CCed some).
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-29 5:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-20 22:15 UBI Errors on DaVinci OMAP L-138/DA850 Caglar Akyuz
2010-04-29 5:25 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).