**** BEGIN LOGGING AT Wed Dec 11 02:59:59 2013 Dec 11 08:28:33 lumag: gm Dec 11 08:29:17 WIP https://github.com/andrea-adami/meta-handheld/commits/master Dec 11 08:31:36 (the PCR hack needs to be moved elsewhere) Dec 11 08:33:34 now, can it be that sa1100/collie doesn't flush the chips before reboot/poweroff? Dec 11 08:34:05 this could explain the bad CRC of jffs2 Dec 11 12:51:23 bluelightning: er.. the collie params for UBI where thought for NAND...then I discovered it has NOR onboard... Dec 11 12:51:40 this is apatch independent on the kernel, pls commit it when possible Dec 11 12:51:53 https://github.com/andrea-adami/meta-handheld/commit/f480d87056919cb6aa08b840ed6479bb53eefec8 Dec 11 12:51:58 thx Dec 11 12:59:36 ant_work,hello. Dec 11 13:00:02 I'd suggest to move it to quirks (like strataflash, etc). Dec 11 13:00:12 If that is not too late. Dec 11 13:02:30 Also we would probably need to overwrite the restart callback to also reset the flash. Dec 11 13:02:41 So that it comes back as multiple-partition device. Dec 11 13:03:01 yes, so maybe it even answers QRY Dec 11 13:03:40 Quircks are done after QRY, aren't they? Dec 11 13:03:53 btw we can remove strataflash-fix Dec 11 13:03:58 won't help Dec 11 13:03:59 CFI aplies fixups depending on vendor id/device id, Dec 11 13:04:06 ant_work, ok :) Dec 11 13:04:20 last test of last night ;) Dec 11 13:05:11 lumag: where would you add http://lxr.free-electrons.com/source/drivers/mtd/chips/cfi_cmdset_0002.c#L492 Dec 11 13:05:24 we surely need 0,5sec here Dec 11 13:05:42 To put_chip ;) Dec 11 13:05:49 As it's done in cmdset_0002 Dec 11 13:05:51 I think this is the cause of my issues after reboot. this or no-flush/sync Dec 11 13:06:34 Maybe we need to forcely reset the flash just before restart Dec 11 13:07:11 BTW: I have sent few patches tonight - IrDA and gpio keys. Dec 11 13:07:27 Could you please check & ack them :) Dec 11 13:08:15 sure Dec 11 13:09:02 thx Dec 11 13:09:39 btw, irda client/server can be tested from Diag Mode menus ;) Dec 11 13:09:44 from another Z Dec 11 13:10:00 Haojian has finally sent the PR with tosa keyboard patch. Dec 11 13:10:12 3.14 will have correct keymap. Dec 11 13:10:27 that took long... Dec 11 13:10:33 Yep Dec 11 13:11:01 SA1100 patches take even longer. RMK is completely busy and unresponsive. Dec 11 13:11:04 hm.. can it refer to reset/sync? http://lists.infradead.org/pipermail/linux-mtd/2013-May/046765.html Dec 11 13:11:55 The patch is ok. Dec 11 13:12:05 Maybe we need to update sa1100_destroy. Dec 11 13:12:07 Let me check Dec 11 13:16:43 Hmm. Dec 11 13:16:47 There is some handling there. Dec 11 13:17:01 Check the cfi_intelext_destroy, cfi_intelext_reset, etc. Dec 11 13:17:11 We might want to expand that reset/restore_locks/etc. handling. Dec 11 13:17:19 This is cmdset_0001 Dec 11 13:18:02 or maybe collie/sa1100 cuts the VPP before the write/erase is finished ? Dec 11 13:18:50 I remember to have logged a map_read and map_write on reboot Dec 11 13:19:05 Strange. Dec 11 13:19:13 Intelext has support for multiple partition devices. Dec 11 13:19:29 Can you also try MTD_CONCAT=y and your fixup disabled? Dec 11 13:19:48 See the cfi_intelext_partition_fixup Dec 11 13:20:01 "this function has the potential to distort the reality"! Dec 11 13:21:02 I like your fixup though. Dec 11 13:22:09 I'd suggest to check what happens in the end of cfi_intelext_destroy - read the PCR and then reset it again with 0xff (or is it 0xf0?) command Dec 11 13:22:38 Maybe our fine chip needs other reset sequence (0xff vs. 0xf0) or it might need some additional steps to have PRCR back to normal one. Dec 11 13:23:57 0xF0 is only for AMD Dec 11 13:24:09 but it is to return to Read Array Dec 11 13:24:49 Yes. Dec 11 13:24:52 and finally most info seem ignored Dec 11 13:24:54 http://lxr.free-electrons.com/source/include/linux/mtd/cfi.h#L172 Dec 11 13:25:04 FIXME Dec 11 13:25:04 After leaving Linux, flash should be in read mode. Dec 11 13:25:39 Do we hit that fixme? Dec 11 13:26:08 I like eBay. Some are selling collies for just $19, some for $199 Dec 11 13:27:12 the partition stuff is not shown in the CFI table I see on collie Dec 11 13:27:21 just the eraseregions Dec 11 13:29:04 Maybe it is skipped somehow. Dec 11 13:29:09 I will check. Dec 11 13:30:21 fwiw Intel Extended Table is at 31H, Sharp is at 39H Dec 11 13:31:02 as indicated in offset 15H Dec 11 13:33:58 anyway, what I'm not understanding is, the erase is on on especific block and this block belongs to a specific plane so has its SR Dec 11 13:34:32 hoiw is it that it answers ready while in truth it is busy? Dec 11 13:34:55 maybe the code is passing an address on the next block/plane Dec 11 13:35:26 normnal Intel flash don't care about addrerss but for Sharp must be *within partition* Dec 11 13:35:30 It looks like it should allocate additional mtd chips with changed base addresses Dec 11 13:35:57 If it gets too complicated, let's live with a single partition and forget about all the crap. Dec 11 13:36:10 o_O Dec 11 13:36:24 If we can sort out the reset/halt problem Dec 11 13:37:04 finally, it would be nice to see how the CFI-flasher in mtd0 copies the image. maybe we can log it on terminal Dec 11 13:37:43 but again, sequentially block by block should not be a problem Dec 11 13:38:02 simultaneous operations is the problem Dec 11 13:38:39 here I get lost with mutexes and friends;) up to you Dec 11 13:39:02 but yes, reset/poweroff is b0rked on collie Dec 11 13:47:38 lumag: one final note (for now): table 22.1 of the appendix says that in case of single partition bit 9 (Simultaneous operations) are not supported Dec 11 13:48:01 simultaneous operations? Dec 11 13:48:04 so this shouldn't ever show in the CFI answer/table after the PCR is set to 0 Dec 11 13:48:11 What is that? Dec 11 13:48:28 read one part while erasing other. there is a matrix of ops Dec 11 13:49:17 it is about that bit 31 set Dec 11 13:49:17 Ah, it is unsupported as there are no other parts ;) Dec 11 13:49:35 So we can completely forget about that. Dec 11 13:49:37 yes, they strangely talk about 44-lead SOP Dec 11 13:50:28 we could otherwise mask/unset that bit9... Dec 11 13:55:24 heh..but i.e. 51H (partition information) is not updated even changing PCR. Let's hope 3EH (Features) is updated Dec 11 15:00:26 ant_work, /* Dec 11 15:00:26 * All functions below currently rely on all chips having Dec 11 15:00:26 * the same geometry so we'll just assume that all hardware Dec 11 15:00:26 * partitions are of the same size too. Dec 11 15:00:26 */ Dec 11 15:00:39 That is probably the case. Dec 11 15:00:55 *not* the case Dec 11 15:01:59 according to datasheet 3fh is updated Dec 11 15:09:53 Hmm. Dec 11 15:09:56 numregions = - Dec 11 15:09:58 numregions = 0 Dec 11 15:10:01 numparts = 1 Dec 11 15:10:05 Strange. Dec 11 15:10:10 That is w/o your fixup Dec 11 15:12:07 ant_work, I don't see bit31 enabled in FeaturesSupported. Dec 11 15:12:13 So FIXME does not apply to us Dec 11 15:16:24 fe224668dff97dd8899bd559d1608cc9285db67b Dec 11 15:16:30 Thomas was looking there Dec 11 15:23:57 I remember that patch Dec 11 15:25:10 same geometry = we could even dare to test 4 partitions Dec 11 15:25:28 as last hope ;) Dec 11 15:33:29 ant_work, Do we have the up-to-date Intel/Ext PRI description somewhere? Dec 11 15:33:53 I found one of the issues - kernel looks for partitioning data in wrong location. Dec 11 15:34:44 doh Dec 11 15:37:18 lumag..googling for the PRI desc I found this thread...exactly our situation... Dec 11 15:37:21 http://osdir.com/ml/linux.drivers.mtd/2001-11/msg00086.html Dec 11 15:37:27 2001 ! Dec 11 15:39:48 *** Dec 11 15:39:53 They (sharp) got it wrong. Dec 11 15:41:02 *0x4d is 0, but then follow 3 syncro configs (= 0x0) Dec 11 15:45:06 afaik this chip (and the strataflash as well) cannot do syncronous/burst read Dec 11 15:53:16 Yes, but for this chip cfi PRI has 3 slots (for that). Dec 11 15:55:23 I'll try a quick hack Dec 11 15:57:16 OK. I got cfi code to read the 'partitioning'. Dec 11 15:57:39 However then we fall into the problem of a comment I posted ~hour ago. Dec 11 15:57:40 See: Dec 11 15:57:52 sa1100-0: 1 set(s) of 2 interleaved chips --> 2 partitions of 8192 KiB Dec 11 15:58:16 It goes for two equal chips Dec 11 15:58:20 (subchips) Dec 11 15:58:28 I'll be back in a hour (or so). Dec 11 15:58:52 It looks like we have to modify partitioning no matter what (or to change cfi code significantly). Dec 11 15:59:02 I'd propose to just switch to single-partitioning mode. Dec 11 16:00:32 change PCR are just two lines + eventual status checks ;) Dec 11 16:00:33 +1 Dec 11 16:14:42 btw this coukd explain the verify failure we observed with flashcpy at 10490K + (1792 mtd0 + mtd1) = 12292 we are in the 4 plane Dec 11 16:14:44 bbl Dec 11 23:18:01 lumag: testing http://pastebin.com/u07P0XEw Dec 11 23:19:07 ant_home, +partitioning fix? Dec 11 23:19:31 yes, and -strataflash fix Dec 11 23:20:27 this driver is ugly :/ Dec 11 23:20:36 75Kb Dec 11 23:20:46 I'm not used ;) Dec 11 23:21:31 is like a patchwork made of hacks Dec 11 23:21:50 sad life for the e-engineers ;) Dec 11 23:23:07 You see. We have a spec. Plenty of them. CFI 1.0, 1.1, .. 1.4 Dec 11 23:23:17 And then we have plenty of engineers to read them. Dec 11 23:23:27 Each one has it own reading ;) Dec 11 23:24:55 he he, no unemployement Dec 11 23:24:56 Kind of Dec 11 23:24:56 And so each hardware vendor has 'it own' flash Dec 11 23:24:56 tragic if you have a deadline Dec 11 23:25:48 it would be too funnt if Sharp failed to implement its own chips on a Sharp-branded consumer device ... Dec 11 23:25:54 some head Dec 11 23:26:05 cut Dec 11 23:26:26 shipped as read-only...hmm.. Dec 11 23:27:16 ok, built, flashing now Dec 11 23:32:00 why does kexec take so long on collie...can we do it XIP maybe? Dec 11 23:36:06 lumag: seems it doesn't help Dec 11 23:36:08 http://pastebin.com/hXrX8hvt Dec 11 23:36:24 no reboot btw, just umount/remount Dec 11 23:37:27 Hmm. Dec 11 23:40:28 afair this is new: UBIFS: reserved for root: 0 bytes (0 KiB) Dec 11 23:41:45 I try now with empty volume like tested yesterday Dec 11 23:44:59 lumag: not yet rebooted Dec 11 23:45:00 http://pastebin.com/HFRsvuWz Dec 11 23:45:45 So first mount works, second does not :( Dec 11 23:45:57 yes Dec 11 23:45:58 Slight suggestion: Dec 11 23:47:05 could you add MSC0 = (MSC0 & 0xffff0000) | 0xfff8 to collie_init somewhere before adding mtd? Dec 11 23:55:43 before platform_add_devices? Dec 11 23:55:46 Yep Dec 11 23:56:17 This is to relax flash timings and to disable all bursts Dec 12 00:11:33 ok, cold boot Dec 12 00:14:39 :/ same Dec 12 00:14:44 UBIFS error (pid 441): check_lpt_type: invalid type (15) in LPT node type 2 Dec 12 00:15:13 I'll try quicly jffs2 then I'll have to go Dec 12 00:19:54 well, it survives to mount-remount Dec 12 00:20:29 now booting from it Dec 12 00:24:46 http://pastebin.com/4u6KHzNX Dec 12 00:25:19 clean at first... Dec 12 00:25:30 then issues after reboot Dec 12 00:30:48 anyway, I've booted 4-5 times from mtd and it is not corrupted Dec 12 00:30:56 booted = kexecbooted Dec 12 00:31:58 ah, finally Dec 12 00:31:59 root@collie:~# jffs2: Error garbage collecting node at 00769e88! Dec 12 00:33:57 jffs2 finallt gave up http://pastebin.com/BxSdY8FS Dec 12 00:34:15 lumag: have to go, will be back friday night Dec 12 00:34:23 thx for the support Dec 12 00:34:26 gn Dec 12 00:34:26 :( Dec 12 00:34:27 gn **** ENDING LOGGING AT Thu Dec 12 02:59:59 2013