Send commitlog mailing list submissions to
        commitlog@lists.openmoko.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:

   1. r4118 - trunk/src/target/u-boot/patches ([EMAIL PROTECTED])
   2. r4119 - branches/src/target/kernel/2.6.24.x/patches
      ([EMAIL PROTECTED])
   3. r4120 - in developers/werner: . memspeed
      ([EMAIL PROTECTED])
--- Begin Message ---
Author: werner
Date: 2008-02-26 13:07:53 +0100 (Tue, 26 Feb 2008)
New Revision: 4118

Modified:
   trunk/src/target/u-boot/patches/gta02-splash.patch
   trunk/src/target/u-boot/patches/uboot-gta02.patch
Log:
Driving nDL_GSM low caused the GSM modem to inject communication requests
into the audio system, causing the characteristical clicking sound of a
GTA02 starting up, and these requests also caused lots of interrupts on
JACK_INSERT, slowing down the CPU.

This patch sets nDL_GSM high by default, and lowers it only when we turn
the modem on or off. (Under Linux, there nDL can be controlled separately
with /sys/devices/platform/neo1973-pm-gsm.0/download)

uboot-gta02.patch:
- board/neo1973/gta02/gta02.c (neo1973_gsm): make "neo1973 gsm on" also turn 
  off the nDL_GSM line (thus enabling downloads), and "neo1973 gsm off" turn
  it on again (thus avoiding all the nasty side-effects)
- board/neo1973/gta02/gta02.c (board_init): turn GPJ6/nDL_GSM on by default
  (thus enabling downloads and getting rid of all the weird effects caused by
  this)

gta02-splash.patch: refreshed for above changes



Modified: trunk/src/target/u-boot/patches/gta02-splash.patch
===================================================================
--- trunk/src/target/u-boot/patches/gta02-splash.patch  2008-02-26 10:13:31 UTC 
(rev 4117)
+++ trunk/src/target/u-boot/patches/gta02-splash.patch  2008-02-26 12:07:53 UTC 
(rev 4118)
@@ -43,7 +43,7 @@
 ===================================================================
 --- u-boot.orig/board/neo1973/common/jbt6k74.c
 +++ u-boot/board/neo1973/common/jbt6k74.c
-@@ -95,6 +95,8 @@
+@@ -95,6 +95,8 @@ static const char *jbt_state_names[] = {
        [JBT_STATE_NORMAL]              = "normal",
  };
  
@@ -52,7 +52,7 @@
  #define GTA01_SCLK    (1 << 7)        /* GPG7 */
  #define GTA01_MOSI    (1 << 6)        /* GPG6 */
  #define GTA01_MISO    (1 << 5)        /* GPG5 */
-@@ -111,6 +113,20 @@
+@@ -111,6 +113,20 @@ static const char *jbt_state_names[] = {
  #define SPI_SCL(bit)    if (bit) gpio->GPGDAT |=  GTA01_SCLK; \
                        else    gpio->GPGDAT &= ~GTA01_SCLK
  
@@ -73,7 +73,7 @@
  /* 150uS minimum clock cycle, we have two of this plus our other
   * instructions */
  #define SPI_DELAY     udelay(100)     /* 200uS */
-@@ -298,6 +314,8 @@
+@@ -298,6 +314,8 @@ static int sleep_to_normal(struct jbt_in
        /* Sleep mode off */
        rc |= jbt_reg_write_nodata(jbt, JBT_REG_SLEEP_OUT);
  
@@ -82,7 +82,7 @@
        /* initialize register set */
        rc |= jbt_init_regs(jbt);
        return rc;
-@@ -392,13 +410,16 @@
+@@ -392,13 +410,16 @@ int jbt6k74_init(void)
  {
        S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO();
  
@@ -104,10 +104,10 @@
 ===================================================================
 --- u-boot.orig/board/neo1973/gta02/gta02.c
 +++ u-boot/board/neo1973/gta02/gta02.c
-@@ -188,6 +188,14 @@
-       gpio->GPJCON = 0x1551544;
-       gpio->GPJUP = 0x1ffff;
-       gpio->GPJDAT |= (1 << 4);       /* Set GPJ4 to high (nGSM_EN) */
+@@ -190,6 +190,14 @@ int board_init(void)
+       gpio->GPJDAT |= (1 << 4) | (1 << 6);
+                                       /* Set GPJ4 to high (nGSM_EN) */
+                                       /* Set GPJ6 to high (nDL_GSM) */
 +      gpio->GPJDAT &= ~(1 << 5);      /* Set GPJ5 to low 3D RST */
 +      gpio->GPJDAT &= ~(1 << 5);      /* Set GPJ5 to low 3D RST */
 +
@@ -119,7 +119,7 @@
  #else
  #error Please define GTA02 version
  #endif
-@@ -221,7 +229,7 @@
+@@ -223,7 +231,7 @@ int board_late_init(void)
  
        /* issue a short pulse with the vibrator */
        neo1973_vibrator(1);
@@ -128,7 +128,7 @@
        neo1973_vibrator(0);
  
  #if defined(CONFIG_ARCH_GTA02_v1)
-@@ -231,10 +239,6 @@
+@@ -233,10 +241,6 @@ int board_late_init(void)
        udelay(50*1000);
        pcf50633_reg_write(PCF50633_REG_DOWN2ENA, 0x2);
        gpio->GPJDAT |= 0x000000001;    /* GTA02v1_GPIO_3D_RESET */
@@ -139,7 +139,7 @@
  #endif
  
  #if 0
-@@ -292,9 +296,6 @@
+@@ -294,9 +298,6 @@ continue_boot:
        jbt6k74_display_onoff(1);
  #endif
  
@@ -153,7 +153,7 @@
 ===================================================================
 --- u-boot.orig/common/devices.c
 +++ u-boot/common/devices.c
-@@ -204,7 +204,6 @@
+@@ -204,7 +204,6 @@ int devices_init (void)
  #ifdef CONFIG_NETCONSOLE
        drv_nc_init ();
  #endif
@@ -175,7 +175,7 @@
  
  #define ARRAY_SIZE(x)           (sizeof(x) / sizeof((x)[0]))
  
-@@ -34,134 +37,184 @@
+@@ -34,134 +37,184 @@ GraphicDevice smi;
  
  #define GLAMO_REG(x)  (*(volatile unsigned short *)(CONFIG_GLAMO_BASE + x))
  
@@ -461,7 +461,7 @@
        pGD->winSizeX = pGD->plnSizeX = 480;
        pGD->winSizeY = pGD->plnSizeY = 640;
        pGD->gdfBytesPP = 2;
-@@ -170,16 +223,21 @@
+@@ -170,16 +223,21 @@ void *video_hw_init(void)
        pGD->frameAdrs = CONFIG_GLAMO_BASE + 0x00800000;
        pGD->memSize = 0x200000; /* 480x640x16bit = 614400 bytes */
  
@@ -493,7 +493,7 @@
 ===================================================================
 --- u-boot.orig/drivers/video/smedia3362.h
 +++ u-boot/drivers/video/smedia3362.h
-@@ -101,6 +101,42 @@
+@@ -101,6 +101,42 @@ enum glamo_register_generic {
        GLAMO_REG_PLL_GEN7      = 0x01f0,
  };
  
@@ -536,7 +536,7 @@
  #define GLAMO_REG_HOSTBUS(x)  (GLAMO_REGOFS_HOSTBUS-2+(x*2))
  
  #define REG_MEM(x)            (GLAMO_REGOFS_MEMORY+(x))
-@@ -330,6 +366,7 @@
+@@ -330,6 +366,7 @@ enum glamo_reg_lcd {
        GLAMO_REG_LCD_SRAM_DRIVING3     = REG_LCD(0x164),
  };
  
@@ -544,7 +544,7 @@
  enum glamo_reg_lcd_mode1 {
        GLAMO_LCD_MODE1_PWRSAVE         = 0x0001,
        GLAMO_LCD_MODE1_PARTIAL_PRT     = 0x0002,
-@@ -382,4 +419,41 @@
+@@ -382,4 +419,41 @@ enum glamo_reg_lcd_mode3 {
        GLAMO_LCD_MODE3_18BITS          = 0x0040,
  };
  
@@ -590,7 +590,7 @@
 ===================================================================
 --- u-boot.orig/include/configs/neo1973_gta02.h
 +++ u-boot/include/configs/neo1973_gta02.h
-@@ -250,12 +250,12 @@
+@@ -251,12 +251,12 @@
  /* we have a board_late_init() function */
  #define BOARD_LATE_INIT                       1
  

Modified: trunk/src/target/u-boot/patches/uboot-gta02.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-gta02.patch   2008-02-26 10:13:31 UTC 
(rev 4117)
+++ trunk/src/target/u-boot/patches/uboot-gta02.patch   2008-02-26 12:07:53 UTC 
(rev 4118)
@@ -4,7 +4,7 @@
 ===================================================================
 --- u-boot.orig/Makefile
 +++ u-boot/Makefile
-@@ -2428,6 +2428,14 @@ omap730p2_cs3boot_config :      unconfig
+@@ -2432,6 +2432,14 @@ omap730p2_cs3boot_config :      unconfig
  sbc2410x_config: unconfig
        @$(MKCONFIG) $(@:_config=) arm arm920t sbc2410x NULL s3c24x0
  
@@ -94,7 +94,7 @@
 ===================================================================
 --- /dev/null
 +++ u-boot/board/neo1973/gta02/gta02.c
-@@ -0,0 +1,448 @@
+@@ -0,0 +1,452 @@
 +/*
 + * (C) 2006-2007 by OpenMoko, Inc.
 + * Author: Harald Welte <[EMAIL PROTECTED]>
@@ -284,7 +284,9 @@
 +
 +      gpio->GPJCON = 0x1551544;
 +      gpio->GPJUP = 0x1ffff;
-+      gpio->GPJDAT |= (1 << 4);       /* Set GPJ4 to high (nGSM_EN) */
++      gpio->GPJDAT |= (1 << 4) | (1 << 6);
++                                      /* Set GPJ4 to high (nGSM_EN) */
++                                      /* Set GPJ6 to high (nDL_GSM) */
 +#else
 +#error Please define GTA02 version
 +#endif
@@ -472,11 +474,13 @@
 +#endif
 +              gpio->GPBDAT &= ~(1 << 5);      /* GTA02_GPIO_MODEM_RST */
 +              gpio->GPBDAT |= (1 << 7);       /* GTA02_GPIO_MODEM_ON */
++              gpio->GPJDAT &= ~(1 << 6);      /* GTA02_GPIO_nDL_GSM */
 +      } else {
 +              gpio->GPBDAT &= ~(1 << 7);      /* GTA02_GPIO_MODEM_ON */
 +#if !defined(CONFIG_ARCH_GTA02_v1)
 +              pcf50633_reg_write(PCF50633_REG_GPIO2CFG, 0x00);
 +#endif
++              gpio->GPJDAT |= (1 << 6);       /* GTA02_GPIO_nDL_GSM */
 +      }
 +}
 +




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-02-27 05:18:28 +0100 (Wed, 27 Feb 2008)
New Revision: 4119

Modified:
   branches/src/target/kernel/2.6.24.x/patches/gta01-inputdevice.patch
Log:
Oops, didn't mean to break GTA01Bv3.

gta01-inputdevice.patch: 
- drivers/input/keyboard/neo1973kbd.c (neo1973kbd_probe): reverted change in 
  r4114 and made AUX a wakeup source for GTA01 again
- drivers/input/keyboard/neo1973kbd.c (neo1973kbd_probe): added a comment 
  explaining why



Modified: branches/src/target/kernel/2.6.24.x/patches/gta01-inputdevice.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/gta01-inputdevice.patch 
2008-02-26 12:07:53 UTC (rev 4118)
+++ branches/src/target/kernel/2.6.24.x/patches/gta01-inputdevice.patch 
2008-02-27 04:18:28 UTC (rev 4119)
@@ -39,7 +39,7 @@
 ===================================================================
 --- /dev/null
 +++ linux-2.6.24/drivers/input/keyboard/neo1973kbd.c
-@@ -0,0 +1,235 @@
+@@ -0,0 +1,243 @@
 +/*
 + * Keyboard driver for FIC Neo1973 GSM phone
 + *
@@ -66,6 +66,7 @@
 +
 +#include <asm/hardware.h>
 +#include <asm/arch/gta01.h>
++#include <asm/mach-types.h>
 +
 +struct neo1973kbd {
 +      struct input_dev *input;
@@ -201,6 +202,13 @@
 +              goto out_aux;
 +      }
 +
++      /*
++       * GTA01 revisions before Bv4 can't be resumed by the PMU, so we use
++       * resume by AUX.
++       */
++      if (machine_is_neo1973_gta01())
++              enable_irq_wake(irq_aux);
++
 +      if (request_irq(irq_hold, neo1973kbd_hold_irq, IRQF_DISABLED |
 +                      IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
 +                      "Neo1973 HOLD button", neo1973kbd)) {




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-02-27 08:36:29 +0100 (Wed, 27 Feb 2008)
New Revision: 4120

Added:
   developers/werner/memspeed/
   developers/werner/memspeed/Makefile
   developers/werner/memspeed/memspeed.c
Log:
Quick and dirty physical memory speed tester.



Added: developers/werner/memspeed/Makefile
===================================================================
--- developers/werner/memspeed/Makefile 2008-02-27 04:18:28 UTC (rev 4119)
+++ developers/werner/memspeed/Makefile 2008-02-27 07:36:29 UTC (rev 4120)
@@ -0,0 +1,5 @@
+CC=arm-angstrom-linux-gnueabi-gcc
+
+CFLAGS=-Wall -g
+
+all:           memspeed

Added: developers/werner/memspeed/memspeed.c
===================================================================
--- developers/werner/memspeed/memspeed.c       2008-02-27 04:18:28 UTC (rev 
4119)
+++ developers/werner/memspeed/memspeed.c       2008-02-27 07:36:29 UTC (rev 
4120)
@@ -0,0 +1,82 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/time.h>
+#include <sys/mman.h>
+
+
+#define LOOPS 10
+
+
+static void usage(const char *name)
+{
+       fprintf(stderr, "usage: %s from to\n", name);
+       exit(1);
+}
+
+
+static double delta(struct timeval t0, struct timeval t1)
+{
+       return (double) t1.tv_sec+t1.tv_usec/1000000.0-
+           (double) t0.tv_sec-t0.tv_usec/1000000.0;
+}
+
+
+int main(int argc, char **argv)
+{
+       size_t from, to;
+       char *end;
+       int fd, i;
+       void *mem, *buf;
+       double t, sum;
+       struct timeval t0, t1;
+
+       if (argc != 3)
+               usage(*argv);
+       from = strtol(argv[1], &end, 0);
+       if (*end)
+               usage(*argv);
+       to = strtol(argv[2], &end, 0);
+       if (*end)
+               usage(*argv);
+       if (from >= to)
+               usage(*argv);
+
+       fd = open("/dev/mem", O_RDWR);
+       if (fd < 0) {
+               perror("/dev/mem");
+               exit(1);
+       }
+       mem = mmap(NULL, to-from, PROT_READ | PROT_WRITE, MAP_SHARED, fd, from);
+       if (mem == MAP_FAILED) {
+               perror("mmap");
+               exit(1);
+       }
+
+       buf = malloc(to-from);
+       if (!buf) {
+               perror("malloc");
+               exit(1);
+       }
+
+       sum = (float) (to-from)*LOOPS/1024.0/1024.0;
+
+       gettimeofday(&t0, NULL);
+       for (i = 0; i != LOOPS; i++)
+               memcpy(buf, mem, to-from);
+       gettimeofday(&t1, NULL);
+       t = delta(t0,t1);
+       printf("Read:  %fs, %f MB/s\n", t, sum/t);
+
+       memset(buf, 0x0f, to-from);
+
+       gettimeofday(&t0, NULL);
+       for (i = 0; i != LOOPS; i++)
+               memcpy(mem, buf, to-from);
+       gettimeofday(&t1, NULL);
+       t = delta(t0,t1);
+       printf("Write: %fs, %f MB/s\n", t, sum/t);
+
+       return 0;
+}




--- End Message ---
_______________________________________________
commitlog mailing list
commitlog@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to