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

Reply via email to