[PATCH] *not for git* GTA01 - stop the SD card clock when idle

Jonas Bonn jonas.bonn at gmail.com
Thu Oct 16 21:50:57 CEST 2008

> If Jonas (or any other person) can confirm that it at least
> boots and doesn't trash the SD card, I'll immediately send in a formal
> version of that patch (properly style-checked and all).

Alright, I'll do as much!  It boots and doesn't trash the SD card.
I've got it up and running now and it doesn't have any (obvious)
adverse effect on performance, either.  Good ahead and apply the
patch... it's a net win, in any case.

I applied the patch to stable-tracking; it applies with only trivial
modifications.  That's the good news.  Unfortunately, gllin crashes on
stable-tracking... anyone else seen this?  For this reason, I haven't
been able to check whether GPS performance is affected.

I did see that enable_clock is called multiple times... it's called
once per request, even when the clock is already enabled.  Conversely,
disable_clock is called just once.  This doesn't seem to be an issue,

> One question, as I review this code myself -- I put a spinlock to
> protect the enable/disable of the clocks, but I'm not sure that has
> turned out to be necessary.  The register in question is never touched
> inside the IRQ handler, so I think it is unnecessary.  If someone can
> confirm that it's safe to remove that spinlock, I'll clean that bit out.

I agree, the ISR doesn't touch the register... but it schedules
pio_tasklet, which does.  Can pio_tasklet be scheduled ahead of the
interrupted task in this case?


More information about the openmoko-kernel mailing list