Re: omap_hsmmc + gta04 + sdio irq + runtime_suspend + 4 bit = trouble

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tony,

I am just answering about things I already tested first
and already written several times.

On Tue, 6 Nov 2018 07:43:49 -0800
Tony Lindgren <tony@xxxxxxxxxxx> wrote:

> > Maybe I am wrong. Do you have a cite from the trm?   
> 
> Hmm I don't think there's much in the TRM about that.
> You should be able to verify it yourself easily with
> grep wake /proc/interrupts though.
> 
> > > > > Care to try something like this in the in omap3-gta04.dtsi:
> > > > > 
> > > > > &mmc2 {
> > > > >       interrupts-extended = <&intc 86 &omap3_pmx_core 0x12e>;
> > > > >       interrupt-names = "irq", "wakeup";
> > > > >       vmmc-supply = <&vaux4>;
> > > > >       bus-width = <4>;
> > > > >       ti,non-removable;
> > > > >       cap-power-off-card;
> > > > >       mmc-pwrseq = <&wifi_pwrseq>;
> > > > > };
> > > > > 
> > > > > Untested..     
> > > > No, tested, 
> > > > see my previous mails in the thread.
> > > > 
> > > > But I retested it in case of some PEBCAK issues.
> > > > plain 4.19.0-rc6 + dt patches    
> > > 
> > > Hmm it should just work(TM). Care to post your patch for that?
> > >   
> > https://misc.andi.de1.cc/0001-arm-omap-dts-add-wakeirq-for-mmc2-of-gta04.patch  
> 
> Yup that's all there really is to it for other devices. So I
> guess the only difference is that you also need to change
> to sdio 1-bit mode here?
> 
As already tested, 1 bit +pinctl works.
4bit irq + gpio remap irq also works but gives many irqs when wifi is
powered off.
DAT1 seems to be low then.
If not runtime suspended omap_hsmmc also gets its sdio irq and wifi
works fast and
reliably with 4 bits.

> > Now it is tested on several devices. So it is not my device
> > somehow strange.  
> 
> OK
> 
> > > And do you see interrupts with grep wake /proc/interrupts?
> > >   
> > The additional interrupt is there, but count stays at 1-2.  
> 
> Hmm that's interesting. Maybe check the 16-bit padconf
> register at offset 0x12e and see if what value it has?
> 
Must recheck. 

> Also maybe add a printk to the sdio runtime idle path to
> make sure it's idling and waking properly at that point?
> 
I added a printk to tell when an irq arrives. With omap_hsmmc
runtime suspend disabled, (echo on >power/control)
I get every 100ms an interrupt ( if (status & CIRQ_EN) ). If there is
traffic, of course more.

When I am using 1bit and runtime suspend, the picture about irq is the
same, except that mmc runtime goes to suspend for a few ms one or two
times per seconds and than waking up by the wakeup irq. Count
in /proc/interrupts raises by 1-2 irqs per second. Well,
autosuspend_delay is also set to 100ms, so that pattern is logical.

So having a wakeup irq here does not lead to powersaving in the soc
easily but to increased performance and powersaving in the wifi chip
because I am forced to have that irq here to have sdio_irq handling at
all without changing omap_hsmmc.c.
Mainline kernel gives only about 100KByte/s, with sdio irqs I get >
1000KByte/s.
And that is the first goal here to bring that performance to mainline
kernel, powersaving in the wifi chip by about 80%. SoC powersaving
seems to be a hard to earn fruit here.

Regards,
Andreas

Attachment: pgp6qdGEVnG_7.pgp
Description: OpenPGP digital signature


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux