i2c-omap.c vs. qemu: too much work in one irq (and broken boot)
Hi!
I'm trying to get qemu emulation of Nokia N900 to work, but unfortunately i2c-omap.c breaks boot in the emulator (real hardware works ok).
[ 0.837524] omap2-onenand omap2-onenand: initializing on CS0, phys base 0x01000000, virtual base d00c0000, freq 66 MHz [ 0.838958] Muxed OneNAND 256MB 1.8V 16-bit (0x40) [ 0.839752] OneNAND version = 0x0121 [ 0.842102] Scanning device for bad blocks [ 1.012451] 6 ofpart partitions found on MTD device omap2-onenand [ 1.013153] Creating 6 MTD partitions on "omap2-onenand": [ 1.014007] 0x000000000000-0x000000020000 : "bootloader" [ 1.018066] 0x000000020000-0x000000080000 : "config" [ 1.020660] 0x000000080000-0x0000000c0000 : "log" [ 1.022827] 0x0000000c0000-0x0000002c0000 : "kernel" [ 1.025848] 0x0000002c0000-0x0000004c0000 : "initfs" [ 1.028106] 0x0000004c0000-0x000010000000 : "rootfs" [ 1.047668] omap_i2c 48070000.i2c: addr: 0x004b, len: 2, flags: 0x0, stop: 1 [ 1.048828] omap_i2c 48070000.i2c: IRQ (ISR = 0x0010) [ 1.049530] omap_i2c 48070000.i2c: IRQ (ISR = 0x0010) [ 1.050018] omap_i2c 48070000.i2c: IRQ (ISR = 0x0010) [ 1.050476] omap_i2c 48070000.i2c: IRQ (ISR = 0x0010) [ 1.050872] omap_i2c 48070000.i2c: IRQ (ISR = 0x0010) [ 1.051422] omap_i2c 48070000.i2c: IRQ (ISR = 0x0010) [ 1.052001] omap_i2c 48070000.i2c: IRQ (ISR = 0x0010) [ 1.052398] omap_i2c 48070000.i2c: IRQ (ISR = 0x0010) [ 1.052825] omap_i2c 48070000.i2c: IRQ (ISR = 0x0010) [ 1.053222] omap_i2c 48070000.i2c: IRQ (ISR = 0x0010) [ 1.053619] omap_i2c 48070000.i2c: IRQ (ISR = 0x0010) [ 1.054016] omap_i2c 48070000.i2c: IRQ (ISR = 0x0010) [ 1.054412] omap_i2c 48070000.i2c: IRQ (ISR = 0x0010) [ 1.054840] omap_i2c 48070000.i2c: IRQ (ISR = 0x0010)
...
After 100 messages I get "Too much work in one IRQ" message, and then repeat. I tried just disabling omap_i2c in the dts, but 1) its not easy 2) I'd lose quite fundamental functionality.
Ideas welcome.
Best regards,
Pavel
PS: If anyone is interested, this is why working qemu would be useful:
https://wiki.postmarketos.org/wiki/Nokia_N900_(nokia-rx51) . There's a lot of work to be done in the userspace, and swapping SD cards is kind of slow.
Signature · 9 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171001/807547fb/attachment.sig>
Hi!
Quoted 3 lines
I'm trying to get qemu emulation of Nokia N900 to work, but unfortunately
i2c-omap.cbreaks boot in the emulator (real hardware works ok).
I started bisection. v4.6 works, v4.7 is broken. (It still may be config difference or something).
This looked suspect, so I tried reverting it, but it did not help. And it is only significant change in i2c-omap.c. So... this may be a lot of fun.
commit 126a66caec4a00b8d66dbc3174b0efa905cf68c3
Author: Sebastian Andrzej Siewior <[email protected]> Date: Mon Apr 4 16:55:23 2016 +0300
Unfortunately, mmc is broken in v4.6, so its useless for emulation... [ 3.236724] mmc1: error -22 whilst initialising SDIO card
Ideas?
Pavel
Signature · 9 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171002/df3ab2e2/attachment.sig>
Quoted 13 lines · On Monday 02 October 2017 00:19:35 Pavel Machek wrote:
Hi!
Quoted 3 lines
I'm trying to get qemu emulation of Nokia N900 to work, but unfortunately
i2c-omap.cbreaks boot in the emulator (real hardware works ok).I started bisection. v4.6 works, v4.7 is broken. (It still may be config difference or something).
This looked suspect, so I tried reverting it, but it did not help. And it is only significant change in
i2c-omap.c. So... this may be a lot of fun.
Quoted 6 lines
commit
126a66caec4a00b8d66dbc3174b0efa905cf68c3Author: Sebastian Andrzej Siewior <[email protected]> Date: Mon Apr 4 16:55:23 2016 +0300Unfortunately, mmc is broken in v4.6, so its useless for emulation... [ 3.236724] mmc1: error -22 whilst initialising SDIO card
Hi! You can apply special patch to make mmc work in both qemu and real N900 device for previous kernel versions...
https://github.com/pali/linux-n900/commit/eb080ecdcfc5868d8e36d0f5f42d9cb7f13b4db9
Signature · 2 lines
Pali Roh?r pali.rohar at gmail.com
Hi!
Quoted 15 lines
Quoted 15 lines
Quoted 3 lines
I'm trying to get qemu emulation of Nokia N900 to work, but unfortunately
i2c-omap.cbreaks boot in the emulator (real hardware works ok).I started bisection. v4.6 works, v4.7 is broken. (It still may be config difference or something).
This looked suspect, so I tried reverting it, but it did not help. And it is only significant change in
i2c-omap.c. So... this may be a lot of fun.commit
126a66caec4a00b8d66dbc3174b0efa905cf68c3Author: Sebastian Andrzej Siewior <[email protected]> Date: Mon Apr 4 16:55:23 2016 +0300
Quoted 7 lines
Quoted 2 lines
Unfortunately, mmc is broken in v4.6, so its useless for emulation... [ 3.236724] mmc1: error -22 whilst initialising SDIO card
Hi! You can apply special patch to make mmc work in both qemu and real N900 device for previous kernel versions...
https://github.com/pali/linux-n900/commit/eb080ecdcfc5868d8e36d0f5f42d9cb7f13b4db9
Thanks a lot, this fixes mmc for me.
But I'm still stuck with v4.6 kernel for qemu. Do newer kernels work there for anyone?
Thanks,
Pavel
Signature · 9 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171003/dfb777a6/attachment.sig>