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. r4072 - in developers/werner: . bin ([EMAIL PROTECTED])
   2. r4073 - branches/src/target/kernel/2.6.24.x/patches
      ([EMAIL PROTECTED])
   3. r4074 - branches/src/target/kernel/2.6.24.x/patches
      ([EMAIL PROTECTED])
--- Begin Message ---
Author: werner
Date: 2008-02-15 20:00:48 +0100 (Fri, 15 Feb 2008)
New Revision: 4072

Added:
   developers/werner/bin/
   developers/werner/bin/README
   developers/werner/bin/bash-init
   developers/werner/bin/comm4
   developers/werner/bin/kern4
   developers/werner/bin/la4
   developers/werner/bin/lab4
   developers/werner/bin/neo
   developers/werner/bin/svnlogdir
   developers/werner/bin/uboot4
   developers/werner/bin/work4
Log:
Just a few scripts I use. I put them here so that they follow me when
traveling.



Added: developers/werner/bin/README
===================================================================
--- developers/werner/bin/README        2008-02-15 17:33:45 UTC (rev 4071)
+++ developers/werner/bin/README        2008-02-15 19:00:48 UTC (rev 4072)
@@ -0,0 +1,3 @@
+Some scripts that populate my dektop. They're probably pretty useless
+for anyone but myself. I put them here so that they follow me when
+traveling.

Added: developers/werner/bin/bash-init
===================================================================
--- developers/werner/bin/bash-init     2008-02-15 17:33:45 UTC (rev 4071)
+++ developers/werner/bin/bash-init     2008-02-15 19:00:48 UTC (rev 4072)
@@ -0,0 +1,26 @@
+#!/usr/bin/perl
+
+# You need IO:Stty, which e.g., Gentoo doesn't install by default.
+# cpan Bundle::Expect
+# does.
+
+
+use Expect;
+
+
+sub winch
+{
+    $exp->slave->clone_winsize_from(\*STDIN);
+    kill WINCH => $exp->pid if $exp->pid;
+}
+
+
+$exp = new Expect;
+$exp->slave->clone_winsize_from(\*STDIN);
+$exp->spawn("bash", "-l") || die "cannot spawn bash: $!";
+$SIG{WINCH} = \&winch;
+for (@ARGV) {
+    $exp->send("$_\r");
+}
+$exp->interact();
+print STDERR "[bash-init done]\n";


Property changes on: developers/werner/bin/bash-init
___________________________________________________________________
Name: svn:executable
   + *

Added: developers/werner/bin/comm4
===================================================================
--- developers/werner/bin/comm4 2008-02-15 17:33:45 UTC (rev 4071)
+++ developers/werner/bin/comm4 2008-02-15 19:00:48 UTC (rev 4072)
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+FONT=6x10
+
+sleep 2
+
+xterm -fn $FONT -geometry 80x40+36-14 -e bash-init \
+  'ssh oq2' \
+  '# isync' &
+xterm -fn $FONT -geometry 80x72+560-8 -e bash-init \
+  'ssh oq2' \
+  mutt &
+xterm -fn $FONT -geometry 80x24+560+9 -e bash-init \
+  'telnet host 1991' \
+  Werner &
+xterm -fn $FONT -geometry 80x40-70+-4 -e bash-init \
+  'ssh [EMAIL PROTECTED]' \
+  'screen -r' &
+xterm -fn $FONT -geometry 80x59-65-2 -e bash-init \
+  'ssh oq2' \
+  mutt &


Property changes on: developers/werner/bin/comm4
___________________________________________________________________
Name: svn:executable
   + *

Added: developers/werner/bin/kern4
===================================================================
--- developers/werner/bin/kern4 2008-02-15 17:33:45 UTC (rev 4071)
+++ developers/werner/bin/kern4 2008-02-15 19:00:48 UTC (rev 4072)
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+DIR=/home/moko/2624/linux-2.6.24
+FONT=6x10
+
+if [ "${PWD#/home/moko}" = "$PWD" ]; then
+    cd $DIR
+fi
+
+sleep 2
+
+xterm -fn $FONT -geometry 80x40+23+165 -e bash-init \
+  'cat 
/home/moko/svn.openmoko.org/branches/src/target/kernel/2.6.24.x/scripts/build' &
+xterm -fn $FONT -geometry 80x40+23-20 &
+xterm -fn $FONT -geometry 80x48+551+3 &
+xterm -fn $FONT -geometry 80x50+552-4 &
+xterm -fn $FONT -geometry 80x40-93+114 -e bash-init \
+  'cd /home/moko/svn.openmoko.org/branches/src/target/kernel/2.6.24.x/scripts' 
\
+  'vi LOG' &
+xterm -fn $FONT -geometry 80x40-86-38 -e bash-init \
+  'cd /home/moko/svn.openmoko.org/branches/src/target/kernel/2.6.24.x/patches' 
&


Property changes on: developers/werner/bin/kern4
___________________________________________________________________
Name: svn:executable
   + *

Added: developers/werner/bin/la4
===================================================================
--- developers/werner/bin/la4   2008-02-15 17:33:45 UTC (rev 4071)
+++ developers/werner/bin/la4   2008-02-15 19:00:48 UTC (rev 4072)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+SET_HOST=la exec lab4


Property changes on: developers/werner/bin/la4
___________________________________________________________________
Name: svn:executable
   + *

Added: developers/werner/bin/lab4
===================================================================
--- developers/werner/bin/lab4  2008-02-15 17:33:45 UTC (rev 4071)
+++ developers/werner/bin/lab4  2008-02-15 19:00:48 UTC (rev 4072)
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+DIR=/home/moko/fr/u-boot
+FONT=6x10
+HOST=${SET_HOST:-lab}
+
+if [ "${PWD#/home/moko}" = "$PWD" ]; then
+    cd $DIR
+fi
+
+sleep 2
+
+xterm -fn $FONT -geometry 80x40+23+165 -e bash-init \
+  "ssh $HOST" \
+  'cd /home/moko' \
+  'openocd' &
+xterm -fn $FONT -geometry 80x40+23-20 -e bash-init \
+  "ssh $HOST" \
+  'telnet localhost 4444' &
+xterm -fn $FONT -geometry 80x48+551+3 -e bash-init \
+  "ssh $HOST" \
+  'neocon -t 30 /dev/ttyACM{0,1,2}' &
+xterm -fn $FONT -geometry 80x50+552-4 -e bash-init \
+  "ssh $HOST" \
+  'neocon /dev/ttyUSB{0,1,2}' &
+xterm -fn $FONT -geometry 80x40-93+114 -e bash-init \
+  'vi -R /home/moko/gta02/ENV' &
+xterm -fn $FONT -geometry 80x40-86-38 -e bash-init \
+  "ssh $HOST" \
+  '# dfu-util -a u-boot -R -D /home/moko/fr/u-boot/u-boot.udfu' \
+  '# dfu-util -a kernel -R -D 
/home/moko/2624/linux-2.6.24/arch/arm/boot/uImage' &


Property changes on: developers/werner/bin/lab4
___________________________________________________________________
Name: svn:executable
   + *

Added: developers/werner/bin/neo
===================================================================
--- developers/werner/bin/neo   2008-02-15 17:33:45 UTC (rev 4071)
+++ developers/werner/bin/neo   2008-02-15 19:00:48 UTC (rev 4072)
@@ -0,0 +1,3 @@
+#!/bin/sh
+echo 1 >/proc/sys/net/ipv4/ip_forward
+ifconfig usb0 192.168.0.200 up && ssh 192.168.0.202


Property changes on: developers/werner/bin/neo
___________________________________________________________________
Name: svn:executable
   + *

Added: developers/werner/bin/svnlogdir
===================================================================
--- developers/werner/bin/svnlogdir     2008-02-15 17:33:45 UTC (rev 4071)
+++ developers/werner/bin/svnlogdir     2008-02-15 19:00:48 UTC (rev 4072)
@@ -0,0 +1 @@
+link /home/moko/svn.openmoko.org/developers/werner/svnlogdir
\ No newline at end of file


Property changes on: developers/werner/bin/svnlogdir
___________________________________________________________________
Name: svn:special
   + *

Added: developers/werner/bin/uboot4
===================================================================
--- developers/werner/bin/uboot4        2008-02-15 17:33:45 UTC (rev 4071)
+++ developers/werner/bin/uboot4        2008-02-15 19:00:48 UTC (rev 4072)
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+DIR=/home/moko/fr/u-boot
+FONT=6x10
+
+if [ "${PWD#/home/moko}" = "$PWD" ]; then
+    cd $DIR
+fi
+
+sleep 2
+
+xterm -fn $FONT -geometry 80x40+23+165 -e bash-init \
+  'cat /home/moko/svn.openmoko.org/trunk/src/target/u-boot/scripts/build' &
+xterm -fn $FONT -geometry 80x40+23-20 -e bash-init \
+  '# make gta01bv4_config' \
+  '# make gta02v3_config' &
+xterm -fn $FONT -geometry 80x48+551+3 &
+xterm -fn $FONT -geometry 80x50+552-4 &
+xterm -fn $FONT -geometry 80x40-93+114 -e bash-init \
+  'cd /home/moko/svn.openmoko.org/trunk/src/target/u-boot/scripts' \
+  'vi LOG' &
+xterm -fn $FONT -geometry 80x40-86-38 -e bash-init \
+  'cd /home/moko/svn.openmoko.org/trunk/src/target/u-boot/patches' &


Property changes on: developers/werner/bin/uboot4
___________________________________________________________________
Name: svn:executable
   + *

Added: developers/werner/bin/work4
===================================================================
--- developers/werner/bin/work4 2008-02-15 17:33:45 UTC (rev 4071)
+++ developers/werner/bin/work4 2008-02-15 19:00:48 UTC (rev 4072)
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+FONT=6x10
+
+sleep 2
+
+xterm -fn $FONT -geometry 80x40+23+165 &
+xterm -fn $FONT -geometry 80x40+23-20 &
+xterm -fn $FONT -geometry 80x48+551+3 &
+xterm -fn $FONT -geometry 80x50+552-4 &
+xterm -fn $FONT -geometry 80x40-93+114 &
+xterm -fn $FONT -geometry 80x40-86-38 &


Property changes on: developers/werner/bin/work4
___________________________________________________________________
Name: svn:executable
   + *




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-02-16 10:35:08 +0100 (Sat, 16 Feb 2008)
New Revision: 4073

Modified:
   branches/src/target/kernel/2.6.24.x/patches/gta01-pcf50606.patch
   branches/src/target/kernel/2.6.24.x/patches/pcf50633.patch
Log:
When reading the PMU RTC alarm status, the "enabled" flag wasn't set to
indicate whether the alarm is active.

Note that the pcf50606 change is untested.

pcf50633.patch:
- drivers/i2c/chips/pcf50633.c (pcf50633_rtc_read_alarm): set alrm->enabled
gta01-pcf50606.patch:
- drivers/i2c/chips/pcf50606.c (pcf50606_rtc_read_alarm) set alrm->enabled



Modified: branches/src/target/kernel/2.6.24.x/patches/gta01-pcf50606.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/gta01-pcf50606.patch    
2008-02-15 19:00:48 UTC (rev 4072)
+++ branches/src/target/kernel/2.6.24.x/patches/gta01-pcf50606.patch    
2008-02-16 09:35:08 UTC (rev 4073)
@@ -8,7 +8,7 @@
 ===================================================================
 --- /dev/null
 +++ linux-2.6.24/drivers/i2c/chips/pcf50606.c
-@@ -0,0 +1,1937 @@
+@@ -0,0 +1,1939 @@
 +/* Philips/NXP PCF50606 Power Management Unit (PMU) driver
 + *
 + * (C) 2006-2007 by OpenMoko, Inc.
@@ -1220,6 +1220,8 @@
 +      struct pcf50606_time pcf_tm;
 +
 +      mutex_lock(&pcf->lock);
++      alrm->enabled = 
++             __reg_read(pcf, PCF50606_REG_INT1M) & PCF50606_INT1_ALARM ? 0 : 
1;
 +      pcf_tm.sec = __reg_read(pcf, PCF50606_REG_RTCSCA);
 +      pcf_tm.min = __reg_read(pcf, PCF50606_REG_RTCMNA);
 +      pcf_tm.hour = __reg_read(pcf, PCF50606_REG_RTCHRA);

Modified: branches/src/target/kernel/2.6.24.x/patches/pcf50633.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/pcf50633.patch  2008-02-15 
19:00:48 UTC (rev 4072)
+++ branches/src/target/kernel/2.6.24.x/patches/pcf50633.patch  2008-02-16 
09:35:08 UTC (rev 4073)
@@ -34,7 +34,7 @@
 ===================================================================
 --- /dev/null
 +++ linux-2.6.24/drivers/i2c/chips/pcf50633.c
-@@ -0,0 +1,1954 @@
+@@ -0,0 +1,1956 @@
 +/* Philips PCF50633 Power Management Unit (PMU) driver
 + *
 + * (C) 2006-2007 by OpenMoko, Inc.
@@ -1340,6 +1340,8 @@
 +      struct pcf50633_time pcf_tm;
 +
 +      mutex_lock(&pcf->lock);
++      alrm->enabled =
++           __reg_read(pcf, PCF50633_REG_INT1M) & PCF50633_INT1_ALARM ? 0 : 1;
 +      pcf_tm.sec = __reg_read(pcf, PCF50633_REG_RTCSCA);
 +      pcf_tm.min = __reg_read(pcf, PCF50633_REG_RTCMNA);
 +      pcf_tm.hour = __reg_read(pcf, PCF50633_REG_RTCHRA);




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-02-16 11:42:16 +0100 (Sat, 16 Feb 2008)
New Revision: 4074

Modified:
   branches/src/target/kernel/2.6.24.x/patches/s3c_mci-gta01.patch
Log:
s3c_mci-gta01.patch:
- arch/arm/mach-s3c2410/mach-gta01.c (gta01_mmc_set_power, mmc_millivolts):
  calculate the voltage instead of using a 4MB lookup table

fix-huge-text-alloc-in-gta01.patch

From: Andy Green <[EMAIL PROTECTED]>

Werner spotted another giant array index issue in
mach-gta01.c, this fixes it removing 4MBytes of text allocation
from vmlinux that was previously wasted (>50% of the kernel image!)

ll arch/arm/boot/Image
Before: 7852880
After : 3658576

Signed-off-by: Andy Green <[EMAIL PROTECTED]>

---

 arch/arm/mach-s3c2410/mach-gta01.c |   27 ++++++++-------------------
 1 files changed, 8 insertions(+), 19 deletions(-)



Modified: branches/src/target/kernel/2.6.24.x/patches/s3c_mci-gta01.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/s3c_mci-gta01.patch     
2008-02-16 09:35:08 UTC (rev 4073)
+++ branches/src/target/kernel/2.6.24.x/patches/s3c_mci-gta01.patch     
2008-02-16 10:42:16 UTC (rev 4074)
@@ -1,7 +1,7 @@
-Index: linux-2.6/arch/arm/mach-s3c2410/mach-gta01.c
+Index: linux-2.6.24/arch/arm/mach-s3c2410/mach-gta01.c
 ===================================================================
---- linux-2.6.orig/arch/arm/mach-s3c2410/mach-gta01.c
-+++ linux-2.6/arch/arm/mach-s3c2410/mach-gta01.c
+--- linux-2.6.24.orig/arch/arm/mach-s3c2410/mach-gta01.c
++++ linux-2.6.24/arch/arm/mach-s3c2410/mach-gta01.c
 @@ -59,6 +59,7 @@
  
  #include <asm/arch/regs-gpio.h>
@@ -10,29 +10,15 @@
  #include <asm/arch/spi.h>
  #include <asm/arch/spi-gpio.h>
  #include <asm/arch/usb-control.h>
-@@ -381,6 +382,70 @@
+@@ -382,6 +383,59 @@
        .sets           = gta01_nand_sets,
  };
  
-+static unsigned int mmc_millivolts[] = {
-+      [MMC_VDD_165_195]       = 1700,
-+      [MMC_VDD_20_21]         = 2100,
-+      [MMC_VDD_21_22]         = 2200,
-+      [MMC_VDD_22_23]         = 2300,
-+      [MMC_VDD_23_24]         = 2400,
-+      [MMC_VDD_24_25]         = 2500,
-+      [MMC_VDD_25_26]         = 2600,
-+      [MMC_VDD_26_27]         = 2700,
-+      [MMC_VDD_27_28]         = 2800,
-+      [MMC_VDD_28_29]         = 2900,
-+      [MMC_VDD_29_30]         = 3000,
-+      [MMC_VDD_30_31]         = 3100,
-+      [MMC_VDD_31_32]         = 3200,
-+      [MMC_VDD_32_33]         = 3300,
-+};
-+
 +static void gta01_mmc_set_power(unsigned char power_mode, unsigned short vdd)
 +{
++      int bit;
++      int mv = 1700; /* 1.7V for MMC_VDD_165_195 */
++
 +      printk(KERN_DEBUG "mmc_set_power(power_mode=%u, vdd=%u\n",
 +             power_mode, vdd);
 +
@@ -44,9 +30,12 @@
 +                                         PCF50606_REGULATOR_D2REG, 0);
 +                      break;
 +              case MMC_POWER_ON:
++                      /* translate MMC_VDD_* VDD bit to mv */
++                      for (bit = 7; bit != 24; bit++)
++                              if (vdd == (1 << bit))
++                                      mv += 100 * (bit - 4);
 +                      pcf50606_voltage_set(pcf50606_global,
-+                                           PCF50606_REGULATOR_D2REG,
-+                                           mmc_millivolts[vdd]);
++                                           PCF50606_REGULATOR_D2REG, mv);
 +                      pcf50606_onoff_set(pcf50606_global,
 +                                         PCF50606_REGULATOR_D2REG, 1);
 +                      break;
@@ -81,7 +70,7 @@
  static void gta01_udc_command(enum s3c2410_udc_cmd_e cmd)
  {
        printk(KERN_DEBUG "%s(%d)\n", __func__, cmd);
-@@ -597,10 +662,12 @@
+@@ -598,10 +652,12 @@
            system_rev == GTA01Bv3_SYSTEM_REV ||
            system_rev == GTA01Bv4_SYSTEM_REV) {
                gta01_udc_cfg.udc_command = gta01_udc_command;




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

Reply via email to