r2838 - trunk/src/target/u-boot/patches

laforge at sita.openmoko.org laforge at sita.openmoko.org
Tue Aug 28 10:47:41 CEST 2007


Author: laforge
Date: 2007-08-28 10:47:37 +0200 (Tue, 28 Aug 2007)
New Revision: 2838

Modified:
   trunk/src/target/u-boot/patches/uboot-20061030-neo1973.patch
   trunk/src/target/u-boot/patches/uboot-gta02.patch
   trunk/src/target/u-boot/patches/uboot-s3c2410_udc.patch
Log:
* implement gps and gsm power switching for GTA02
* move udc_disconnect() call into usb driver, not gta01 core patch (which is applied before usb driver)


Modified: trunk/src/target/u-boot/patches/uboot-20061030-neo1973.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-20061030-neo1973.patch	2007-08-28 08:46:55 UTC (rev 2837)
+++ trunk/src/target/u-boot/patches/uboot-20061030-neo1973.patch	2007-08-28 08:47:37 UTC (rev 2838)
@@ -504,7 +504,7 @@
 ===================================================================
 --- /dev/null
 +++ u-boot/board/neo1973/common/cmd_neo1973.c
-@@ -0,0 +1,99 @@
+@@ -0,0 +1,115 @@
 +/*
 + * (C) Copyright 2006 by OpenMoko, Inc.
 + * Author: Harald Welte <laforge at openmoko.org>
@@ -579,6 +579,20 @@
 +			neo1973_vibrator(1);
 +		else
 +			neo1973_vibrator(0);
++	} else if (!strcmp(argv[1], "gsm")) {
++		if (argc < 3)
++			goto out_help;
++		if (!strcmp(argv[2], "on"))
++			neo1973_gsm(1);
++		else
++			neo1973_gsm(0);
++	} else if (!strcmp(argv[1], "gps")) {
++		if (argc < 3)
++			goto out_help;
++		if (!strcmp(argv[2], "on"))
++			neo1973_gps(1);
++		else
++			neo1973_gps(0);
 +	} else {
 +out_help:
 +		printf("Usage:\n%s\n", cmdtp->usage);
@@ -602,6 +616,8 @@
 +	"neo1973 charger off - disable charging\n"
 +	"neo1973 backlight (on|off) - switch backlight on or off\n"
 +	"neo1973 vibrator (on|off) - switch vibrator on or off\n"
++	"neo1973 gsm (on|off) - switch GSM Modem on or off\n"
++	"neo1973 gps (on|off) - switch GPS system on or off\n"
 +);
 +#endif	/* CONFIG_CMD_BDI */
 Index: u-boot/board/neo1973/common/jbt6k74.c
@@ -1335,7 +1351,7 @@
 ===================================================================
 --- /dev/null
 +++ u-boot/board/neo1973/gta01/gta01.c
-@@ -0,0 +1,422 @@
+@@ -0,0 +1,431 @@
 +/*
 + * (C) 2006 by OpenMoko, Inc.
 + * Author: Harald Welte <laforge at openmoko.org>
@@ -1666,7 +1682,6 @@
 +void neo1973_poweroff(void)
 +{
 +	serial_printf("poweroff\n");
-+	udc_disconnect();
 +	pcf50606_reg_write(PCF50606_REG_OOCC1, PCF50606_OOCC1_GOSTDBY);
 +	/* don't return to caller */
 +	while (1) ;
@@ -1702,6 +1717,16 @@
 +#endif
 +}
 +
++void neo1973_gsm(int on)
++{
++	printf("not implemented yet!\n");
++}
++
++void neo1973_gps(int on)
++{
++	printf("not implemented yet!\n");
++}
++
 +int neo1973_911_key_pressed(void)
 +{
 +	S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO();
@@ -2250,7 +2275,7 @@
 ===================================================================
 --- /dev/null
 +++ u-boot/board/neo1973/common/neo1973.h
-@@ -0,0 +1,32 @@
+@@ -0,0 +1,34 @@
 +#ifndef _NEO1973_H
 +#define _NEO1973_H
 +
@@ -2276,6 +2301,8 @@
 +void neo1973_poweroff(void);
 +void neo1973_backlight(int on);
 +void neo1973_vibrator(int on);
++void neo1973_gsm(int on);
++void neo1973_gps(int on);
 +
 +int neo1973_911_key_pressed(void);
 +

Modified: trunk/src/target/u-boot/patches/uboot-gta02.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-gta02.patch	2007-08-28 08:46:55 UTC (rev 2837)
+++ trunk/src/target/u-boot/patches/uboot-gta02.patch	2007-08-28 08:47:37 UTC (rev 2838)
@@ -91,7 +91,7 @@
 ===================================================================
 --- /dev/null
 +++ u-boot/board/neo1973/gta02/gta02.c
-@@ -0,0 +1,370 @@
+@@ -0,0 +1,387 @@
 +/*
 + * (C) 2006-2007 by OpenMoko, Inc.
 + * Author: Harald Welte <laforge at openmoko.org>
@@ -421,6 +421,23 @@
 +#endif
 +}
 +
++void neo1973_gsm(int on)
++{
++	/* GPIO2 of PMU */
++	if (on)
++		pcf50633_reg_write(PCF50633_REG_GPIO2CFG, 0x07);
++	else
++		pcf50633_reg_write(PCF50633_REG_GPIO2CFG, 0x00);
++}
++
++void neo1973_gps(int on)
++{
++	if (on)
++		pcf50633_reg_write(PCF50633_REG_LDO5ENA, 0x01);
++	else
++		pcf50633_reg_write(PCF50633_REG_LDO5ENA, 0x00);
++}
++
 +int neo1973_new_second(void)
 +{
 +	return pcf50633_reg_read(PCF50633_REG_INT1) & PCF50633_INT1_SECOND;

Modified: trunk/src/target/u-boot/patches/uboot-s3c2410_udc.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-s3c2410_udc.patch	2007-08-28 08:46:55 UTC (rev 2837)
+++ trunk/src/target/u-boot/patches/uboot-s3c2410_udc.patch	2007-08-28 08:47:37 UTC (rev 2838)
@@ -1166,14 +1166,14 @@
 ===================================================================
 --- u-boot.orig/board/neo1973/common/cmd_neo1973.c
 +++ u-boot/board/neo1973/common/cmd_neo1973.c
-@@ -72,6 +72,18 @@
- 			neo1973_vibrator(1);
+@@ -86,6 +86,18 @@
+ 			neo1973_gps(1);
  		else
- 			neo1973_vibrator(0);
+ 			neo1973_gps(0);
 +	} else if (!strcmp(argv[1], "udc")) {
 +		if (argc < 3)
 +			goto out_help;
-+		if (!strcmp(argv[2], "udc")) {
++		if (!strcmp(argv[2], "pullup")) {
 +			if (argc < 4)
 +				goto out_help;
 +			if (!strcmp(argv[3], "on"))
@@ -1185,11 +1185,11 @@
  	} else {
  out_help:
  		printf("Usage:\n%s\n", cmdtp->usage);
-@@ -95,5 +107,6 @@
- 	"neo1973 charger off - disable charging\n"
- 	"neo1973 backlight (on|off) - switch backlight on or off\n"
+@@ -111,5 +123,6 @@
  	"neo1973 vibrator (on|off) - switch vibrator on or off\n"
-+	"neo1973 udc pullup (on|off) - switch pull-up on or off\n"
+ 	"neo1973 gsm (on|off) - switch GSM Modem on or off\n"
+ 	"neo1973 gps (on|off) - switch GPS system on or off\n"
++	"neo1973 udc pullup (on|off) - switch USB device controller pull-up on or off\n"
  );
  #endif	/* CONFIG_CMD_BDI */
 Index: u-boot/board/neo1973/gta01/Makefile
@@ -1248,3 +1248,15 @@
 +void udc_ctrl(enum usbd_event event, int param);
 +#endif
  #endif
+Index: u-boot/board/neo1973/gta01/gta01.c
+===================================================================
+--- u-boot.orig/board/neo1973/gta01/gta01.c
++++ u-boot/board/neo1973/gta01/gta01.c
+@@ -333,6 +333,7 @@
+ void neo1973_poweroff(void)
+ {
+ 	serial_printf("poweroff\n");
++	udc_disconnect();
+ 	pcf50606_reg_write(PCF50606_REG_OOCC1, PCF50606_OOCC1_GOSTDBY);
+ 	/* don't return to caller */
+ 	while (1) ;





More information about the commitlog mailing list