**** BEGIN LOGGING AT Tue Dec 23 02:59:59 2014 Dec 23 09:09:29 ant_work, hello. Dec 23 09:09:39 I'm debugging the collie wakeup. Dec 23 09:09:53 I don't know why I didn't have those issues with my setup. Dec 23 09:10:14 gm Dec 23 09:11:00 Anyway I have identified few problems. Dec 23 09:11:01 note that w/out locomo patches susp-resume works but reboot puts collie to freeze (no wakeup by on/off) Dec 23 09:11:13 Yep, the reboot was the easiest problem. Dec 23 09:11:15 collie reboot is fishy... Dec 23 09:11:17 ;) Dec 23 09:11:44 It looks like a generic sa1100 problem (ugh). Dec 23 09:13:04 The kernel is not resetting the 'reset cause'. Dec 23 09:13:23 If you remember, the 'sleep' is just a special form of reset. Dec 23 09:13:38 yes Dec 23 09:14:41 So after sleep the 'reset cause' register has a 'resume' bit set. This tells bootloader to load a value from 'scratchpad' register and use it to resume. Dec 23 09:15:46 After you 'reboot' the unit, this 'sleep' bit is still set (nobody clears that), so the bootloader reads dummy value from scratchpad and jumps into the limbo. Dec 23 09:16:23 Technically this is a problem of bootloader/kernel interaction. However as the bootloader is fixed, we can just fix the kernel. Dec 23 09:21:06 can this explain the issues of new kexecboot (with 3.10 kernel ?) Dec 23 09:22:00 I understand the running kernel writes badly the registers Dec 23 09:22:29 but what about the fresh booting kernel? maybe 2.6.31 was ignoring something on boot Dec 23 09:22:47 while 3.x did refuse to boot Dec 23 09:22:58 I guess it was the LOW_BATTERY or such Dec 23 09:26:10 No, it's not the kernel. Dec 23 09:26:20 Maybe old kexecboot/kernels contained additional patches. Dec 23 09:26:42 Maybe Russell changed something (what is the working kexecboot kernel version, btw?) Dec 23 09:27:53 I'm disabling wakeup through 'remote controller' since nobody probably has that Dec 23 09:28:56 It's not the kernel writing the registers badly. Dec 23 09:29:05 It's the kernel badly not writing to register. Dec 23 09:38:02 ant_work, btw, I have the feeling that LZ4 compression gives better results on collie compared to lzma Dec 23 09:38:45 we only have the 1mb limit for linux-kexecboot Dec 23 09:38:53 iirc we use xz now Dec 23 09:39:15 for the production kernel we can use faster decompre4ssors Dec 23 09:40:00 ok, maybe for me the issue is reading from slow CF card Dec 23 09:58:40 ant_work, final test and I'll send you patches fixing the issue. Dec 23 09:59:09 no, there must be some issue Dec 23 09:59:20 kexec takes 20x on collie than on poodle Dec 23 09:59:33 misaligns maybe? Dec 23 09:59:37 I have to test on cmdline Dec 23 09:59:41 kexec -l Dec 23 09:59:45 and then kexec -r Dec 23 09:59:49 err -e Dec 23 09:59:56 I don't remember if there were architecture differences between armv4 and armv5te Dec 23 09:59:57 (tody can't type here...) Dec 23 10:00:23 ant_work, can we time kernel load and 'kexreboot' separately Dec 23 10:00:24 it cannot take so long to load 1-2 mb to ram... Dec 23 10:00:25 ? Dec 23 10:00:34 yes Dec 23 10:00:40 kexec -l -> load Dec 23 10:00:50 kexec -e -> execute Dec 23 10:01:12 I think it's the first part Dec 23 10:01:34 -e just passes control to the new kernel Dec 23 10:01:43 It'd be nice if you can include any prints into that part of script. Dec 23 10:02:04 ah, it's kexec-tools utility Dec 23 10:02:22 in shell we have the standard one Dec 23 10:02:36 I'll see if we can increase debug Dec 23 10:13:27 thx Dec 23 10:13:37 I've send you patches, btw. Dec 23 10:27:00 gtg now. Dec 23 10:30:56 thx, bbl Dec 23 22:01:37 ant__, ge Dec 23 22:04:02 hi Dec 23 22:04:15 I'm testing now the patches Dec 23 22:04:47 OMG, Isn't it a Christmas Eve in Europe? Dec 23 22:04:55 tomorrow Dec 23 22:05:29 Ah. Calendar is tricking me. It shows 24th already. Dec 23 22:05:49 If they work, I'll send you a version with tiny updates. Dec 23 22:07:17 Regarding resumes: it's funny. My locomo patches somehow trigger the 'remote controller / headphone plugin' pin/irq. Dec 23 22:07:39 It was listed as a wakeup source (not that we support headphones and/or RC). Dec 23 22:07:47 heh Dec 23 22:09:07 yes, suspend-resume is ok Dec 23 22:09:54 reboot does reboot Dec 23 22:09:59 great. Dec 23 22:11:12 halt does 'power down' and on/off wakes Dec 23 22:11:29 So... we have everything fixed? Dec 23 22:11:36 mom Dec 23 22:12:04 I've send you an updated sus/res patchset. It should fix a possible backtrace on resume in some cases. Dec 23 22:12:35 poweroff is ok as well (you never know...) Dec 23 22:12:43 grat work Dmitry! Dec 23 22:14:16 now thinking..we might have a strange wake-up source on poodle? Dec 23 22:14:37 Do you mean on poweroff? Dec 23 22:14:40 yes Dec 23 22:14:55 I'll have to check, but most probably not. Dec 23 22:15:05 Does suspend/resume work for poodle as expected? Dec 23 22:15:08 not on suspend, only on sleep Dec 23 22:15:12 Yep. Dec 23 22:15:12 yes Dec 23 22:16:26 now I'll do some kexec test Dec 23 22:16:33 on collie Dec 23 22:17:14 no. poodle does just 'reset' on power_off Dec 23 22:17:38 ah, that is wrong then Dec 23 22:27:32 hmm Dec 23 22:27:35 root@collie:~# kexec -l /boot/zImage-3.18.0-yocto-standard Dec 23 22:27:35 unrecoverable error: could not scan "/proc/device-tree/": No such file or directory Dec 23 22:28:58 Did somebody implement dts in not-so-correct way ?? Dec 23 22:29:04 in kexecboot Dec 23 22:29:10 (or in kexec) Dec 23 22:29:32 kexec-tools 2.0.8 released 23 December 2014 Dec 23 22:29:45 now testing old good 2.0.2 -klibc Dec 23 22:30:09 ant__, I can think of implementing a poweroff for poodle. It should call suspend with cooked 'resume' function that will re-suspend if 'on' key is not pressed. Dec 23 22:30:36 Heh. gpio-keys configuration is not present for poodle. Dec 23 22:33:07 root@collie:~# time kexec -l /boot/zImage-3.18.0-yocto-standard Dec 23 22:33:07 real 0m 0.90s Dec 23 22:33:07 user 0m 0.02s Dec 23 22:33:07 sys 0m 0.77s Dec 23 22:33:07 root@collie:~# Dec 23 22:33:09 fwiw Dec 23 22:33:32 So load is fast. Dec 23 22:33:39 and kexec -e is also immediate Dec 23 22:33:48 it is on uncompressing linux.... Dec 23 22:34:12 but on kexecboot was apperently before Dec 23 22:37:14 no, it the decompression Dec 23 22:37:17 indeed Dec 23 22:38:11 Most probably it's a decompression with disabled caches. Dec 23 22:38:22 right Dec 23 22:38:23 or misconfigured. Dec 23 22:38:58 if you remember there was some change and we got to remap phys to virt for sharpsl_param Dec 23 22:39:08 because the mmu was off iirc Dec 23 22:40:42 about collie battery, there were strange readings iirc (over the max) Dec 23 22:40:44 yes, but that was another story. Dec 23 22:40:56 * lumag_ is sorry. Dec 23 22:41:04 did the old patch add anything new? Dec 23 22:41:09 I still did not have time to check battery readings. Dec 23 22:46:34 Not for the battery. It makes it work with LCD turned off (usefull), adds hackish charge-in-suspend mode (by suspending if AC plugin/out or battery full was the cause of the wakeup event). Dec 23 22:47:01 ucb1x00 is the mess. Dec 23 22:47:11 It hangs/oopses on just evdev scanning. Dec 23 22:52:03 too many items in todo list. Dec 23 22:52:47 well, having power management is a big leap forward for collie Dec 23 22:53:03 touchscreen is next... Dec 23 22:53:08 ;) Dec 23 22:55:02 No. My big next items are locomo driver (mainlining), gpio/irq cleanup (mainlining) and udc driver (at least checking that it works and updating to the contemporary kernels/usbphy framework) Dec 23 22:56:55 ok, talking from user perspective here, opie-image for poodle is ok (just missing poweroff) Dec 23 22:57:04 collie lacks ts urgently Dec 23 22:57:16 UDC comes later Dec 23 22:57:31 but yes, before try to upstream locomo rework Dec 23 22:57:41 After that collie sound (development, fun), pxa dma rework (testing/measuring/debugging, not so fun), pxa cleanup (throwing code, fun), checking tosa for issues (debugging, not so fun) and looking onto DRM drivers implementation (strange code, not fun at all ATM). Dec 23 22:57:57 ah..sound... Dec 23 22:58:02 ant__, so there are issues with ts? Dec 23 22:58:20 yes, cannot calibrate Dec 23 22:58:26 hmm. Dec 23 22:58:32 gives invalid values Dec 23 22:58:37 as I said, ucb1x00 is a mess. Dec 23 22:58:39 I shoukd have some log Dec 23 23:01:45 rebooting now patches v2 Dec 23 23:03:18 ok, works like before Dec 23 23:04:52 tested susp/res, reboot, poweroff Dec 23 23:05:04 very nice Dec 23 23:05:34 hm.. in poweroff it doesn't recharge Dec 23 23:06:02 most probably. Dec 23 23:06:08 it does after hw reset Dec 23 23:06:14 orange-led Dec 23 23:06:20 It should keep the last status. Dec 23 23:06:28 There is fun with bootloader. Dec 23 23:07:08 ant__, that's strange. My unit boots after hardware reset. Dec 23 23:07:18 mine as well Dec 23 23:08:32 as you say, it seems keeping the last state when poweroff was executed Dec 23 23:08:36 straight after hw reset. Dec 23 23:08:39 yep. Dec 23 23:08:45 now it is sleeping and the orange led is lit Dec 23 23:08:47 doh Dec 23 23:11:04 ah..remember the locomokbd is unusable, remove the debug Dec 23 23:11:06 There is nobody to control charging during poweroff. Dec 23 23:11:14 ant__, yes, I remember. Dec 23 23:11:42 it should wakeup when battery gets full, but that's all. Dec 23 23:11:47 Hmm. Dec 23 23:12:02 And most probably it won't wake when powered off. Only when suspended. Dec 23 23:12:14 it's always been like that: after pressing reset the device boots Dec 23 23:12:30 after flashing Sharp Rom reset is needed as well Dec 23 23:13:08 yes. Dec 23 23:13:15 only if there is a BAT_LOW or such event the sa1100 stay suspended iirc Dec 23 23:44:27 gn **** ENDING LOGGING AT Wed Dec 24 02:59:59 2014