linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* i2c-omap.c vs. qemu: too much work in one irq (and broken boot)
@ 2017-10-01 20:42 Pavel Machek
  2017-10-01 22:19 ` Pavel Machek
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2017-10-01 20:42 UTC (permalink / raw)
  To: pali.rohar, sre, kernel list, linux-arm-kernel, linux-omap, tony,
	khilman, aaro.koskinen, ivo.g.dimitrov.75, patrikbachan, serge,
	abcloriens, clayton, martijn, sakari.ailus, wsa, linux-i2c, balbi,
	jlu

[-- Attachment #1: Type: text/plain, Size: 2409 bytes --]

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.
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: i2c-omap.c vs. qemu: too much work in one irq (and broken boot)
  2017-10-01 20:42 i2c-omap.c vs. qemu: too much work in one irq (and broken boot) Pavel Machek
@ 2017-10-01 22:19 ` Pavel Machek
  2017-10-02  7:23   ` Pali Rohár
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2017-10-01 22:19 UTC (permalink / raw)
  To: pali.rohar, sre, kernel list, linux-arm-kernel, linux-omap, tony,
	khilman, aaro.koskinen, ivo.g.dimitrov.75, patrikbachan, serge,
	abcloriens, clayton, martijn, sakari.ailus, wsa, linux-i2c, balbi,
	jlu, bigeasy

[-- Attachment #1: Type: text/plain, Size: 857 bytes --]

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).

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 <bigeasy@linutronix.de>
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
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: i2c-omap.c vs. qemu: too much work in one irq (and broken boot)
  2017-10-01 22:19 ` Pavel Machek
@ 2017-10-02  7:23   ` Pali Rohár
  2017-10-03  9:38     ` Pavel Machek
  0 siblings, 1 reply; 4+ messages in thread
From: Pali Rohár @ 2017-10-02  7:23 UTC (permalink / raw)
  To: Pavel Machek
  Cc: sre, kernel list, linux-arm-kernel, linux-omap, tony, khilman,
	aaro.koskinen, ivo.g.dimitrov.75, patrikbachan, serge, abcloriens,
	clayton, martijn, sakari.ailus, wsa, linux-i2c, balbi, jlu,
	bigeasy

On Monday 02 October 2017 00:19:35 Pavel Machek wrote:
> 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).
> 
> 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 <bigeasy@linutronix.de>
> 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

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

-- 
Pali Rohár
pali.rohar@gmail.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: i2c-omap.c vs. qemu: too much work in one irq (and broken boot)
  2017-10-02  7:23   ` Pali Rohár
@ 2017-10-03  9:38     ` Pavel Machek
  0 siblings, 0 replies; 4+ messages in thread
From: Pavel Machek @ 2017-10-03  9:38 UTC (permalink / raw)
  To: Pali Rohár
  Cc: sre, kernel list, linux-arm-kernel, linux-omap, tony, khilman,
	aaro.koskinen, ivo.g.dimitrov.75, patrikbachan, serge, abcloriens,
	clayton, martijn, sakari.ailus, wsa, linux-i2c, balbi, jlu,
	bigeasy

[-- Attachment #1: Type: text/plain, Size: 1272 bytes --]

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).
> > 
> > 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 <bigeasy@linutronix.de>
> > 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
> 
> 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
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-03  9:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-01 20:42 i2c-omap.c vs. qemu: too much work in one irq (and broken boot) Pavel Machek
2017-10-01 22:19 ` Pavel Machek
2017-10-02  7:23   ` Pali Rohár
2017-10-03  9:38     ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).