#qi-hardware IRC log for Saturday, 2013-04-27

qwebirc68597Hi there06:00
qwebirc68597this is the first time I use this service. Just wondering if anyone can help me to get some Icarus boards06:02
kuribasHow did you get the specs for the ingenic jz4720?11:25
larscdownloaded from the ingenic website11:35
kuribasThe only file I found was about 50 pages, much less than the specs for an attiny!12:06
larscthey had the programming manual up for two weeks or so on their ftp server12:07
kuribasCool, this will get me started!12:17
larscand this tree has basic support for the jz4755, but it's a bit outdated http://projects.qi-hardware.com/index.php/p/qi-kernel/source/tree/jz47xx-2.6.38/12:24
lekernelwolfspraul, are you aware of this problem? http://pastebin.com/C6ShsTQ315:08
lekernelintroduced by commit 7c12ea66a7133c7631cb88de629b01217f4eca5815:08
lekernelalso, moving the LUT results in #E Internal error in control.c:251315:11
kuribasAre the pins of the jz4755 multiplexed?  If they aren't, then I don't need to know the schematic of my device, right?16:17
kuribasIf I know the chips used.16:17
larscthey are16:24
kuribasHm...16:25
kuribasIs it safe to probe the circuit with a multimeter to test the connections?16:25
larscwell don't blame we if stuff explodes, but it should be ok16:26
larscIf you know how to get the device into usbboot mode you can dump the firmware and can try to run it in qemu16:27
larscto see how it configures the pins16:27
kuribasI didn't try it yet, but there is a keypress/boot combination to get it into usbboot mode.16:29
kuribasYou think that's easier than probing with a multimeter?16:30
larscFor some things it's pretty hard to probe with a multimeter16:31
larscyou can figure out stuff like buttons and leds16:31
larscbut e.g. figuring out how the display is wired up is going to be harder16:32
larscI did this once for an e-book reader and started out with probing pins and toggeling the gpios, but later had to run things in qemu to find out everything16:33
kuribasOh I see.  I have no experience with running qemu, so I'll have to figure that out.16:36
larscDo you know the feeling when after a major codechange everything just works and you think that you must have used an old binary?18:01
viricyes18:44
whitequarklarsc: you know how underhanded c code contest exists?20:17
whitequarkwe could make a similar one for EE20:17
whitequarkmake an innocently looking device which will exhibit weirdest (not necessarily harmful) behavior when poked with common tools20:17
whitequarkhttp://underhanded.xcott.com/?p=2120:22
whitequarkalso this would make an excellent entry: https://code.google.com/p/nativeclient/issues/detail?id=24520:22
whitequarkbonus points for actually occuring in production code :p20:22
larscand the winning entry will be a xilinx fpga ;)20:22
whitequarkhehe20:23
whitequarklarsc: (major codechange) most often you DO use an old binary20:25
whitequarkthen you launch the new one and it leaves a 8 GB core dump20:25
whitequark(*something* actually leaves 8GB core dumps on my machine periodically... I think they would be larger but it ENOSPC's before it ENOMEM's20:26
larscin this case it worked fine. I rewrote the jz4740 dma/audio pcm code. 12 files changed, 670 insertions(+), 715 deletions(-)20:26
larscand I was quite puzzeld when it worked on first try20:26
whitequarkneat20:27
whitequarkwhy do you work on that code? free time? university project? self-education?20:27
larscI wanted a non ARM architecture that uses the new ASoC dmaengine PCM driver20:28
pcercuei< larsc> in this case it worked fine. I rewrote the jz4740 dma/audio pcm code.20:30
pcercueiWHOHOU!20:30
pcercueimth, hear this?20:30
pcercueimaybe it'll fix the nasty sound bug we were having20:31
larscand we now have the infrastrucutre to add dma support to the mmc driver20:32
pcercueiWHOHOU!20:33
pcercueimth, hear that?20:33
larscalmost three years late, but better late than never20:33
pcercueicertainly20:33
pcercueiwe have to deal with a crappy MMC driver for the jz477020:34
pcercueiI hope in the future we can adapt yours20:35
larscis it the same core?20:35
pcercueiit's an Xburst, yes20:36
larscI mean the MMC IP core20:36
pcercueiI believe, yes20:36
pcercueithe main difference is that the jz4770 handles 3 MMCs slots20:37
larscif it is three times the same core that shouldn't be much of a problem20:37
pcercueiwell, when porting UBIBoot from the jz4740 to the jz4770, I didn't touch at all the MMC code20:39
pcercueiI mean, it even includes "jz4740.h" inconditionally20:40
pcercueiso I'm pretty sure it didn't changed20:40
pcercueichange*20:40
larscbtw. I pushed out a jz-3.9-rc8 earlier today20:58
larscseems to work fine except for the usb gadget driver, which crashes20:58
larscmaybe that's a sign that we should bury it20:59
pcercueiwhy bury it?21:02
larscand replace it with the musb gadget driver21:05
pcercueiok21:06
Fallenoumusb IP is an OTG ip core, right ?21:06
larscyes21:07
larscbut the jz4740 only uses the gadget part21:07
larscI think later versions like the jz4770 use both21:09
Fallenouthe OMAP3630 has mUSB ip core as well21:09
Fallenoudon't know if it's the same21:09
Fallenoubut I can say that we had a lot of troubles with musb, used as Host21:09
Fallenoubut it seems to works well as device21:10
Fallenouwork*21:10
lekernelanyone looked at fpgatools close enough to know what the "S0N3" stuff is about?21:11
Action: Fallenou didn't look very close at fpgatools21:12
larscpcercuei, mth: oh, and I dropped "cpufreq_stats: Support runtime changes to frequency table" from the 3.9 tree, because the patch is one big conflict and I have no idea how to fix it21:55
mththat patch is a pain; I always hope it merges without conflicts, but every now and then it doesn't22:00
mthunfortunately, the cpufreq driver for JZ4740 is pretty useless without it22:00
mththe cpufreq support in the mainline kernel assumes a fixed max clock and configurable dividers22:01
mthbut what we do is change the PLL freq22:01
mthI'm in favor of switching over to musb22:02
mththat means less differences between 4740 and 477022:02
mthand less code to maintain22:02
mthon 4770 the musb core indeed supports both host and device mode, as well as runtime switching between those modes22:02
larscI just had a look and it seems that the driver currently doesn't support gadget only22:04
larscbut I think it should be possible to add that22:04
mththey removed support for that a few releases back22:04
mthbut I think you can force it into device mode and just never used the host mode code (even though it will be compiled in)22:05
mths/used/use/22:05
wpwraklarsc: (udc crash) same thing here :-)22:06
wpwrak(i also tried to "modernize" the old driver for 3.9)22:06
larscIt didn't even compile for me without updating the interface22:08
mthI haven't tried 3.9 yet, but on 3.8 the 4770 glue for musb still works fine22:09
mthpcercuei: which audio bug are you referring to? being prone to underruns or the weird siren effect?22:12
pcercueithe siren effect, yes22:12
mththat's caused by the power up sequence, not by the delivered data22:12
mthso this rewrite won't fix that22:12
pcercuei:(22:12
mththe programming manual tell you how to avoid it, but that means adding a pretty complex state machine in the driver22:13
pcercueiyes22:14
wpwraklarsc: well, they changes the names of some operations ...22:15
wpwrak... and their parameters (and of course, what's going on inside. massively)22:15
wpwrakthis is a thread with various related driver updates: http://permalink.gmane.org/gmane.linux.usb.general/7868522:17
larscyea, I kind of did that22:21
larscI think it crashed somewhere in the IRQ handler22:23
wpwrakhmm, mine died in Line 663 of "drivers/usb/gadget/composite.c" composite_setup22:24
larscyes22:25
larscso it starts in the IRQ handler and then dies in composite_setup with a NULL pointer deref22:26
wpwrakthis is what i changed: http://pastebin.ca/236846022:26
wpwrakbut it's reassuring that we ran independently into exactly the same problem :)22:27
larsccommit 10287ba might be the problem22:31
larscat least that's the only recent change in that area22:32
wpwrakhmm, looks reasonably harmless22:33
wpwrakthough big :(22:33
wpwrakblargh. that's ugly. func->function.fs_descriptors[(long)valuep]    = desc;22:33
wpwrakhmm, gadget->speed == 3, which would be USB_SPEED_WIRELESS. that sounds suspicious 22:40
wpwrakah no22:41
wpwrakSPEED_HIGH. all good.22:41
wpwrakwho the heck puts two values in the same line in an enum ?22:41
wpwrakthe problem seems to be max_speed22:44
wpwrakit's 0. this confuses gadget_is_dualspeed which in turn causes the hs_descriptor not to be copied22:44
larscyea, just thought the same22:45
larscor maybe not22:46
wpwraklet's see what happens :)22:47
wpwrakkernel looks happy22:47
wpwrakand lets me log in :)22:48
larscgood22:48
wpwrakfun fact: it works better if you set max_speed in udc_disable, not udc_enable :)22:56
larsccan't we set it in probe?22:59
wpwrakdoes udc_reinit sound like a fair compromise ?22:59
wpwrakand one of these days i have to teach my "fk" script to ignore ssh ...23:00
wpwrakthere, done :)23:03
qi-bot[commit] Werner Almesberger: bin/fk: add option -u to force usbboot, even if SSH is/seems available (master) http://qi-hw.com/p/wernermisc/040911f23:03
larscbtw. with lzma compression the defconfig image easily fits into 1.5MB23:04
wpwrakdon't we have some 2 MB in that partition ?23:06
wpwrakmy image is now 1.7 MB (gzip), apparently without problems23:06
larscbut that's not defconfig23:07
larscanyway, time to call it a night23:07
wpwrakah, missed the defconfig. wow, that's pretty nice then23:10
--- Sun Apr 28 201300:00

Generated by irclog2html.py 2.9.2 by Marius Gedminas - find it at mg.pov.lt!