1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-01 16:25:20 +02:00

qi-add-totrst-clear-before-linux.patch

Before leaving for Linux, gratuitously clear down the totrst / timeout counter
to help stop us dying partway through boot on effective power-off.

In the case we have no battery or battery < ~3V, we still somehow need to do
more in kernel because it can switch itself off more than 8 seconds
after this point.

Signed-off-by: Andy Green <andy@openmoko.com>
This commit is contained in:
Andy Green 2008-11-28 10:16:39 +00:00 committed by Andy Green
parent cea4b83d53
commit 3554f337df

View File

@ -348,6 +348,10 @@ static void putc_gta02(char c)
static void close_gta02(void) static void close_gta02(void)
{ {
/* explicitly clear any pending 8s timeout */
i2c_write_sync(&bb_s3c24xx, PCF50633_I2C_ADS, PCF50633_REG_OOCSHDWN, 0x04);
/* clear any pending timeouts by reading interrupts */ /* clear any pending timeouts by reading interrupts */
i2c_read_sync(&bb_s3c24xx, PCF50633_I2C_ADS, PCF50633_REG_INT1); i2c_read_sync(&bb_s3c24xx, PCF50633_I2C_ADS, PCF50633_REG_INT1);