[PATCH] qi: initialize PMU GPIOs

Werner Almesberger werner at openmoko.org
Sat Jan 24 17:01:23 CET 2009


Andy Green wrote:
> Another issue though is that for determinism, really the kernel driver
> should arguably assert all the needed state for the default at kernel
> startup and not leave it to be inherited by the bootloader as we have
> previously done.

How about taking the next step and redoing all the PMU and GPIO setup
in mach-gta02.c or similar ? I've been suggesting this for a long time,
but you didn't like the idea back then.

That way, the kernel doesn't care what the boot loader did or didn't
do, and anyone who wants to understand the logic behind the use of
some signal has fewer places to look at for answers.

This still leaves the time until the kernel comes up susceptible to
such problems, we could improve that a little by sharing the code,
e.g., qi could use the defaults from the kernel. That would create a
build-time dependency, which isn't great but probably bearable, and
it would make kernel and boot loader automatically converge.

> Really the defaults in hardware should be designed to
> be sane already (ie, pull that line down not up) so the bootloader is
> not involved.

Ah, in a perfect world without backup batteries and things that reset
only in NoPower but not in Standby ... ;-)

- Werner



More information about the openmoko-kernel mailing list