Changeset 2885


Ignore:
Timestamp:
09/01/07 19:24:32 (6 years ago)
Author:
laforge
Message:
  • 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
Location:
trunk/src/target/u-boot/patches
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/target/u-boot/patches/series

    r2884 r2885  
    88uboot-cramfs_but_no_jffs2.patch 
    99nand-read_write_oob.patch 
     10uboot-serial_terminal.patch 
    1011uboot-arm920t-gd_in_irq.patch 
    1112uboot-arm920_s3c2410_irq_demux.patch 
     
    7778unbusy-i2c.patch  
    7879usbtty-irq-racecondition-fix.patch 
    79 uboot-serial_terminal.patch 
  • trunk/src/target/u-boot/patches/uboot-20061030-neo1973.patch

    r2884 r2885  
    13521352--- /dev/null 
    13531353+++ u-boot/board/neo1973/gta01/gta01.c 
    1354 @@ -0,0 +1,431 @@ 
     1354@@ -0,0 +1,485 @@ 
    13551355+/* 
    13561356+ * (C) 2006 by OpenMoko, Inc. 
     
    13861386+ 
    13871387+#include <common.h> 
     1388+#include <devices.h> 
    13881389+#include <s3c2410.h> 
    13891390+#include <i2c.h> 
     
    17181719+} 
    17191720+ 
     1721+/* switch serial port 0 multiplexer */ 
     1722+void neo1973_gta01_serial0_gsm(int on) 
     1723+{ 
     1724+       S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); 
     1725+       S3C24X0_UART * const uart = S3C24X0_GetBase_UART(0); 
     1726+       int i; 
     1727+ 
     1728+       if (on) { 
     1729+               for (i = 0; i < 3; i++) { 
     1730+                       if (!strcmp(stdio_devices[i]->name, "serial") || 
     1731+                           !strcmp(stdio_devices[i]->name, "s3ser0")) { 
     1732+                               puts("ERROR: serial port busy, can't enable GSM!\n"); 
     1733+                               return; 
     1734+                       } 
     1735+               } 
     1736+               puts("switching s3ser0 from console into GSM mode\n"); 
     1737+               uart->UMCON |= 0x10;            /* Hardware flow control */ 
     1738+               gpio->GPFDAT &= ~(1 << 2);      /* GPF2: nGSM_EN */ 
     1739+       } else { 
     1740+               gpio->GPFDAT |= (1 << 2);       /* GPF2: nGSM_EN */ 
     1741+               uart->UMCON &= ~0x10;           /* No Hardware flow control */ 
     1742+               puts("switched s3ser0 from GSM mode back into console mode\n"); 
     1743+       } 
     1744+} 
     1745+ 
     1746+/* switch gsm power on/off */ 
    17201747+void neo1973_gsm(int on) 
    17211748+{ 
    1722 +       printf("not implemented yet!\n"); 
    1723 +} 
    1724 + 
     1749+       S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); 
     1750+       device_t *dev = search_device(DEV_FLAGS_INPUT, "s3ser0"); 
     1751+       if (!dev) { 
     1752+               puts("can't find s3ser0 device ?!?\n"); 
     1753+               return; 
     1754+       } 
     1755+ 
     1756+       if (on) { 
     1757+               gpio->GPBDAT &= ~(1 << 6);      /* GPB6: MODEM_RST */ 
     1758+               gpio->GPBDAT |= (1 << 7);       /* GPB7: MODEM_ON */ 
     1759+       } else { 
     1760+               /* unfortunately switching the modem off is not that easy. 
     1761+                * Ti's firmware is insisting on not switching off... */ 
     1762+               gpio->GPBDAT &= ~(1 << 7);      /* GPB7: MODEM_ON */ 
     1763+               //gpio->GPBDAT |= (1 << 6);     /* GPB6: MODEM_RST */ 
     1764+               if (!(gpio->GPFDAT & (1 << 2))) 
     1765+                       puts("Can't power modem off while serial console " 
     1766+                            "in use!\n"); 
     1767+               else { 
     1768+                       S3C24X0_UART * const uart = S3C24X0_GetBase_UART(0); 
     1769+                       uart->UMCON |= 0x10;            /* Hardware flow control */ 
     1770+                       gpio->GPFDAT &= ~(1 << 2);      /* GPF2: nGSM_EN */ 
     1771+                       dev->puts("AT@POFF\r\n"); 
     1772+                       gpio->GPFDAT |= (1 << 2);       /* GPF2: nGSM_EN */ 
     1773+                       uart->UMCON &= ~0x10;           /* No Hardware flow control */ 
     1774+               } 
     1775+       } 
     1776+} 
     1777+ 
     1778+/* switch gps power on/off */ 
    17251779+void neo1973_gps(int on) 
    17261780+{ 
     
    20182072--- /dev/null 
    20192073+++ u-boot/include/configs/neo1973_gta01.h 
    2020 @@ -0,0 +1,254 @@ 
     2074@@ -0,0 +1,255 @@ 
    20212075+/* 
    20222076+ * (C) Copyright 2006 OpenMoko, Inc. 
     
    21252179+#define CONFIG_CMD_FAT 
    21262180+#define CONFIG_CMD_EXT2 
     2181+#define CONFIG_CMD_TERMINAL 
    21272182+ 
    21282183+#define CONFIG_BOOTDELAY       3 
     
    23122367+ 
    23132368+#endif 
     2369Index: u-boot/common/cmd_terminal.c 
     2370=================================================================== 
     2371--- u-boot.orig/common/cmd_terminal.c 
     2372+++ u-boot/common/cmd_terminal.c 
     2373@@ -50,7 +50,15 @@ 
     2374        if (!dev) 
     2375                return -1; 
     2376  
     2377-       serial_reinit_all(); 
     2378+#if defined(CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) || \ 
     2379+    defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) || \ 
     2380+    defined(CONFIG_ARCH_GTA01B_v4) 
     2381+       if (!strcmp(dev->name, "serial") || 
     2382+           !strcmp(dev->name, "s3ser0")) 
     2383+               neo1973_gta01_serial0_gsm(1); 
     2384+#endif 
     2385+ 
     2386+       //serial_reinit_all(); 
     2387        printf("Entering terminal mode for port %s\n", dev->name); 
     2388        puts("Use '~.' to leave the terminal and get back to u-boot\n"); 
     2389  
     2390@@ -87,6 +95,14 @@ 
     2391                        putc(c); 
     2392                } 
     2393        } 
     2394+#if defined(CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4) || \ 
     2395+    defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) || \ 
     2396+    defined(CONFIG_ARCH_GTA01B_v4) 
     2397+       if (!strcmp(dev->name, "serial") || 
     2398+           !strcmp(dev->name, "s3ser0")) 
     2399+               neo1973_gta01_serial0_gsm(0); 
     2400+#endif 
     2401+ 
     2402        return 0; 
     2403 } 
     2404  
  • trunk/src/target/u-boot/patches/uboot-gta02.patch

    r2884 r2885  
    561561--- /dev/null 
    562562+++ u-boot/include/configs/neo1973_gta02.h 
    563 @@ -0,0 +1,277 @@ 
     563@@ -0,0 +1,278 @@ 
    564564+/* 
    565565+ * (C) Copyright 2007 OpenMoko, Inc. 
     
    669669+#define CONFIG_CMD_EXT2 
    670670+#define CONFIG_CMD_LICENSE 
     671+#define CONFIG_CMD_TERMINAL 
    671672+ 
    672673+#define CONFIG_BOOTDELAY       3 
  • trunk/src/target/u-boot/patches/uboot-license.patch

    r2763 r2885  
    666666--- u-boot.orig/include/configs/neo1973_gta01.h 
    667667+++ u-boot/include/configs/neo1973_gta01.h 
    668 @@ -101,6 +101,7 @@ 
     668@@ -102,6 +102,7 @@ 
    669669 #define CONFIG_CMD_MMC 
    670670 #define CONFIG_CMD_FAT 
    671671 #define CONFIG_CMD_EXT2 
    672672+#define CONFIG_CMD_LICENSE 
     673 #define CONFIG_CMD_TERMINAL 
    673674  
    674675 #define CONFIG_BOOTDELAY       3 
    675  #define CONFIG_BOOTARGS        "" 
    676676Index: u-boot/include/configs/hxd8.h 
    677677=================================================================== 
  • trunk/src/target/u-boot/patches/uboot-serial_terminal.patch

    r2884 r2885  
    22using which you can access other serial ports from the system console. 
    33 
    4 Index: u-boot/include/configs/neo1973_gta02.h 
    5 =================================================================== 
    6 --- u-boot.orig/include/configs/neo1973_gta02.h 
    7 +++ u-boot/include/configs/neo1973_gta02.h 
    8 @@ -105,6 +105,7 @@ 
    9  #define CONFIG_CMD_FAT 
    10  #define CONFIG_CMD_EXT2 
    11  #define CONFIG_CMD_LICENSE 
    12 +#define CONFIG_CMD_TERMINAL 
    13   
    14  #define CONFIG_BOOTDELAY       3 
    15  #define CONFIG_BOOTARGS        "" 
    164Index: u-boot/common/Makefile 
    175=================================================================== 
     
    134122+ 
    135123+#endif /* CONFIG_CMD_TERMINAL */ 
    136 Index: u-boot/include/configs/neo1973_gta01.h 
    137 =================================================================== 
    138 --- u-boot.orig/include/configs/neo1973_gta01.h 
    139 +++ u-boot/include/configs/neo1973_gta01.h 
    140 @@ -103,6 +103,7 @@ 
    141  #define CONFIG_CMD_FAT 
    142  #define CONFIG_CMD_EXT2 
    143  #define CONFIG_CMD_LICENSE 
    144 +#define CONFIG_CMD_TERMINAL 
    145   
    146  #define CONFIG_BOOTDELAY       3 
    147  #define CONFIG_BOOTARGS        "" 
Note: See TracChangeset for help on using the changeset viewer.