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

laforge at sita.openmoko.org laforge at sita.openmoko.org
Sat Sep 1 19:24:39 CEST 2007


Author: laforge
Date: 2007-09-01 19:24:32 +0200 (Sat, 01 Sep 2007)
New Revision: 2885

Modified:
   trunk/src/target/u-boot/patches/series
   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-license.patch
   trunk/src/target/u-boot/patches/uboot-serial_terminal.patch
Log:
* change order of patches (serial_terminal is applied earlier)
* move gta01/gta02 config.h changes into the gta01/gta02 patches
* finish implementation of terminal / gsm passthrough for GTA01


Modified: trunk/src/target/u-boot/patches/series
===================================================================
--- trunk/src/target/u-boot/patches/series	2007-09-01 15:40:12 UTC (rev 2884)
+++ trunk/src/target/u-boot/patches/series	2007-09-01 17:24:32 UTC (rev 2885)
@@ -7,6 +7,7 @@
 uboot-strtoul.patch
 uboot-cramfs_but_no_jffs2.patch
 nand-read_write_oob.patch
+uboot-serial_terminal.patch
 uboot-arm920t-gd_in_irq.patch
 uboot-arm920_s3c2410_irq_demux.patch
 uboot-s3c2410-nand.patch
@@ -76,4 +77,3 @@
 # for review, merge soon
 unbusy-i2c.patch 
 usbtty-irq-racecondition-fix.patch
-uboot-serial_terminal.patch

Modified: trunk/src/target/u-boot/patches/uboot-20061030-neo1973.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-20061030-neo1973.patch	2007-09-01 15:40:12 UTC (rev 2884)
+++ trunk/src/target/u-boot/patches/uboot-20061030-neo1973.patch	2007-09-01 17:24:32 UTC (rev 2885)
@@ -1351,7 +1351,7 @@
 ===================================================================
 --- /dev/null
 +++ u-boot/board/neo1973/gta01/gta01.c
-@@ -0,0 +1,431 @@
+@@ -0,0 +1,485 @@
 +/*
 + * (C) 2006 by OpenMoko, Inc.
 + * Author: Harald Welte <laforge at openmoko.org>
@@ -1385,6 +1385,7 @@
 + */
 +
 +#include <common.h>
++#include <devices.h>
 +#include <s3c2410.h>
 +#include <i2c.h>
 +
@@ -1717,11 +1718,64 @@
 +#endif
 +}
 +
++/* switch serial port 0 multiplexer */
++void neo1973_gta01_serial0_gsm(int on)
++{
++	S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO();
++	S3C24X0_UART * const uart = S3C24X0_GetBase_UART(0);
++	int i;
++
++	if (on) {
++		for (i = 0; i < 3; i++) {
++			if (!strcmp(stdio_devices[i]->name, "serial") ||
++			    !strcmp(stdio_devices[i]->name, "s3ser0")) {
++				puts("ERROR: serial port busy, can't enable GSM!\n");
++				return;
++			}
++		}
++		puts("switching s3ser0 from console into GSM mode\n");
++		uart->UMCON |= 0x10;		/* Hardware flow control */
++		gpio->GPFDAT &= ~(1 << 2);	/* GPF2: nGSM_EN */
++	} else {
++		gpio->GPFDAT |= (1 << 2);	/* GPF2: nGSM_EN */
++		uart->UMCON &= ~0x10;		/* No Hardware flow control */
++		puts("switched s3ser0 from GSM mode back into console mode\n");
++	}
++}
++
++/* switch gsm power on/off */
 +void neo1973_gsm(int on)
 +{
-+	printf("not implemented yet!\n");
++	S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO();
++	device_t *dev = search_device(DEV_FLAGS_INPUT, "s3ser0");
++	if (!dev) {
++		puts("can't find s3ser0 device ?!?\n");
++		return;
++	}
++
++	if (on) {
++		gpio->GPBDAT &= ~(1 << 6);	/* GPB6: MODEM_RST */
++		gpio->GPBDAT |= (1 << 7);	/* GPB7: MODEM_ON */
++	} else {
++		/* unfortunately switching the modem off is not that easy.
++		 * Ti's firmware is insisting on not switching off... */
++		gpio->GPBDAT &= ~(1 << 7);	/* GPB7: MODEM_ON */
++		//gpio->GPBDAT |= (1 << 6);	/* GPB6: MODEM_RST */
++		if (!(gpio->GPFDAT & (1 << 2)))
++			puts("Can't power modem off while serial console "
++			     "in use!\n");
++		else {
++			S3C24X0_UART * const uart = S3C24X0_GetBase_UART(0);
++			uart->UMCON |= 0x10;		/* Hardware flow control */
++			gpio->GPFDAT &= ~(1 << 2);	/* GPF2: nGSM_EN */
++			dev->puts("AT at POFF\r\n");
++			gpio->GPFDAT |= (1 << 2);	/* GPF2: nGSM_EN */
++			uart->UMCON &= ~0x10;		/* No Hardware flow control */
++		}
++	}
 +}
 +
++/* switch gps power on/off */
 +void neo1973_gps(int on)
 +{
 +	printf("not implemented yet!\n");
@@ -2017,7 +2071,7 @@
 ===================================================================
 --- /dev/null
 +++ u-boot/include/configs/neo1973_gta01.h
-@@ -0,0 +1,254 @@
+@@ -0,0 +1,255 @@
 +/*
 + * (C) Copyright 2006 OpenMoko, Inc.
 + * Author: Harald Welte <laforge at openmoko.org>
@@ -2124,6 +2178,7 @@
 +#define CONFIG_CMD_MMC
 +#define CONFIG_CMD_FAT
 +#define CONFIG_CMD_EXT2
++#define CONFIG_CMD_TERMINAL
 +
 +#define CONFIG_BOOTDELAY	3
 +#define CONFIG_BOOTARGS    	"rootfstype=jffs2 root=/dev/mtdblock4 console=ttySAC0,115200 console=tty0 loglevel=8"
@@ -2311,3 +2366,39 @@
 +int neo1973_set_charge_mode(enum neo1973_charger_cmd cmd);
 +
 +#endif
+Index: u-boot/common/cmd_terminal.c
+===================================================================
+--- u-boot.orig/common/cmd_terminal.c
++++ u-boot/common/cmd_terminal.c
+@@ -50,7 +50,15 @@
+ 	if (!dev)
+ 		return -1;
+ 
+-	serial_reinit_all();
++#if defined(CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) || \
++    defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) || \
++    defined(CONFIG_ARCH_GTA01B_v4)
++	if (!strcmp(dev->name, "serial") ||
++	    !strcmp(dev->name, "s3ser0"))
++		neo1973_gta01_serial0_gsm(1);
++#endif
++
++	//serial_reinit_all();
+ 	printf("Entering terminal mode for port %s\n", dev->name);
+ 	puts("Use '~.' to leave the terminal and get back to u-boot\n");
+ 
+@@ -87,6 +95,14 @@
+ 			putc(c);
+ 		}
+ 	}
++#if defined(CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) || \
++    defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) || \
++    defined(CONFIG_ARCH_GTA01B_v4)
++	if (!strcmp(dev->name, "serial") ||
++	    !strcmp(dev->name, "s3ser0"))
++		neo1973_gta01_serial0_gsm(0);
++#endif
++
+ 	return 0;
+ }
+ 

Modified: trunk/src/target/u-boot/patches/uboot-gta02.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-gta02.patch	2007-09-01 15:40:12 UTC (rev 2884)
+++ trunk/src/target/u-boot/patches/uboot-gta02.patch	2007-09-01 17:24:32 UTC (rev 2885)
@@ -560,7 +560,7 @@
 ===================================================================
 --- /dev/null
 +++ u-boot/include/configs/neo1973_gta02.h
-@@ -0,0 +1,277 @@
+@@ -0,0 +1,278 @@
 +/*
 + * (C) Copyright 2007 OpenMoko, Inc.
 + * Author: Harald Welte <laforge at openmoko.org>
@@ -668,6 +668,7 @@
 +#define CONFIG_CMD_FAT
 +#define CONFIG_CMD_EXT2
 +#define CONFIG_CMD_LICENSE
++#define CONFIG_CMD_TERMINAL
 +
 +#define CONFIG_BOOTDELAY	3
 +#define CONFIG_BOOTARGS    	""

Modified: trunk/src/target/u-boot/patches/uboot-license.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-license.patch	2007-09-01 15:40:12 UTC (rev 2884)
+++ trunk/src/target/u-boot/patches/uboot-license.patch	2007-09-01 17:24:32 UTC (rev 2885)
@@ -665,14 +665,14 @@
 ===================================================================
 --- u-boot.orig/include/configs/neo1973_gta01.h
 +++ u-boot/include/configs/neo1973_gta01.h
-@@ -101,6 +101,7 @@
+@@ -102,6 +102,7 @@
  #define CONFIG_CMD_MMC
  #define CONFIG_CMD_FAT
  #define CONFIG_CMD_EXT2
 +#define CONFIG_CMD_LICENSE
+ #define CONFIG_CMD_TERMINAL
  
  #define CONFIG_BOOTDELAY	3
- #define CONFIG_BOOTARGS    	""
 Index: u-boot/include/configs/hxd8.h
 ===================================================================
 --- u-boot.orig/include/configs/hxd8.h

Modified: trunk/src/target/u-boot/patches/uboot-serial_terminal.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-serial_terminal.patch	2007-09-01 15:40:12 UTC (rev 2884)
+++ trunk/src/target/u-boot/patches/uboot-serial_terminal.patch	2007-09-01 17:24:32 UTC (rev 2885)
@@ -1,18 +1,6 @@
 This patch adds a 'cu' like serial terminal command to u-boot
 using which you can access other serial ports from the system console.
 
-Index: u-boot/include/configs/neo1973_gta02.h
-===================================================================
---- u-boot.orig/include/configs/neo1973_gta02.h
-+++ u-boot/include/configs/neo1973_gta02.h
-@@ -105,6 +105,7 @@
- #define CONFIG_CMD_FAT
- #define CONFIG_CMD_EXT2
- #define CONFIG_CMD_LICENSE
-+#define CONFIG_CMD_TERMINAL
- 
- #define CONFIG_BOOTDELAY	3
- #define CONFIG_BOOTARGS    	""
 Index: u-boot/common/Makefile
 ===================================================================
 --- u-boot.orig/common/Makefile
@@ -133,15 +121,3 @@
 +);
 +
 +#endif /* CONFIG_CMD_TERMINAL */
-Index: u-boot/include/configs/neo1973_gta01.h
-===================================================================
---- u-boot.orig/include/configs/neo1973_gta01.h
-+++ u-boot/include/configs/neo1973_gta01.h
-@@ -103,6 +103,7 @@
- #define CONFIG_CMD_FAT
- #define CONFIG_CMD_EXT2
- #define CONFIG_CMD_LICENSE
-+#define CONFIG_CMD_TERMINAL
- 
- #define CONFIG_BOOTDELAY	3
- #define CONFIG_BOOTARGS    	""





More information about the commitlog mailing list