[PATCH 4/10] deadbat-defer-glamo.patch

Werner Almesberger werner at openmoko.org
Tue Jul 15 13:00:09 CEST 2008


This patch defers initialization of the Glamo core, and in particular
enabling the clocks, until we're sure to have good power. This reduces
the power budget we need in early boot by about 15mA.

This patch also cleans up the remains of related code that has already
been moved to a later boot phase.

Signed-off-by: Werner Almesberger <werner at openmoko.org>

Index: u-boot/board/neo1973/gta02/gta02.c
===================================================================
--- u-boot.orig/board/neo1973/gta02/gta02.c	2008-07-14 16:35:59.000000000 -0300
+++ u-boot/board/neo1973/gta02/gta02.c	2008-07-14 16:39:16.000000000 -0300
@@ -67,6 +67,7 @@
 #endif
 
 extern void smedia3362_lcm_reset(int);
+extern void glamo_core_init(void);
 
 unsigned int neo1973_wakeup_cause;
 extern unsigned char booted_from_nand;
@@ -453,6 +454,7 @@
 
 continue_boot:
 	enter_bootmenu = menu_vote > 0 || booted_from_nor;
+	glamo_core_init();
 	smedia3362_lcm_reset(1);
 	if (!enter_bootmenu && getenv("splashimage"))
 		run_command(getenv("splashimage"), 0);
Index: u-boot/drivers/video/smedia3362.c
===================================================================
--- u-boot.orig/drivers/video/smedia3362.c	2008-07-14 16:35:31.000000000 -0300
+++ u-boot/drivers/video/smedia3362.c	2008-07-14 16:37:32.000000000 -0300
@@ -163,7 +163,7 @@
 	glamo_reg_write(GLAMO_REGOFS_LCD + GLAMO_REG_LCD_COMMAND1, val);
 }
 
-static void glamo_core_init(void)
+void glamo_core_init(void)
 {
 	int bp;
 
@@ -213,8 +213,6 @@
 		glamo_reg_read(GLAMO_REG_DEVICE_ID),
 		glamo_reg_read(GLAMO_REG_REVISION_ID));
 
-	glamo_core_init();
-
 	pGD->winSizeX = pGD->plnSizeX = 480;
 	pGD->winSizeY = pGD->plnSizeY = 640;
 	pGD->gdfBytesPP = 2;
@@ -223,17 +221,6 @@
 	pGD->frameAdrs = CONFIG_GLAMO_BASE + 0x00800000;
 	pGD->memSize = 0x200000; /* 480x640x16bit = 614400 bytes */
 
-#ifdef CONFIG_GTA02_REVISION_do_this_in_board_late_init
-	/* bring up the LCM */
-	smedia3362_lcm_reset(1);
-	if (getenv("splashimage"))
-		run_command(getenv("splashimage"), 0);
-	jbt6k74_enter_state(JBT_STATE_NORMAL);
-	jbt6k74_display_onoff(1);
-	/* switch on the backlight */
-	neo1973_backlight(1);
-#endif
-
 	return &smi;
 }
 




More information about the openmoko-kernel mailing list