**** BEGIN LOGGING AT Wed Feb 18 02:59:57 2009 Feb 18 12:38:51 hi. Feb 18 12:41:21 is suspend/resume working with current linus kernel on palm pxa27x devices? Feb 18 13:42:37 hi marex. Feb 18 13:42:51 is suspend/resume working with current linus kernel on palm pxa27x devices? Feb 18 13:43:24 WyrM: hi Feb 18 13:43:37 it depends from device to device Feb 18 13:43:41 WyrM, hi, on palmt5 it's working completely with ycmiao's kernel tree (patch-tracking KT) Feb 18 13:43:51 WyrM, see RTFM from topic for a link Feb 18 13:44:18 oh, pure linus' kernel? Feb 18 13:44:42 not pure. Feb 18 13:44:49 impure ! Feb 18 13:44:53 but a kernel that is based at least on .28 :) Feb 18 13:44:54 :D Feb 18 13:45:12 WyrM, see RTFM for a link, navigate to devel branch, there it is Feb 18 13:45:22 well, Treo680 is not working yet :( Feb 18 13:45:22 dunno if Eric already pushed it into LAKT Feb 18 13:46:23 any needed changes to resume code? Feb 18 13:46:27 I can't resume on EZX. Feb 18 13:47:07 the kernel just freezes, and it is very hard to trace where it stops (no framebuffer, no usb, no nothing) :( Feb 18 13:47:49 WyrM, well porting it to EZX would be hard Feb 18 13:48:10 suspend-to-mem (that is - resuming using bootloader) is platform dependent Feb 18 13:48:38 I can see that the bootloader gave control to kernel on resume with an asm hack on pxa_cpu_resume on sleep.S Feb 18 13:48:42 you can try doing "cough-cough" to the bootloader using arm-something-objdump Feb 18 13:48:52 ah I see Feb 18 13:49:09 so you can clearly see it jumped back to kernel on resume ? Feb 18 13:49:18 I hacked my bootloader to resume the linux way (resume address stored on PSPR), it is working. Feb 18 13:49:31 so what's the issue ? Feb 18 13:49:44 the kernel stops somewhere.. :) Feb 18 13:50:14 well do you have some indication the loader at least passes control back to linux ? Feb 18 13:50:23 I found pointers on lakml about GPDR/GADR restore ordering issues. Feb 18 13:50:29 of you do know it happens, you are probably facing some memory corruption from the loader Feb 18 13:50:31 but it doesn't seems to help. Feb 18 13:51:08 no, my bootloader is hacked and it does not write anything to memory. Feb 18 13:51:35 it just branches to whatever is stored on PSPR if the reset cause is a resume. Feb 18 13:52:56 WyrM, wasnt there something like "do not blank FB on suspend ? Feb 18 13:53:03 WyrM, lemme take a look Feb 18 13:53:16 good idea. Feb 18 13:53:44 hi Feb 18 13:53:47 I remember this a long ago, on .16 or something.. (btw, my resume worked with older kernels). Feb 18 13:54:13 WyrM, yup ... that was it back then Feb 18 13:54:36 WyrM, pxafb went through a lot of changes, but I suppose pxafb_blank() is what you are looking for Feb 18 13:56:19 WyrM, hang on ... that was also some config option in debug Feb 18 14:00:24 dang, cant find the right one now Feb 18 14:00:56 I can't find the old config option to not blank the frame buffer. :/ Feb 18 14:01:42 its a pain to debug, im currently corrupting memory to debug and see how far the kernel goes.. Feb 18 14:02:07 as my RAM is preserved even after some seconds without battery. Feb 18 14:02:29 jeez, yes, that happens but anyway ;) Feb 18 14:02:41 WyrM, cant you use serial console ? Feb 18 14:02:48 (or jtag) Feb 18 14:03:14 no, I would need to use SPI to enable a serial console or USB. Feb 18 14:03:22 and the kernel doesn't go that far :) Feb 18 14:03:39 jtag would work. Feb 18 14:03:52 ah yes, that USB thingamie, I recall ezx has something like that ... Feb 18 14:04:02 but I have no jtag adapter here, and also I don't want to solder stuff to the phone board . Feb 18 14:05:23 WyrM, just a silly question, but I suppose it cant be some driver causing problems with resume, right ? Feb 18 14:05:33 yes, its possible. Feb 18 14:05:43 try stripping down the kernel as much as possible then Feb 18 14:05:44 I will try disabling most stuff I can. Feb 18 14:05:49 right Feb 18 14:06:03 since if it worked for you before, it's weird Feb 18 14:06:10 but I still need a lot of drivers to get usb working to get a console. Feb 18 14:06:48 it worked a long ago, and I have no idea when it stopped. Feb 18 14:06:50 :/ Feb 18 14:07:09 WyrM, dont you have framebuffer ? Feb 18 14:07:26 pxafb should work Feb 18 14:07:56 then I need to figure a way to send the phone to suspend, without using the console :) Feb 18 14:08:22 use initramfs with busybox Feb 18 14:08:22 as Im currently writing "mem" to /sys/power/state. Feb 18 14:08:38 yup, you can compile initramfs right into kernel image Feb 18 14:27:43 marex: the kernel that resumes successfully on palm, has cpufreq support on .config? Feb 18 14:28:10 yes, but throwing it out will help you in debuging as well Feb 18 14:29:12 2 months ago a kernel without cpufreq was freezing on boot. Feb 18 14:29:18 at "freeing init memory". Feb 18 14:32:08 same state. Feb 18 14:32:31 if I remove cpufreq the kernel boots up to "Freeing init memory" and freezes. Feb 18 14:34:18 something's very wrong in your setup then Feb 18 14:34:35 you'd better start by fixing this Feb 18 14:34:47 it might be just an issue of a improper GPIO setup (see MFP) Feb 18 14:35:10 what's the relation of cpufreq and mfp? Feb 18 14:35:41 it may also be something on the rootfs. Feb 18 14:36:15 as it mounts the rootfs, and then freezes with no error message. Feb 18 14:36:38 I will just leave cpufreq enabled for now :) Feb 18 14:43:10 WyrM, cpufreq might hang the boot as well since it's reseting the CPU powerstate at resume Feb 18 14:43:37 throw away everything you dont need ... if it doesnt work without cpufreq, something it really wrong Feb 18 14:46:10 everything seems to work without cpufreq, I can see the mmc being recognized and mounted, the usb works, everything works. Feb 18 14:46:33 except that when it loads /bin/init it freezes, Feb 18 14:51:25 I will try without cpufreq, and with init=/bin/sh on the cmdline Feb 18 14:56:11 no luck, still freezes :/ Feb 18 15:03:37 you might have some console-related issue then Feb 18 15:03:51 I know this problem can happen and I already saw it Feb 18 15:03:55 lol. Feb 18 15:04:00 this is really weird. Feb 18 15:04:05 never in relation with cpufreq though Feb 18 15:04:06 and very fishy. Feb 18 15:04:20 I enabled user_debug on the kernel cmdline. Feb 18 15:04:29 and it DOES NOT freeze without cpufreq. Feb 18 15:04:49 console is pxafb. Feb 18 15:05:00 it seems more like some scheduling issue. Feb 18 15:05:18 now it freeze just after loading portmap. Feb 18 15:07:37 sorry about the reconnects btw, ubuntu seems crazy, reconfiguring eth0 every time I reconnect usb0. Feb 18 15:07:39 lol. Feb 18 15:12:46 old version of NetworkManager? :b Feb 18 15:13:00 its up-to-date. Feb 18 15:13:22 don't know why this is happening. :/ Feb 18 15:13:54 it happened to me with some older versions Feb 18 15:14:20 now I've got usb0 not driven by NM, but automatic configuration by YaST Feb 18 15:23:54 I enabled a lot of debugging output, but still nothing useful about the no-cpufreq freeze. Feb 18 15:36:28 Sleep_Walker, SuSE is fucked up ... another shitty distro joins my ubuntu-distro-blacklist Feb 18 15:36:43 now actually suse-ubuntu-distro-blacklist Feb 18 15:38:05 marex: fault was on your side... Feb 18 15:38:19 Sleep_Walker, no, fault was on suse side Feb 18 15:38:41 marex: SuSE != Debian != Windows Feb 18 15:39:02 Sleep_Walker, right ... but I doubt transitiveness Feb 18 15:39:49 marex: fcuk :b Feb 18 15:40:09 marex: SuSE != Windows != Debian Feb 18 15:40:18 that should be enough Feb 18 15:40:32 you can't use Windows same way as Debian Feb 18 15:40:42 you can't use SuSE same way as Debian Feb 18 15:40:44 suse (is much worse than) windows (which is much worse than) debian Feb 18 15:40:47 right Feb 18 15:41:14 you cant use SuSE. that should be enough Feb 18 15:41:19 marex: that's different relation which I didn't speak about Feb 18 15:41:30 or rather my parents cant, because it screws itself up randomly Feb 18 15:41:31 marex: _I_ can ;) Feb 18 15:41:41 lol Feb 18 15:41:42 _YOU_ can't Feb 18 15:41:52 you can't compare windows to any linux distro. Feb 18 15:41:55 Sleep_Walker, _I_ dont use that notebook anymore Feb 18 15:42:05 you will go to hell for doing that. Feb 18 15:42:36 WyrM: that's fine, I can now rape small children without fear... Feb 18 15:43:05 :D Feb 18 15:43:13 WyrM: that's fine, I can now rape small children without fear... Feb 18 15:43:46 rtfl :D Feb 18 15:55:04 no clue for the cpufreq issue. Feb 18 15:55:33 I will change the gcc version as a last try. :/ Feb 18 15:56:33 WyrM1, what version did you used to compile the kernel ? Feb 18 15:56:52 it seems that <= 4.1 generated broken code in some cases Feb 18 15:57:28 was using: Feb 18 15:57:28 arm-angstrom-linux-gnueabi-gcc (GCC) 4.1.2 Feb 18 15:57:28 will try with: Feb 18 15:57:28 arm-none-eabi-gcc (Sourcery G++ Lite 2008q3-66) 4.3.2 Feb 18 15:58:04 rootfs was built with the older one. Feb 18 15:59:40 LOL Feb 18 15:59:49 it works with the newer gcc. Feb 18 16:00:05 it was really a gcc issue. Feb 18 16:00:24 now I can try resume without cpufreq. :) Feb 18 16:00:48 No, it won't work. Feb 18 16:00:52 freeze on portmap. Feb 18 16:15:13 back to the old write to ram debug :( Feb 18 16:20:45 WyrM1, cant you flash leds or something ? Feb 18 16:21:08 heh, if I was sure that spi was working... Feb 18 16:21:09 or wait ... you are writing to the memory from linux and then reading that ? Feb 18 16:21:17 yes. Feb 18 16:21:25 oh my :) Feb 18 16:21:30 I read it after removing/placing the battery Feb 18 16:22:09 lots of "*(unsigned long *)(phys_to_virt(0xa0000000)) =" on the code. ;) Feb 18 16:22:49 jeez Feb 18 16:43:12 heh, ugly but this works ;) Feb 18 16:44:02 pxa27x_cpu_pm_finish() is called. Feb 18 16:45:16 what is the normal resume code path? Feb 18 16:45:28 what should I check after pm_finish()? Feb 18 16:53:23 kernel/power/main.c Feb 18 17:00:17 *(unsigned long *)(phys_to_virt(0xa0000000)) = 0x00000014; Feb 18 17:00:17 device_resume(PMSG_RESUME); Feb 18 17:00:17 *(unsigned long *)(phys_to_virt(0xa0000000)) = 0x00000015; Feb 18 17:00:27 it freezes here. Feb 18 17:00:37 between 14 and 15 :) Feb 18 17:02:07 well it calls device_resume, you should dig further in there Feb 18 17:02:21 sure. Feb 18 17:02:32 as soon as I figure out where it is declared. Feb 18 17:02:36 lol Feb 18 17:03:11 there was some project for it - linux identifier search Feb 18 17:04:44 drivers/base/power/main.c Feb 18 17:05:26 its indeed some driver that is failing. Feb 18 17:06:12 WyrM1, see, I told you Feb 18 17:06:32 since it works for you, I think I can probably eliminate whatever drivers you use. Feb 18 17:06:35 hey, hang on ... do you recall that platform_driver device_driver platform_device etc. mess ? Feb 18 17:07:10 lets see, you use pxa-mmc and pxa27x-udc, correct? Feb 18 17:07:13 WyrM1, use only those drivers that are in kernel (that is - pxafb), you probably dont need anything else Feb 18 17:07:17 suspend should work then Feb 18 17:07:31 WyrM1, throw them away as well, you dont need them with initramfs Feb 18 17:08:05 heh, but I need to trace where its failing, I need suspend/resume working with all the drivers :/ Feb 18 17:08:25 WyrM1, right ... so you will be adding them back one after another Feb 18 17:08:29 ahh, I think I have a clue. Feb 18 17:08:41 I think its probably my TS driver. Feb 18 17:08:52 I see ... is the code available somewhere ? Feb 18 17:09:30 as it has PM support, but depends on my MFD driver, which has no PM support currently, and probably the .parent is not being handled correctly. Feb 18 17:09:46 yes, my code is at http://git.openezx.org/openezx.git Feb 18 17:09:52 the ezx/current branch Feb 18 17:10:40 WyrM1, which driver is it ? Feb 18 17:10:55 input/touchscreen/pcap_ts.c Feb 18 17:11:05 and drivers/mfd/ezx-pcap.c Feb 18 17:11:17 pcap is a multi function ASIC. Feb 18 17:11:30 and the TS is a subdriver of the ezx-pcap.c driver. Feb 18 17:12:14 im trying with the TS driver out. Feb 18 17:13:00 remove the whole asic maybe Feb 18 17:13:16 if I do, everything else would need to be removed. Feb 18 17:13:35 (platform driver seems fine to me ... dunno if the ezx_pcap_read() cant die after resume - that is in case the ASIC doesnt kick in) Feb 18 17:13:36 as USB, MMC, sound, etc.. are all dependent on this asic Feb 18 17:13:57 I think it's a ordering issue. Feb 18 17:14:18 as the whole SPI subsystem needs to be ready before the TS driver resumes. Feb 18 17:16:22 WyrM1, well I still dont see a point in having such a pile of drivers compiled in Feb 18 17:16:39 its how I develop. Feb 18 17:16:47 I send the kernel directly to RAM. Feb 18 17:16:57 if I were to debug such issue, I'd remove everything and left only framebuffer Feb 18 17:17:10 easier to have everything built-in, so I don't need to edit my rootfs every time. Feb 18 17:17:22 then I'd suspend-resume using initramfs (or kernel/main.c, see there how to suspend without any fs) Feb 18 17:17:35 I would need to build a initramfs. Feb 18 17:17:35 errr .... init.c Feb 18 17:17:38 im lazy :) Feb 18 17:18:07 and then add the drivers one after another to precisely pinpoint which on is the bad one Feb 18 17:18:17 hm ... well it's your suffering ;-) Feb 18 17:23:31 now I don't get a resume at all. Feb 18 17:23:33 weird. Feb 18 17:23:50 not even the debug at sleep.S early resume. Feb 18 17:24:17 oh, maybe my only wakeup source was the ts driver. :/ Feb 18 17:25:13 WyrM1, you can set GPIO[0-15] as a wakeup source so map some button Feb 18 17:27:08 I have no buttons connected to these gpios. Feb 18 17:28:39 I will leave the ts driver in, and remove just the resume code. Feb 18 17:28:43 easier :) Feb 18 17:31:41 WyrM1, how come it resumes from it ? Feb 18 17:31:56 WyrM1, where must be a "display touched" GPIO, use that one Feb 18 17:32:02 s/w/t/ Feb 18 17:32:19 well, I think that its not only 0-15 gpios which may be configured as wake-up. Feb 18 17:32:26 im not sure :) Feb 18 17:32:59 the keys on this device are using the pxa matrix keypad driver. Feb 18 17:33:10 with keys on gpio93 and higher. Feb 18 17:34:33 good, now it resumes again, but still freezes, so its not the ts driver :/ Feb 18 17:34:48 there is no resume code on the ezx-pcap.c driver, so it can't be it either. Feb 18 17:37:08 how do I set correct dependency chain for suspend resume? Feb 18 17:37:35 I want SPI to be resumed before USB and MMC, how do I do that? Feb 18 17:39:50 btw, do you use pxa2xx-spi on palm? Feb 18 17:40:12 I suspect it's the issue. Feb 18 17:40:47 previously, when I had suspend/resume working, I was not using the pxa2xx-spi driver, I was using arch/arm/mach-pxa/ssp.c directly Feb 18 17:42:56 now I disabled sound driver, and added debug code to pxa2xx_spi resume... Feb 18 17:47:11 no, spi resume gets executed ok :/ Feb 18 17:48:33 GPIO12_GPIO | WAKEUP_ON_LEVEL_HIGH, Feb 18 17:48:46 is this enough to make the pin a wakeup source? Feb 18 17:51:22 WyrM1, see how palmt5 resumes Feb 18 17:51:34 WyrM1, you have to preserve power levels in some GPIOs Feb 18 17:51:37 at least on T5 Feb 18 17:52:20 gpio12 is an input gpio. Feb 18 17:52:29 for the phone's flip. Feb 18 17:53:55 I use it with the gpio_keys driver Feb 18 17:59:09 does palmtx resumes on any key? Feb 18 18:17:03 pxa27x-matrix can be used as a wakeup source, yes (see PKWR) Feb 18 18:17:26 how do I do it? Feb 18 18:17:33 setting pkwr directly? Feb 18 18:49:01 my TX will not boot linux. it says it cannot mount the rootfs... Feb 18 18:49:21 any suggestions? Feb 18 18:50:45 i have tried cocoaboot and garux... Feb 18 18:51:33 i have been following handhelds.org's BinaryHowTo Feb 18 18:51:41 maybe you should setup your rootfs, on whatever place the kernel expects it to be. Feb 18 18:52:00 yeah, I copied opie-rootfs Feb 18 18:52:21 now I'm trying to grok the default linux.boot.cfg Feb 18 18:54:37 wait, does the kernel support SDHC? Feb 18 18:55:05 sure Feb 18 18:55:18 ok, good. Feb 18 18:57:02 let's try again... Feb 18 19:00:17 cocoboot returned c01d Feb 18 19:03:37 hi guys ..... how can i unlock my hauwei mobile modem Feb 18 19:06:56 Could someone walk me through it, since I'm obviously doing sumting wrong? Feb 18 19:21:58 ... Feb 18 20:14:08 ok, I'm back... Feb 18 20:14:32 my TX will not boot linux. it says it cannot mount the rootfs... Feb 18 20:15:12 and the exact error is... Feb 18 20:15:34 Loading /zImage... 1292432 b OK. Feb 18 20:15:52 Loading /initrd.gz... 147456b OK. Feb 18 20:15:59 Returned: c01d Feb 18 20:16:29 then the command line options are "init=/linuxrc root=/dev/ram0 Feb 18 20:17:15 cuddlefish: which version of cocoboot do you have? Feb 18 20:17:27 0.3 Feb 18 20:17:34 the one comes w/ the package Feb 18 20:17:41 cuddlefish: Feb 18 20:17:42 version 0.4: Feb 18 20:17:44 - Fixed 'c01d' error introduced in 0.3 on LD, TX etc. Feb 18 20:17:53 b'Doh! Feb 18 20:17:54 just grab newest coco Feb 18 20:18:22 * cuddlefish bangs head against wall hard Feb 18 20:18:39 that happens Feb 18 20:18:48 cuddlefish: was it |miska|'s package? Feb 18 20:19:04 yep Feb 18 20:19:14 |miska|: could you please fix your release? Feb 18 20:19:47 cuddlefish: sorry for late answer - I'm still at work :( Feb 18 20:20:22 it's ok. I'm still asleep after an incident last night involving root beer and motherboards :-( Feb 18 20:20:33 <|miska|> Oh, seems like an easy fix, will take a look at it Feb 18 20:20:38 ok, recieving file... Feb 18 20:21:14 <|miska|> During the weekend Feb 18 20:21:22 of course :) Feb 18 20:21:28 <|miska|> Writing to todo now Feb 18 20:21:59 cuddlefish, http://hackndev.com/node/269 Feb 18 20:22:06 download 0.6.0 there Feb 18 20:22:30 yeah, we need to hunt bugs on current version :b Feb 18 20:23:29 Whee! Boot screen! Feb 18 20:23:34 Thanks to everyone! Feb 18 20:23:40 enjoy Feb 18 20:24:06 interesting logo. Feb 18 20:24:20 hey, cool voice! **** ENDING LOGGING AT Thu Feb 19 02:59:57 2009