Send commitlog mailing list submissions to
        [email protected]

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. r3115 - in trunk/src/target/OM-2007.2/artwork/themes:
      openmoko-standard-2/gtk-2.0 openmoko-standard-2-qvga/gtk-2.0
      ([EMAIL PROTECTED])
   2. r3116 - trunk/src/target/kernel/patches
      ([EMAIL PROTECTED])
   3. r3117 - trunk/src/target/kernel/patches
      ([EMAIL PROTECTED])
   4. r3118 - in
      trunk/src/target/OM-2007.2/libraries/libmokojournal2: .
      doc/reference ([EMAIL PROTECTED])
   5. r3119 - trunk/src/target/kernel/patches
      ([EMAIL PROTECTED])
   6. r3120 - trunk/src/target/kernel/patches
      ([EMAIL PROTECTED])
   7. r3121 - trunk/src/target/kernel/patches
      ([EMAIL PROTECTED])
   8. r3122 - trunk/src/host/dfu-util/src ([EMAIL PROTECTED])
--- Begin Message ---
Author: mickey
Date: 2007-10-08 14:52:05 +0200 (Mon, 08 Oct 2007)
New Revision: 3115

Modified:
   
trunk/src/target/OM-2007.2/artwork/themes/openmoko-standard-2-qvga/gtk-2.0/gtkmenu
   trunk/src/target/OM-2007.2/artwork/themes/openmoko-standard-2/gtk-2.0/gtkmenu
Log:
openmoko-standard-2[-qvga]: set GtkMenu::scroll-arrow-vlength to something 
reasonable


Modified: 
trunk/src/target/OM-2007.2/artwork/themes/openmoko-standard-2/gtk-2.0/gtkmenu
===================================================================
--- 
trunk/src/target/OM-2007.2/artwork/themes/openmoko-standard-2/gtk-2.0/gtkmenu   
    2007-10-08 11:33:03 UTC (rev 3114)
+++ 
trunk/src/target/OM-2007.2/artwork/themes/openmoko-standard-2/gtk-2.0/gtkmenu   
    2007-10-08 12:52:05 UTC (rev 3115)
@@ -9,5 +9,6 @@
     }
     xthickness = 10
     ythickness = 8
+    GtkMenu::scroll-arrow-vlength = 64
 }
 class "GtkMenu" style "gtkmenu"

Modified: 
trunk/src/target/OM-2007.2/artwork/themes/openmoko-standard-2-qvga/gtk-2.0/gtkmenu
===================================================================
--- 
trunk/src/target/OM-2007.2/artwork/themes/openmoko-standard-2-qvga/gtk-2.0/gtkmenu
  2007-10-08 11:33:03 UTC (rev 3114)
+++ 
trunk/src/target/OM-2007.2/artwork/themes/openmoko-standard-2-qvga/gtk-2.0/gtkmenu
  2007-10-08 12:52:05 UTC (rev 3115)
@@ -9,5 +9,6 @@
     }
     xthickness = 5
     ythickness = 4
+    GtkMenu::scroll-arrow-vlength = 32
 }
 class "GtkMenu" style "gtkmenu"




--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-10-08 15:40:11 +0200 (Mon, 08 Oct 2007)
New Revision: 3116

Added:
   trunk/src/target/kernel/patches/s3c2410_udc-2440_dual_packet-workaround.patch
Log:
add patch from werner to work around s3c2440 dual packet mode usb hangs


Added: 
trunk/src/target/kernel/patches/s3c2410_udc-2440_dual_packet-workaround.patch
===================================================================
--- 
trunk/src/target/kernel/patches/s3c2410_udc-2440_dual_packet-workaround.patch   
    2007-10-08 12:52:05 UTC (rev 3115)
+++ 
trunk/src/target/kernel/patches/s3c2410_udc-2440_dual_packet-workaround.patch   
    2007-10-08 13:40:11 UTC (rev 3116)
@@ -0,0 +1,51 @@
+This is a patch that seems to make the USB hangs on the S3C2440 go away. At
+least a good amount of ping torture didn't make them come back so far.
+
+The issue is that, if there are several back-to-back packets,
+sometimes no interrupt is generated for one of them. This
+seems to be caused by the mysterious dual packet mode, which
+the USB hardware enters automatically if the endpoint size is
+half that of the FIFO. (On the 2440, this is the normal
+situation for bulk data endpoints.)
+
+There is also a timing factor in this. I think what happens is
+that the USB hardware automatically sends an acknowledgement
+if there is only one packet in the FIFO (the FIFO has space
+for two). If another packet arrives before the host has
+retrieved and acknowledged the previous one, no interrupt is
+generated for that second one.
+
+However, there may be an indication. There is one undocumented
+bit (none of the 244x manuals document it), OUT_CRS1_REG[1],
+that seems to be set suspiciously often when this condition
+occurs. There is also CLR_DATA_TOGGLE, OUT_CRS1_REG[7], which
+may have a function related to this. (The Samsung manual is
+rather terse on that, as usual.)
+
+This needs to be examined further. For now, the patch seems to do the
+trick. 
+
+Note that this is not a clean solution by any means, because we
+might potentially get stuck in that interrupt for quite a while.
+
+Index: linux-2.6.22.5-moko/drivers/usb/gadget/s3c2410_udc.c
+===================================================================
+--- linux-2.6.22.5-moko.orig/drivers/usb/gadget/s3c2410_udc.c
++++ linux-2.6.22.5-moko/drivers/usb/gadget/s3c2410_udc.c
+@@ -845,6 +845,7 @@
+       u32                     ep_csr1;
+       u32                     idx;
+ 
++handle_ep_again:
+       if (likely (!list_empty(&ep->queue)))
+               req = list_entry(ep->queue.next,
+                               struct s3c2410_request, queue);
+@@ -884,6 +885,8 @@
+ 
+               if ((ep_csr1 & S3C2410_UDC_OCSR1_PKTRDY) && req) {
+                       s3c2410_udc_read_fifo(ep,req);
++                      if (s3c2410_udc_fifo_count_out())
++                              goto handle_ep_again;
+               }
+       }
+ }




--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-10-08 15:40:41 +0200 (Mon, 08 Oct 2007)
New Revision: 3117

Modified:
   trunk/src/target/kernel/patches/series
Log:
add dual packet workaround to series


Modified: trunk/src/target/kernel/patches/series
===================================================================
--- trunk/src/target/kernel/patches/series      2007-10-08 13:40:11 UTC (rev 
3116)
+++ trunk/src/target/kernel/patches/series      2007-10-08 13:40:41 UTC (rev 
3117)
@@ -10,6 +10,7 @@
 g_ether-vendor_product.patch
 s3c2410_serial-nodebug.patch
 s3c2410_udc_from_upstream.patch
+s3c2410_udc-2440_dual_packet-workaround.patch
 s3c2410_touchscreen.patch
 s3c2410-bbt.patch
 #udc-nomodule-misccr.patch




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-10-08 16:46:42 +0200 (Mon, 08 Oct 2007)
New Revision: 3118

Modified:
   trunk/src/target/OM-2007.2/libraries/libmokojournal2/ChangeLog
   
trunk/src/target/OM-2007.2/libraries/libmokojournal2/doc/reference/Makefile.am
Log:
* doc/reference/Makefile.am: Fix spurious += to single =


Modified: trunk/src/target/OM-2007.2/libraries/libmokojournal2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/libraries/libmokojournal2/ChangeLog      
2007-10-08 13:40:41 UTC (rev 3117)
+++ trunk/src/target/OM-2007.2/libraries/libmokojournal2/ChangeLog      
2007-10-08 14:46:42 UTC (rev 3118)
@@ -1,5 +1,9 @@
 2007-10-08  Thomas Wood  <[EMAIL PROTECTED]>
 
+       * doc/reference/Makefile.am: Fix spurious += to single =
+
+2007-10-08  Thomas Wood  <[EMAIL PROTECTED]>
+
        Patch by: Emmanuele Bassi <[EMAIL PROTECTED]>
 
        * doc/reference/Makefile.am:

Modified: 
trunk/src/target/OM-2007.2/libraries/libmokojournal2/doc/reference/Makefile.am
===================================================================
--- 
trunk/src/target/OM-2007.2/libraries/libmokojournal2/doc/reference/Makefile.am  
    2007-10-08 13:40:41 UTC (rev 3117)
+++ 
trunk/src/target/OM-2007.2/libraries/libmokojournal2/doc/reference/Makefile.am  
    2007-10-08 14:46:42 UTC (rev 3118)
@@ -75,7 +75,7 @@
 
 # Other files to distribute
 # e.g. EXTRA_DIST += version.xml.in
-EXTRA_DIST += version.xml.in
+EXTRA_DIST = version.xml.in
 
 # Files not to distribute
 # for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types




--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-10-08 16:49:16 +0200 (Mon, 08 Oct 2007)
New Revision: 3119

Modified:
   trunk/src/target/kernel/patches/gta02-core.patch
Log:
GTA02: add definitions for gsensor GPIO and IRQ
GTA02: vbus_draw is a void function, not int


Modified: trunk/src/target/kernel/patches/gta02-core.patch
===================================================================
--- trunk/src/target/kernel/patches/gta02-core.patch    2007-10-08 14:46:42 UTC 
(rev 3118)
+++ trunk/src/target/kernel/patches/gta02-core.patch    2007-10-08 14:49:16 UTC 
(rev 3119)
@@ -2,7 +2,7 @@
 ===================================================================
 --- /dev/null
 +++ linux-2.6.22.5-moko/arch/arm/mach-s3c2440/mach-gta02.c
-@@ -0,0 +1,668 @@
+@@ -0,0 +1,666 @@
 +/*
 + * linux/arch/arm/mach-s3c2440/mach-gta02.c
 + *
@@ -396,12 +396,10 @@
 +      }
 +}
 +
-+static int gta02_udc_vbus_draw(unsigned int ma)
++static void gta02_udc_vbus_draw(unsigned int ma)
 +{
 +      gta02_udc_vbus_drawer.ma = ma;
 +      schedule_work(&gta02_udc_vbus_drawer.work);
-+
-+      return 0;
 +}
 +
 +static struct s3c2410_udc_mach_info gta02_udc_cfg = {
@@ -675,7 +673,7 @@
 ===================================================================
 --- /dev/null
 +++ linux-2.6.22.5-moko/include/asm-arm/arch-s3c2410/gta02.h
-@@ -0,0 +1,28 @@
+@@ -0,0 +1,32 @@
 +#ifndef _GTA02_H
 +#define _GTA02_H
 +
@@ -695,10 +693,14 @@
 +#define GTA02_GPIO_AUX_KEY    S3C2410_GPF6
 +#define GTA02_GPIO_JACK_INSERT        S3C2410_GPF4
 +#define GTA02_GPIO_BT_EN      S3C2410_GPB6
++#define GTA02_GPIO_GSENSOR1_CS        S3C2410_GPD12
++#define GTA02_GPIO_GSENSOR2_CS        S3C2410_GPD13
 +
 +#define GTA02_IRQ_MODEM               IRQ_EINT1
 +#define GTA02_IRQ_3D          IRQ_EINT12
 +#define GTA02_IRQ_PCF50633    IRQ_EINT9
++#define GTA02_IRQ_GSENSOR_1   IRQ_EINT0
++#define GTA02_IRQ_GSENSOR_2   IRQ_EINT16
 +
 +/* Changes in GTA02v2 */
 +#define GTA02v2_GPIO_3D_RESET S3C2440_GPJ4
@@ -930,7 +932,7 @@
 ===================================================================
 --- linux-2.6.22.5-moko.orig/drivers/leds/leds-gta01.c
 +++ linux-2.6.22.5-moko/drivers/leds/leds-gta01.c
-@@ -71,7 +71,7 @@
+@@ -107,7 +107,7 @@
        struct gta01_vib_priv *vp;
        struct resource *r;
  




--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-10-08 16:50:08 +0200 (Mon, 08 Oct 2007)
New Revision: 3120

Modified:
   trunk/src/target/kernel/patches/lis302dl.patch
Log:
use new #defines for gta02 gsensor IRQ and GPIO


Modified: trunk/src/target/kernel/patches/lis302dl.patch
===================================================================
--- trunk/src/target/kernel/patches/lis302dl.patch      2007-10-08 14:49:16 UTC 
(rev 3119)
+++ trunk/src/target/kernel/patches/lis302dl.patch      2007-10-08 14:50:08 UTC 
(rev 3120)
@@ -6,7 +6,15 @@
 ===================================================================
 --- linux-2.6.22.5-moko.orig/arch/arm/mach-s3c2440/mach-gta02.c
 +++ linux-2.6.22.5-moko/arch/arm/mach-s3c2440/mach-gta02.c
-@@ -310,6 +310,7 @@
+@@ -44,6 +44,7 @@
+ #include <linux/mtd/partitions.h>
+ 
+ #include <linux/pcf50633.h>
++#include <linux/lis302dl.h>
+ 
+ #include <asm/mach/arch.h>
+ #include <asm/mach/map.h>
+@@ -310,6 +311,7 @@
        &s3c_device_usbgadget,
        &s3c_device_nand,
        &s3c_device_ts,
@@ -14,7 +22,7 @@
  };
  
  static struct s3c2410_nand_set gta02_nand_sets[] = {
-@@ -439,6 +440,47 @@
+@@ -437,6 +439,47 @@
        .board_info     = gta02_spi_board_info,
  };
  
@@ -23,7 +31,7 @@
 +      s3c2410_gpio_setpin(cs, pol);
 +}
 +
-+static struct lis302dl_platform_data lis302_pdata[] = {
++static const struct lis302dl_platform_data lis302_pdata[] = {
 +      {
 +              .name           = "lis302-1 (top)"
 +      }, {
@@ -34,8 +42,8 @@
 +static struct spi_board_info gta02_spi_acc_bdinfo[] = {
 +      {
 +              .modalias       = "lis302dl",
-+              .platform_data  = lis302_pdata[0],
-+              .irq            = S3C2410_EINT0,
++              .platform_data  = &lis302_pdata[0],
++              .irq            = GTA02_IRQ_GSENSOR_1,
 +              .max_speed_hz   = 400 * 1000,
 +              .bus_num        = 1,
 +              .chip_select    = S3C2410_GPD12,
@@ -43,8 +51,8 @@
 +      },
 +      {
 +              .modalias       = "lis302dl",
-+              .platform_data  = lis302_pdata[1],
-+              .irq            = S3C2410_EINT16,
++              .platform_data  = &lis302_pdata[1],
++              .irq            = GTA02_IRQ_GSENSOR_2,
 +              .max_speed_hz   = 400 * 1000,
 +              .bus_num        = 1,
 +              .chip_select    = S3C2410_GPD13,
@@ -62,7 +70,7 @@
  #if 0
  #ifdef SPI_HARD
  static struct s3c2410_spi_info spi_cfg = {
-@@ -628,6 +670,7 @@
+@@ -626,6 +669,7 @@
        s3c_device_usb.dev.platform_data = &gta02_usb_info;
        s3c_device_nand.dev.platform_data = &gta02_nand_info;
        s3c_device_sdi.dev.platform_data = &gta02_mmc_cfg;




--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-10-08 18:06:32 +0200 (Mon, 08 Oct 2007)
New Revision: 3121

Added:
   trunk/src/target/kernel/patches/s3c2410-pwm.patch
Modified:
   trunk/src/target/kernel/patches/series
Log:
Add new S3C2410 PWM core (Javi Roman)


Added: trunk/src/target/kernel/patches/s3c2410-pwm.patch
===================================================================
--- trunk/src/target/kernel/patches/s3c2410-pwm.patch   2007-10-08 14:50:08 UTC 
(rev 3120)
+++ trunk/src/target/kernel/patches/s3c2410-pwm.patch   2007-10-08 16:06:32 UTC 
(rev 3121)
@@ -0,0 +1,308 @@
+Index: linux-2.6.22.5-moko/arch/arm/mach-s3c2410/Kconfig
+===================================================================
+--- linux-2.6.22.5-moko.orig/arch/arm/mach-s3c2410/Kconfig
++++ linux-2.6.22.5-moko/arch/arm/mach-s3c2410/Kconfig
+@@ -9,6 +9,7 @@
+       depends on ARCH_S3C2410
+       select S3C2410_CLOCK
+       select S3C2410_GPIO
++      select S3C2410_PWM
+       select S3C2410_PM if PM
+       help
+         Support for S3C2410 and S3C2410A family from the S3C24XX line
+@@ -36,6 +37,11 @@
+       help
+         Clock code for the S3C2410, and similar processors
+ 
++config S3C2410_PWM
++      bool
++      help
++        PWM timer code for the S3C2410, and similar processors
++
+ 
+ menu "S3C2410 Machines"
+ 
+Index: linux-2.6.22.5-moko/arch/arm/mach-s3c2410/Makefile
+===================================================================
+--- linux-2.6.22.5-moko.orig/arch/arm/mach-s3c2410/Makefile
++++ linux-2.6.22.5-moko/arch/arm/mach-s3c2410/Makefile
+@@ -16,6 +16,7 @@
+ obj-$(CONFIG_S3C2410_PM)      += pm.o sleep.o
+ obj-$(CONFIG_S3C2410_GPIO)    += gpio.o
+ obj-$(CONFIG_S3C2410_CLOCK)   += clock.o
++obj-$(CONFIG_S3C2410_PWM)     += pwm.o
+ 
+ # Machine support
+ 
+Index: linux-2.6.22.5-moko/arch/arm/mach-s3c2410/pwm.c
+===================================================================
+--- /dev/null
++++ linux-2.6.22.5-moko/arch/arm/mach-s3c2410/pwm.c
+@@ -0,0 +1,222 @@
++/*
++ * arch/arm/mach-s3c2410/3c2410-pwm.c
++ *
++ * Copyright (c) by Javi Roman <[EMAIL PROTECTED]>
++ *             for the OpenMoko Project.
++ *
++ *     S3C2410A SoC PWM support
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/clk.h>
++#include <asm/hardware.h>
++#include <asm/arch/regs-timer.h>
++#include <asm/arch/pwm.h>
++
++struct s3c2410_pwm_t *s3c2410_pwm_alloc(void)
++{
++      struct s3c2410_pwm_t *s3c2410_pwm;
++
++        s3c2410_pwm = kzalloc(sizeof(*s3c2410_pwm), GFP_KERNEL);
++        if (!s3c2410_pwm)
++                /*return -ENOMEM;*/
++              return NULL;
++
++      s3c2410_pwm->pclk = clk_get(NULL, "timers");
++
++      if (IS_ERR(s3c2410_pwm->pclk)) {
++              /*return PTR_ERR(clk);*/
++              kfree(s3c2410_pwm);
++              return NULL;
++      }
++
++      clk_enable(s3c2410_pwm->pclk);
++
++      s3c2410_pwm->pclk_rate = clk_get_rate(s3c2410_pwm->pclk);
++
++      return s3c2410_pwm;
++}
++
++EXPORT_SYMBOL_GPL(s3c2410_pwm_alloc);
++
++int s3c2410_pwm_disable(struct s3c2410_pwm_t *s3c2410_pwm)
++{
++      unsigned long tcon;
++
++      /* stop timer */
++        tcon = __raw_readl(S3C2410_TCON);
++        tcon &= 0xffffff00;
++        __raw_writel(tcon, S3C2410_TCON);
++
++      clk_disable(s3c2410_pwm->pclk);
++      clk_put(s3c2410_pwm->pclk);
++
++      kfree(s3c2410_pwm);
++      return 0;
++}
++
++EXPORT_SYMBOL_GPL(s3c2410_pwm_disable);
++
++int s3c2410_pwm_enable(struct s3c2410_pwm_t *s3c2410_pwm)
++{
++      unsigned long tcfg0, tcfg1, tcnt, tcmp;
++
++      /* control registers bits */
++      tcfg1 = __raw_readl(S3C2410_TCFG1);
++      tcfg0 = __raw_readl(S3C2410_TCFG0);
++
++      /* divider & scaler slection */
++      switch(s3c2410_pwm->timerid) {
++      case PWM0:
++              tcfg1 &= ~S3C2410_TCFG1_MUX0_MASK;
++              tcfg0 &= ~S3C2410_TCFG_PRESCALER0_MASK;
++              break;
++      case PWM1:
++              tcfg1 &= ~S3C2410_TCFG1_MUX1_MASK;
++              tcfg0 &= ~S3C2410_TCFG_PRESCALER0_MASK;
++              break;
++      case PWM2:
++              tcfg1 &= ~S3C2410_TCFG1_MUX2_MASK;
++              tcfg0 &= ~S3C2410_TCFG_PRESCALER1_MASK;
++              break;
++      case PWM3:
++              tcfg1 &= ~S3C2410_TCFG1_MUX3_MASK;
++              tcfg0 &= ~S3C2410_TCFG_PRESCALER1_MASK;
++              break;
++      case PWM4:
++              tcfg1 &= ~S3C2410_TCFG1_MUX4_MASK;
++              tcfg0 &= ~S3C2410_TCFG_PRESCALER1_MASK;
++              break;
++      default:
++              return -1;
++      }
++
++      /* divider & scaler values */
++      tcfg1 |= s3c2410_pwm->divider;
++      tcfg0 |= s3c2410_pwm->prescaler;
++
++      __raw_writel(tcfg1, S3C2410_TCFG1);
++      __raw_writel(tcfg0, S3C2410_TCFG0);
++
++      /* timer count and compare buffer initial values */
++      tcnt = s3c2410_pwm->counter;
++      tcmp = s3c2410_pwm->comparer;
++
++      __raw_writel(tcnt, S3C2410_TCNTB(s3c2410_pwm->timerid));
++      __raw_writel(tcmp, S3C2410_TCMPB(s3c2410_pwm->timerid));
++
++      /* ensure timer is stopped */
++      s3c2410_pwm_stop(s3c2410_pwm);
++
++      return 0;
++}
++
++EXPORT_SYMBOL_GPL(s3c2410_pwm_enable);
++
++int s3c2410_pwm_start(struct s3c2410_pwm_t *s3c2410_pwm)
++{
++      unsigned long tcon;
++
++      tcon = __raw_readl(S3C2410_TCON);
++
++      switch (s3c2410_pwm->timerid) {
++      case PWM0:
++              tcon |= S3C2410_TCON_T0START;
++              tcon &= ~S3C2410_TCON_T0MANUALUPD;
++              break;
++      case PWM1:
++              tcon |= S3C2410_TCON_T1START;
++              tcon &= ~S3C2410_TCON_T1MANUALUPD;
++              break;
++      case PWM2:
++              tcon |= S3C2410_TCON_T2START;
++              tcon &= ~S3C2410_TCON_T2MANUALUPD;
++              break;
++      case PWM3:
++              tcon |= S3C2410_TCON_T3START;
++              tcon &= ~S3C2410_TCON_T3MANUALUPD;
++              break;
++      case PWM4:
++              tcon |= S3C2410_TCON_T4START;
++              tcon &= ~S3C2410_TCON_T4MANUALUPD;
++      }
++
++      __raw_writel(tcon, S3C2410_TCON);
++
++      return 0;
++}
++
++EXPORT_SYMBOL_GPL(s3c2410_pwm_start);
++
++int s3c2410_pwm_stop(struct s3c2410_pwm_t *s3c2410_pwm)
++{
++      unsigned long tcon;
++
++      tcon = __raw_readl(S3C2410_TCON);
++
++      switch (s3c2410_pwm->timerid) {
++      case PWM0:
++              tcon &= ~0x00000000;
++              tcon |= S3C2410_TCON_T0RELOAD;
++              tcon |= S3C2410_TCON_T0MANUALUPD;
++              break;
++      case PWM1:
++              tcon &= ~0x00000080;
++              tcon |= S3C2410_TCON_T1RELOAD;
++              tcon |= S3C2410_TCON_T1MANUALUPD;
++              break;
++      case PWM2:
++              tcon &= ~0x00000800;
++              tcon |= S3C2410_TCON_T2RELOAD;
++              tcon |= S3C2410_TCON_T2MANUALUPD;
++              break;
++      case PWM3:
++              tcon &= ~0x00008000;
++              tcon |= S3C2410_TCON_T3RELOAD;
++              tcon |= S3C2410_TCON_T3MANUALUPD;
++              break;
++      case PWM4:
++              tcon &= ~0x00080000;
++              tcon |= S3C2410_TCON_T4RELOAD;
++              tcon |= S3C2410_TCON_T3MANUALUPD;
++      }
++
++      __raw_writel(tcon, S3C2410_TCON);
++
++      return 0;
++}
++
++EXPORT_SYMBOL_GPL(s3c2410_pwm_stop);
++
++int s3c2410_pwm_duty_cycle(int reg_value, struct s3c2410_pwm_t *s3c2410_pwm)
++{
++      __raw_writel(reg_value, S3C2410_TCMPB(s3c2410_pwm->timerid));
++
++      return 0;
++}
++
++EXPORT_SYMBOL_GPL(s3c2410_pwm_duty_cycle);
++
++int s3c2410_pwm_dumpregs(void)
++{
++      printk(KERN_INFO "TCON: %08lx, TCFG0: %08lx, TCFG1: %08lx\n",
++                      (unsigned long) __raw_readl(S3C2410_TCON),
++                      (unsigned long) __raw_readl(S3C2410_TCFG0),
++                      (unsigned long) __raw_readl(S3C2410_TCFG1));
++
++      return 0;
++}
++
++EXPORT_SYMBOL_GPL(s3c2410_pwm_dumpregs);
++
+Index: linux-2.6.22.5-moko/include/asm-arm/arch-s3c2410/pwm.h
+===================================================================
+--- /dev/null
++++ linux-2.6.22.5-moko/include/asm-arm/arch-s3c2410/pwm.h
+@@ -0,0 +1,40 @@
++#ifndef __S3C2410_PWM_H
++#define __S3C2410_PWM_H
++
++#include <linux/err.h>
++#include <linux/platform_device.h>
++#include <linux/clk.h>
++
++#include <asm-arm/io.h>
++#include <asm/arch/hardware.h>
++#include <asm/mach-types.h>
++#include <asm/arch/regs-timer.h>
++#include <asm/arch/gta01.h>
++
++enum pwm_timer {
++      PWM0,
++      PWM1,
++      PWM2,
++      PWM3,
++      PWM4
++};
++
++struct s3c2410_pwm_t {
++      enum pwm_timer timerid;
++      struct clk *pclk;
++      unsigned long pclk_rate;
++      unsigned long prescaler;
++      unsigned long divider;
++      unsigned long counter;
++      unsigned long comparer;
++};
++
++struct s3c2410_pwm_t *s3c2410_pwm_alloc(void);
++int s3c2410_pwm_enable(struct s3c2410_pwm_t *s3c2410_pwm);
++int s3c2410_pwm_disable(struct s3c2410_pwm_t *s3c2410_pwm);
++int s3c2410_pwm_start(struct s3c2410_pwm_t *s3c2410_pwm);
++int s3c2410_pwm_stop(struct s3c2410_pwm_t *s3c2410_pwm);
++int s3c2410_pwm_duty_cycle(int reg_value, struct s3c2410_pwm_t *s3c2410_pwm);
++int s3c2410_pwm_dumpregs(void);
++
++#endif /* __S3C2410_PWM_H */

Modified: trunk/src/target/kernel/patches/series
===================================================================
--- trunk/src/target/kernel/patches/series      2007-10-08 14:50:08 UTC (rev 
3120)
+++ trunk/src/target/kernel/patches/series      2007-10-08 16:06:32 UTC (rev 
3121)
@@ -20,6 +20,7 @@
 s3cmci-stop-fix.patch
 s3cmci-unfinished-write-fix.patch
 s3c_mci_platform.patch
+s3c2410-pwm.patch
 qt2410-base.patch
 qt2410-cs8900.patch
 qt2410-s3c_mci-pdata.patch




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-10-08 18:38:02 +0200 (Mon, 08 Oct 2007)
New Revision: 3122

Modified:
   trunk/src/host/dfu-util/src/main.c
Log:
main.c (main): don't invoke resolve_device_path unless we need to resolve a
  path name (zero return code caused confusion)



Modified: trunk/src/host/dfu-util/src/main.c
===================================================================
--- trunk/src/host/dfu-util/src/main.c  2007-10-08 16:06:32 UTC (rev 3121)
+++ trunk/src/host/dfu-util/src/main.c  2007-10-08 16:38:02 UTC (rev 3122)
@@ -331,9 +331,6 @@
 {
        int res;
 
-       if (!(dif->flags & DFU_IFF_PATH))
-               return 0;
-
        res = usb_path2devnum(dif->path);
        if (res < 0)
                return -EINVAL;
@@ -616,17 +613,20 @@
                if (usb_find_devices() < 2)
                        printf("not at least 2 device changes found ?!?\n");
 
-               ret = resolve_device_path(dif);
-               if (ret < 0) {
-                       fprintf(stderr,
-                           "internal error: cannot re-parse `%s'\n",
-                           dif->path);
-                       abort();
+               if (dif->flags & DFU_IFF_PATH) {
+                       ret = resolve_device_path(dif);
+                       if (ret < 0) {
+                               fprintf(stderr,
+                                   "internal error: cannot re-parse `%s'\n",
+                                   dif->path);
+                               abort();
+                       }
+                       if (!ret) {
+                               fprintf(stderr,
+                                   "Can't resolve path after RESET?\n");
+                               exit(1);
+                       }
                }
-               if (!ret) {
-                       fprintf(stderr, "Can't resolve path after RESET?\n");
-                       exit(1);
-               }
 
                num_devs = count_dfu_devices(dif);
                if (num_devs == 0) {




--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to