Ok,
I have pushed a version where shutdown works...
http://projects.goldelico.com/p/letux-400/source/commit/74581b4b47c43c181ede4451a0c92798857731b0/
What I have done is to disable CONFIG_JZ_POWEROFF and add/enable/patch
the 2.4 driver for /proc/powerdown with a new CONFIG_JZ_MINIPC_MISC.
It works well except one feature the driver should provide: respond to
pressing the power button. The problem is a major change from the 2.4
register_irq() to 2.6.24. They differ in several aspects. And when I
enable the (already modified) register_irq in
line 288 of
http://projects.goldelico.com/p/letux-400/source/tree/74581b4b47c43c181ede4451a0c92798857731b0/drivers/char/jzchar/minipc-misc.c
The kernel keeps scrolling some irq related error message and does not
complete booting. Unfortunately I have not yet found a way to retrieve
this message since it is not stored in the syslog - and I have to
force shutdown :(
During work on this, I have come over some more feature ideas:
a) the shift lock, num lock functions etc. should control their LEDs
b) WiFi enabled should be indicated by some LED
c) if the screen-saver is in power-down, the power LED (or another
one) should blink to make it more visible that the device is just in
screen saver mode and not (yet) switched off
BR,
Nikolaus
Am 08.05.2010 um 12:01 schrieb Dr. H. Nikolaus Schaller:
I just found some code in the 2.6.24 kernel at
drivers/char/jzchar/poweroff.c
but that is quite strange code and not exactly what we are looking
for. But it is enabled in the .config by CONFIG_JZ_POWEROFF...
It does define some GPIOs related to power management...
#ifdef CONFIG_SOC_JZ4730
#define GPIO_PW_I 97
#define GPIO_PW_O 66
#define DO_SHUTDOWN_SYSTEM __gpio_clear_pin(GPIO_PW_O)
#define DO_SUSPEND jz_pm_suspend()
#define GPIO_DISP_OFF_N 93
So I think we have the wrong (because generic for some development
board) power management code in our kernel.
I think we should disable the CONFIG_JZ_POWEROFF and replace with a
driver based on the 2.4 code.
BR,
Nikolaus
Am 08.05.2010 um 09:19 schrieb Dr. H. Nikolaus Schaller:
Am 08.05.2010 um 08:57 schrieb Daniel Glöckner:
On Sat, May 08, 2010 at 08:18:34AM +0200, Dr. H. Nikolaus Schaller
wrote:
It looks as if there is some additional PIC chip (called MCU) for
power management which needs an indvidual driver... But there is
both code for I2C accessing a PIC and simply through a GPIO 65.
So I
suspect there are two hardware variants and things are controlled
by
CONFIG_MINIPC_PIC16X54.
I thought they were using only the LPC915 through I2C to power off
(and read the battery) and the gpio code was just a remnant of one
of Ingenic's reference designs.
Yes, this appears to be consistent with my thoughts. The GPIO code
in the celinux sources is disabled (which indicates an older
design). My experimental machine *may* be one of those with GPIO (I
got it as a sample unit and have never opened it :).
Has anyone done an analysis of the PIC/LPC915/MCU thing?
If not, I think it should not be too difficult to port/adapt the /
proc driver to Linux 2.6 - assuming that it is already doing the
right things...
BR,
Nikolaus
_______________________________________________
Mipsbook-devel mailing list
Mipsbook-devel@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/mipsbook-devel
_______________________________________________
Mipsbook-devel mailing list
Mipsbook-devel@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/mipsbook-devel
_______________________________________________
Mipsbook-devel mailing list
Mipsbook-devel@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/mipsbook-devel