Re: pmac_nvram problems

From: Benjamin Herrenschmidt
Date: Fri Aug 19 2005 - 19:05:48 EST


On Fri, 2005-08-19 at 12:55 +0200, Johannes Berg wrote:
> On Fri, 2005-08-19 at 07:40 +1000, Benjamin Herrenschmidt wrote:
>
> > Just a question: Why do you want to have the nvram low level code as a
> > module ? It's sort-of an intergral part of the arch code ...
>
> Because I Can (TM). Actually, I just did this because of the suspend
> issue where OSX would reset some values (notably the boot sound volume),
> but Linux wouldn't see this. So I figured that if I can compile it as a
> module (the Kconfig option is a tristate after all) I could just unload
> it. But that failed because of the alloc_bootmem issue.
>
> I wouldn't mind having it built-in at all, if it would re-read the
> cached values when resuming from suspend.

Best then is to add a sysdev there so you get suspend() and resume()
notification. You can then write to flash on suspend (same call done by
machine restart/powerdown) and re-read on resume.

Ben.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/