[PATCH 6/6] qi-add-totrst-clear-before-linux.patch

Andy Green andy at openmoko.com
Wed Oct 15 14:45:43 CEST 2008


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 at openmoko.com>
---

 src/gta02/gta02.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/gta02/gta02.c b/src/gta02/gta02.c
index df4fe48..f6710b4 100644
--- a/src/gta02/gta02.c
+++ b/src/gta02/gta02.c
@@ -348,6 +348,10 @@ static void putc_gta02(char c)
 
 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 */
 
 	i2c_read_sync(&bb_s3c24xx, PCF50633_I2C_ADS, PCF50633_REG_INT1);




More information about the openmoko-kernel mailing list