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. r1361 - trunk/oe/packages/libftdi ([EMAIL PROTECTED])
   2. r1362 - trunk/src/target/u-boot/patches ([EMAIL PROTECTED])
   3. r1363 - trunk/src/target/u-boot/patches
      ([EMAIL PROTECTED])
   4. r1364 - trunk/src/target/u-boot/patches
      ([EMAIL PROTECTED])
   5. r1365 - trunk/src/host/devirginator ([EMAIL PROTECTED])
--- Begin Message ---
Author: laforge
Date: 2007-03-14 12:12:58 +0100 (Wed, 14 Mar 2007)
New Revision: 1361

Modified:
   trunk/oe/packages/libftdi/ftdi-eeprom-native_0.2.bb
   trunk/oe/packages/libftdi/ftdi-eeprom_0.2.bb
Log:
oe/libftdi: add missing dependencies to confuse{-native}. thanks rwhitby for 
spotting. closes #266


Modified: trunk/oe/packages/libftdi/ftdi-eeprom-native_0.2.bb
===================================================================
--- trunk/oe/packages/libftdi/ftdi-eeprom-native_0.2.bb 2007-03-14 06:55:33 UTC 
(rev 1360)
+++ trunk/oe/packages/libftdi/ftdi-eeprom-native_0.2.bb 2007-03-14 11:12:58 UTC 
(rev 1361)
@@ -1,6 +1,7 @@
 require ftdi-eeprom_${PV}.bb
 
-DEPENDS = "libftdi-native"
+DEPENDS = "libftdi-native confuse-native"
+PR = "r1"
 
 do_stage() {
     install -m 0755 ftdi_eeprom/ftdi_eeprom ${STAGING_BINDIR_NATIVE}

Modified: trunk/oe/packages/libftdi/ftdi-eeprom_0.2.bb
===================================================================
--- trunk/oe/packages/libftdi/ftdi-eeprom_0.2.bb        2007-03-14 06:55:33 UTC 
(rev 1360)
+++ trunk/oe/packages/libftdi/ftdi-eeprom_0.2.bb        2007-03-14 11:12:58 UTC 
(rev 1361)
@@ -1,8 +1,8 @@
 DESCRIPTION = "ftdi-eeprom is a flashing utility for FTDI  chips."
 HOMEPAGE = "http://www.intra2net.com/de/produkte/opensource/ftdi";
 LICENSE = "GPL"
-DEPENDS = "libftdi"
-PR = "r1"
+DEPENDS = "libftdi confuse"
+PR = "r2"
 
 SRC_URI = 
"http://www.intra2net.com/de/produkte/opensource/ftdi/TGZ/ftdi_eeprom-${PV}.tar.gz
 \
            file://ftdi_eeprom-0.2-moko.patch;patch=1"




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-03-14 12:45:30 +0100 (Wed, 14 Mar 2007)
New Revision: 1362

Modified:
   trunk/src/target/u-boot/patches/uboot-dfu.patch
Log:
drivers/usbdfu.c (handle_upload): work around memory corruption caused by
  copying to too small buffer in URB



Modified: trunk/src/target/u-boot/patches/uboot-dfu.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-dfu.patch     2007-03-14 11:12:58 UTC 
(rev 1361)
+++ trunk/src/target/u-boot/patches/uboot-dfu.patch     2007-03-14 11:45:30 UTC 
(rev 1362)
@@ -99,7 +99,7 @@
 ===================================================================
 --- /dev/null
 +++ u-boot/drivers/usbdfu.c
-@@ -0,0 +1,1042 @@
+@@ -0,0 +1,1043 @@
 +/*
 + * (C) 2007 by OpenMoko, Inc.
 + * Author: Harald Welte <[EMAIL PROTECTED]>
@@ -586,7 +586,8 @@
 +                      remain = len;
 +
 +              debug("copying %u bytes ", remain);
-+              memcpy(urb->buffer, ds->ptr, remain);
++//            memcpy(urb->buffer, ds->ptr, remain);
++              urb->buffer = ds->ptr;
 +              ds->ptr += remain;
 +              urb->actual_length = remain;
 +




--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-03-14 20:53:40 +0100 (Wed, 14 Mar 2007)
New Revision: 1363

Modified:
   trunk/src/target/u-boot/patches/uboot-20061030-neo1973.patch
Log:
Add support for enabling/disabling fast charge

FIXME: if we disable fast charge, we should go back to trickle/pre charge!


Modified: trunk/src/target/u-boot/patches/uboot-20061030-neo1973.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-20061030-neo1973.patch        
2007-03-14 11:45:30 UTC (rev 1362)
+++ trunk/src/target/u-boot/patches/uboot-20061030-neo1973.patch        
2007-03-14 19:53:40 UTC (rev 1363)
@@ -6,9 +6,9 @@
 
 Index: u-boot/Makefile
 ===================================================================
---- u-boot.orig/Makefile       2007-03-01 14:31:08.000000000 +0100
-+++ u-boot/Makefile    2007-03-01 14:31:09.000000000 +0100
-@@ -1934,6 +1934,13 @@
+--- u-boot.orig/Makefile       2007-03-14 09:37:07.000000000 +0100
++++ u-boot/Makefile    2007-03-14 09:37:07.000000000 +0100
+@@ -1977,6 +1977,13 @@
  sbc2410x_config: unconfig
        @$(MKCONFIG) $(@:_config=) arm arm920t sbc2410x NULL s3c24x0
  
@@ -25,7 +25,7 @@
 Index: u-boot/board/neo1973/Makefile
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/board/neo1973/Makefile      2007-03-01 14:31:09.000000000 +0100
++++ u-boot/board/neo1973/Makefile      2007-03-14 09:45:31.000000000 +0100
 @@ -0,0 +1,47 @@
 +#
 +# (C) Copyright 2000, 2001, 2002
@@ -77,7 +77,7 @@
 Index: u-boot/board/neo1973/config.mk
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/board/neo1973/config.mk     2007-03-01 14:31:09.000000000 +0100
++++ u-boot/board/neo1973/config.mk     2007-03-14 09:37:07.000000000 +0100
 @@ -0,0 +1,34 @@
 +#
 +# (C) Copyright 2002
@@ -116,7 +116,7 @@
 Index: u-boot/board/neo1973/neo1973.c
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/board/neo1973/neo1973.c     2007-03-01 14:31:09.000000000 +0100
++++ u-boot/board/neo1973/neo1973.c     2007-03-14 09:45:34.000000000 +0100
 @@ -0,0 +1,317 @@
 +/*
 + * (C) 2006 by OpenMoko, Inc.
@@ -438,7 +438,7 @@
 Index: u-boot/board/neo1973/lowlevel_init.S
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/board/neo1973/lowlevel_init.S       2007-03-01 14:31:22.000000000 
+0100
++++ u-boot/board/neo1973/lowlevel_init.S       2007-03-14 09:37:07.000000000 
+0100
 @@ -0,0 +1,188 @@
 +/*
 + * Memory Setup stuff - taken from blob memsetup.S
@@ -631,7 +631,7 @@
 Index: u-boot/board/neo1973/u-boot.lds
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/board/neo1973/u-boot.lds    2007-03-01 14:31:09.000000000 +0100
++++ u-boot/board/neo1973/u-boot.lds    2007-03-14 09:37:07.000000000 +0100
 @@ -0,0 +1,58 @@
 +/*
 + * (C) Copyright 2002
@@ -694,7 +694,7 @@
 Index: u-boot/include/configs/neo1973.h
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/include/configs/neo1973.h   2007-03-01 14:31:09.000000000 +0100
++++ u-boot/include/configs/neo1973.h   2007-03-14 09:45:34.000000000 +0100
 @@ -0,0 +1,260 @@
 +/*
 + * (C) Copyright 2006 OpenMoko, Inc.
@@ -959,7 +959,7 @@
 Index: u-boot/board/neo1973/split_by_variant.sh
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/board/neo1973/split_by_variant.sh   2007-03-01 14:31:09.000000000 
+0100
++++ u-boot/board/neo1973/split_by_variant.sh   2007-03-14 09:37:07.000000000 
+0100
 @@ -0,0 +1,49 @@
 +#!/bin/sh
 +# ---------------------------------------------------------
@@ -1013,7 +1013,7 @@
 Index: u-boot/board/neo1973/cmd_neo1973.c
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/board/neo1973/cmd_neo1973.c 2007-03-01 14:31:09.000000000 +0100
++++ u-boot/board/neo1973/cmd_neo1973.c 2007-03-14 09:45:33.000000000 +0100
 @@ -0,0 +1,120 @@
 +/*
 + * (C) Copyright 2006 by OpenMoko, Inc.
@@ -1138,7 +1138,7 @@
 Index: u-boot/board/neo1973/neo1973.h
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/board/neo1973/neo1973.h     2007-03-01 14:31:09.000000000 +0100
++++ u-boot/board/neo1973/neo1973.h     2007-03-14 09:45:30.000000000 +0100
 @@ -0,0 +1,18 @@
 +#ifndef _NEO1973_H
 +#define _NEO1973_H
@@ -1161,8 +1161,8 @@
 Index: u-boot/board/neo1973/pcf50606.c
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/board/neo1973/pcf50606.c    2007-03-01 14:31:09.000000000 +0100
-@@ -0,0 +1,168 @@
++++ u-boot/board/neo1973/pcf50606.c    2007-03-14 09:43:53.000000000 +0100
+@@ -0,0 +1,184 @@
 +
 +#include <common.h>
 +#include <i2c.h>
@@ -1183,12 +1183,18 @@
 +      return tmp;
 +}
 +
-+u_int8_t pcf50606_reg_set_bit_mask(u_int8_t reg, u_int8_t mask, u_int8_t val)
++void pcf50606_reg_set_bit_mask(u_int8_t reg, u_int8_t mask, u_int8_t val)
 +{
 +      u_int8_t tmp = pcf50606_reg_read(reg);
 +      pcf50606_reg_write(reg, (val & mask) | (tmp & ~mask));
 +}
 +
++void pcf50606_reg_clear_bits(u_int8_t reg, u_int8_t bits)
++{
++      u_int8_t tmp = pcf50606_reg_read(reg);
++      pcf50606_reg_write(reg, (tmp & ~bits));
++}
++
 +static const u_int8_t regs_valid[] = {
 +      PCF50606_REG_OOCS, PCF50606_REG_INT1M, PCF50606_REG_INT2M,
 +      PCF50606_REG_INT3M, PCF50606_REG_OOCC1, PCF50606_REG_OOCC2,
@@ -1331,11 +1337,21 @@
 +                                 initial_register_set[regs_valid[i]]);
 +#endif
 +}
++
++void pcf50606_charge_autofast(int on)
++{
++      if (on)
++              pcf50606_reg_set_bit_mask(PCF50606_REG_MBCC1,
++                                        PCF50606_MBCC1_AUTOFST,
++                                        PCF50606_MBCC1_AUTOFST);
++      else
++              pcf50606_reg_write(PCF50606_REG_MBCC1, 0x00);
++}
 Index: u-boot/board/neo1973/pcf50606.h
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/board/neo1973/pcf50606.h    2007-03-01 14:31:09.000000000 +0100
-@@ -0,0 +1,267 @@
++++ u-boot/board/neo1973/pcf50606.h    2007-03-14 09:37:07.000000000 +0100
+@@ -0,0 +1,269 @@
 +#ifndef _PCF50606_H
 +#define _PCF50606_H
 +
@@ -1597,16 +1613,18 @@
 +
 +u_int8_t pcf50606_reg_read(u_int8_t reg);
 +
-+u_int8_t pcf50606_reg_set_bit_mask(u_int8_t reg, u_int8_t mask, u_int8_t val);
++void pcf50606_reg_set_bit_mask(u_int8_t reg, u_int8_t mask, u_int8_t val);
++void pcf50606_reg_clear_bits(u_int8_t reg, u_int8_t bits);
 +
 +void pcf50606_init(void);
++void pcf50606_charge_autofast(int on);
 +
 +#endif /* _PCF50606_H */
 +
 Index: u-boot/common/main.c
 ===================================================================
---- u-boot.orig/common/main.c  2007-03-01 14:29:31.000000000 +0100
-+++ u-boot/common/main.c       2007-03-01 14:31:09.000000000 +0100
+--- u-boot.orig/common/main.c  2007-03-14 09:36:52.000000000 +0100
++++ u-boot/common/main.c       2007-03-14 09:45:31.000000000 +0100
 @@ -61,6 +61,7 @@
  #undef DEBUG_PARSER
  
@@ -1627,7 +1645,7 @@
 Index: u-boot/board/neo1973/jbt6k74.c
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/board/neo1973/jbt6k74.c     2007-03-01 14:31:09.000000000 +0100
++++ u-boot/board/neo1973/jbt6k74.c     2007-03-14 09:37:07.000000000 +0100
 @@ -0,0 +1,403 @@
 +/* u-boot driver for the tpo JBT6K74-AS LCM ASIC
 + *
@@ -2035,7 +2053,7 @@
 Index: u-boot/board/neo1973/jbt6k74.h
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/board/neo1973/jbt6k74.h     2007-03-01 14:31:09.000000000 +0100
++++ u-boot/board/neo1973/jbt6k74.h     2007-03-14 09:37:07.000000000 +0100
 @@ -0,0 +1,14 @@
 +#ifndef _JBT6K74_H
 +#define _JBT6K74_H




--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-03-14 20:54:34 +0100 (Wed, 14 Mar 2007)
New Revision: 1364

Added:
   trunk/src/target/u-boot/patches/neo1973-chargefast.patch
   trunk/src/target/u-boot/patches/usbdcore-multiple_configs.patch
Modified:
   trunk/src/target/u-boot/patches/series
Log:
Add support for two USB configurations, one of which is 500mA and the other one 
is 100mA.  Once the host issues SET_CONFIGURATION, the apropriate charging mode 
is selected


Added: trunk/src/target/u-boot/patches/neo1973-chargefast.patch
===================================================================
--- trunk/src/target/u-boot/patches/neo1973-chargefast.patch    2007-03-14 
19:53:40 UTC (rev 1363)
+++ trunk/src/target/u-boot/patches/neo1973-chargefast.patch    2007-03-14 
19:54:34 UTC (rev 1364)
@@ -0,0 +1,282 @@
+Index: u-boot/drivers/usbtty.c
+===================================================================
+--- u-boot.orig/drivers/usbtty.c       2007-03-14 20:37:15.000000000 +0100
++++ u-boot/drivers/usbtty.c    2007-03-14 20:49:03.000000000 +0100
+@@ -66,7 +66,7 @@
+ /*
+  * Defines
+  */
+-#define NUM_CONFIGS    1
++#define NUM_CONFIGS    2
+ #define MAX_INTERFACES 2
+ #define NUM_ENDPOINTS  3
+ #define ACM_TX_ENDPOINT 3
+@@ -192,8 +192,7 @@
+ #endif
+                       .bConfigurationValue = 1,
+                       .iConfiguration = STR_CONFIG,
+-                      .bmAttributes = 
+-                              BMATTRIBUTE_SELF_POWERED|BMATTRIBUTE_RESERVED,
++                      .bmAttributes = BMATTRIBUTE_RESERVED,
+                       .bMaxPower = USBTTY_MAXPOWER
+               },
+               /* Interface 1 */
+@@ -294,6 +293,120 @@
+               .func_dfu = DFU_FUNC_DESC,
+ #endif
+       },
++      {
++              .configuration_desc ={
++                      .bLength = 
++                              sizeof(struct usb_configuration_descriptor),
++                      .bDescriptorType = USB_DT_CONFIG,
++                      .wTotalLength =  
++                              cpu_to_le16(sizeof(struct acm_config_desc)
++#ifdef CONFIG_USBD_DFU
++                                          - sizeof(struct 
usb_interface_descriptor)
++                                          - sizeof(struct 
usb_dfu_func_descriptor)
++#endif
++                                         ),
++                      .bNumInterfaces = NUM_ACM_INTERFACES,
++                      .bConfigurationValue = 2,
++                      .iConfiguration = STR_CONFIG,
++                      .bmAttributes = BMATTRIBUTE_RESERVED,
++                      .bMaxPower = 50, /* 100mA */
++              },
++              /* Interface 1 */
++              .interface_desc = {
++                      .bLength  = sizeof(struct usb_interface_descriptor),
++                      .bDescriptorType = USB_DT_INTERFACE,
++                      .bInterfaceNumber = 0,
++                      .bAlternateSetting = 0,
++                      .bNumEndpoints = 0x01,
++                      .bInterfaceClass = 
++                              COMMUNICATIONS_INTERFACE_CLASS_CONTROL,
++                      .bInterfaceSubClass = COMMUNICATIONS_ACM_SUBCLASS,
++                      .bInterfaceProtocol = COMMUNICATIONS_V25TER_PROTOCOL,
++                      .iInterface = STR_CTRL_INTERFACE,
++              },
++              .usb_class_header = {
++                      .bFunctionLength        = 
++                              sizeof(struct 
usb_class_header_function_descriptor),
++                      .bDescriptorType        = CS_INTERFACE, 
++                      .bDescriptorSubtype     = USB_ST_HEADER,
++                      .bcdCDC = cpu_to_le16(110),
++              },
++              .usb_class_call_mgt = {
++                      .bFunctionLength        = 
++                              sizeof(struct 
usb_class_call_management_descriptor),
++                      .bDescriptorType        = CS_INTERFACE,
++                      .bDescriptorSubtype     = USB_ST_CMF,
++                      .bmCapabilities         = 0x00, 
++                      .bDataInterface         = 0x01, 
++              },
++              .usb_class_acm = {
++                      .bFunctionLength        = 
++                              sizeof(struct 
usb_class_abstract_control_descriptor),
++                      .bDescriptorType        = CS_INTERFACE,
++                      .bDescriptorSubtype     = USB_ST_ACMF,  
++                      .bmCapabilities         = 0x00, 
++              },
++              .usb_class_union = {
++                      .bFunctionLength        =       
++                              sizeof(struct 
usb_class_union_function_descriptor),
++                      .bDescriptorType        = CS_INTERFACE,
++                      .bDescriptorSubtype     = USB_ST_UF,
++                      .bMasterInterface       = 0x00, 
++                      .bSlaveInterface0       = 0x01, 
++              },
++              .notification_endpoint = {
++                      .bLength =              
++                              sizeof(struct usb_endpoint_descriptor),
++                      .bDescriptorType        = USB_DT_ENDPOINT,
++                      .bEndpointAddress       = 0x01 | USB_DIR_IN,
++                      .bmAttributes           = USB_ENDPOINT_XFER_INT,
++                      .wMaxPacketSize         
++                              = cpu_to_le16(CONFIG_USBD_SERIAL_INT_PKTSIZE),
++                      .bInterval              = 0xFF,
++              },
++
++              /* Interface 2 */
++              .data_class_interface = {
++                      .bLength                = 
++                              sizeof(struct usb_interface_descriptor),
++                      .bDescriptorType        = USB_DT_INTERFACE,
++                      .bInterfaceNumber       = 0x01,
++                      .bAlternateSetting      = 0x00,
++                      .bNumEndpoints          = 0x02,
++                      .bInterfaceClass        = 
++                              COMMUNICATIONS_INTERFACE_CLASS_DATA,
++                      .bInterfaceSubClass     = DATA_INTERFACE_SUBCLASS_NONE,
++                      .bInterfaceProtocol     = DATA_INTERFACE_PROTOCOL_NONE,
++                      .iInterface             = STR_DATA_INTERFACE,
++              },
++              .data_endpoints = {
++                      {
++                              .bLength                = 
++                                      sizeof(struct usb_endpoint_descriptor),
++                              .bDescriptorType        = USB_DT_ENDPOINT,
++                              .bEndpointAddress       = 0x02 | USB_DIR_OUT,
++                              .bmAttributes           = 
++                                      USB_ENDPOINT_XFER_BULK,
++                              .wMaxPacketSize         = 
++                                      
cpu_to_le16(CONFIG_USBD_SERIAL_BULK_PKTSIZE),
++                              .bInterval              = 0xFF,
++                      },
++                      {
++                              .bLength                = 
++                                      sizeof(struct usb_endpoint_descriptor),
++                              .bDescriptorType        = USB_DT_ENDPOINT,
++                              .bEndpointAddress       = 0x03 | USB_DIR_IN,
++                              .bmAttributes           = 
++                                      USB_ENDPOINT_XFER_BULK,
++                              .wMaxPacketSize         = 
++                                      
cpu_to_le16(CONFIG_USBD_SERIAL_BULK_PKTSIZE),
++                              .bInterval              = 0xFF,
++                      },
++              },
++              /* We don't add the DFU functional descriptor here since we only
++               * want to do DFU in the high-current charging mode for safety 
reasons */
++      },
++
+ };    
+ 
+ static struct rs232_emu rs232_desc={
+@@ -330,8 +443,7 @@
+                       .bNumInterfaces = NUM_GSERIAL_INTERFACES,
+                       .bConfigurationValue = 1,
+                       .iConfiguration = STR_CONFIG,
+-                      .bmAttributes = 
+-                              BMATTRIBUTE_SELF_POWERED|BMATTRIBUTE_RESERVED,
++                      .bmAttributes = BMATTRIBUTE_RESERVED,
+                       .bMaxPower = USBTTY_MAXPOWER
+               },
+               .interface_desc = {
+@@ -384,6 +496,68 @@
+                       },
+               },
+       },
++      {
++              .configuration_desc ={
++                      .bLength = sizeof(struct usb_configuration_descriptor),
++                      .bDescriptorType = USB_DT_CONFIG,
++                      .wTotalLength =  
++                              cpu_to_le16(sizeof(struct gserial_config_desc)),
++                      .bNumInterfaces = NUM_GSERIAL_INTERFACES,
++                      .bConfigurationValue = 1,
++                      .iConfiguration = STR_CONFIG,
++                      .bmAttributes = BMATTRIBUTE_RESERVED,
++                      .bMaxPower = 50
++              },
++              .interface_desc = {
++                      {
++                              .bLength  = 
++                                      sizeof(struct usb_interface_descriptor),
++                              .bDescriptorType = USB_DT_INTERFACE,
++                              .bInterfaceNumber = 0,
++                              .bAlternateSetting = 0,
++                              .bNumEndpoints = NUM_ENDPOINTS,
++                              .bInterfaceClass = 
++                                      COMMUNICATIONS_INTERFACE_CLASS_VENDOR,
++                              .bInterfaceSubClass = 
++                                      COMMUNICATIONS_NO_SUBCLASS,
++                              .bInterfaceProtocol = 
++                                      COMMUNICATIONS_NO_PROTOCOL,
++                              .iInterface = STR_DATA_INTERFACE
++                      },
++              },
++              .data_endpoints  = {
++                      {
++                              .bLength =              
++                                      sizeof(struct usb_endpoint_descriptor),
++                              .bDescriptorType =      USB_DT_ENDPOINT,
++                              .bEndpointAddress =     0x01 | USB_DIR_OUT,
++                              .bmAttributes =         USB_ENDPOINT_XFER_BULK,
++                              .wMaxPacketSize =       
++                                      
cpu_to_le16(CONFIG_USBD_SERIAL_OUT_PKTSIZE),
++                              .bInterval=             0xFF,
++                      },
++                      {
++                              .bLength =              
++                                      sizeof(struct usb_endpoint_descriptor),
++                              .bDescriptorType =      USB_DT_ENDPOINT,
++                              .bEndpointAddress =     0x02 | USB_DIR_IN,
++                              .bmAttributes =         USB_ENDPOINT_XFER_BULK,
++                              .wMaxPacketSize =       
++                                      
cpu_to_le16(CONFIG_USBD_SERIAL_IN_PKTSIZE),
++                              .bInterval =            0xFF,
++                      },
++                      {
++                              .bLength =              
++                                      sizeof(struct usb_endpoint_descriptor),
++                              .bDescriptorType =      USB_DT_ENDPOINT,
++                              .bEndpointAddress =     0x03 | USB_DIR_IN,
++                              .bmAttributes =         USB_ENDPOINT_XFER_INT,
++                              .wMaxPacketSize =       
++                                      
cpu_to_le16(CONFIG_USBD_SERIAL_INT_PKTSIZE),
++                              .bInterval =            0xFF,
++                      },
++              },
++      },
+ };
+ 
+ /*
+@@ -679,12 +853,14 @@
+       bus_instance->maxpacketsize = 64;
+       bus_instance->serial_number_str = serial_number;
+ 
+-      /* configuration instance */
+-      memset (config_instance, 0,
+-              sizeof (struct usb_configuration_instance));
+-      config_instance->interfaces = interface_count;
+-      config_instance->configuration_descriptor = configuration_descriptor;
+-      config_instance->interface_instance_array = interface_instance;
++      /* configuration instances */
++      for (i = 0; i < NUM_CONFIGS; i++) {
++              memset(&config_instance[i], 0, sizeof(config_instance));
++              config_instance[i].interfaces = interface_count;
++              /* FIXME: this breaks for the non-ACM case */
++              config_instance[i].configuration_descriptor = 
&acm_configuration_descriptors[i];
++              config_instance[i].interface_instance_array = 
interface_instance;
++      }
+ 
+       /* interface instance */
+       memset (interface_instance, 0,
+@@ -1043,9 +1219,23 @@
+               usbtty_configured_flag = 0;
+               break;
+       case DEVICE_CONFIGURED:
++              printf("DEVICE_CONFIGURED: %u\n", device->configuration);
++#if 1
++              /* FIXME: This needs to be device specific */
++              if (device->configuration == 1)
++                      pcf50606_charge_autofast(1);
++              else
++                      pcf50606_charge_autofast(0);
++#endif
+               usbtty_configured_flag = 1;
+               break;
+-
++      case DEVICE_DE_CONFIGURED:
++              printf("DEVICE_DE_CONFIGURED\n");
++#if 1
++              /* FIXME: This needs to be device specific */
++              pcf50606_charge_autofast(0);
++#endif
++              break;
+       case DEVICE_ADDRESS_ASSIGNED:
+               usbtty_init_endpoints ();
+ 
+Index: u-boot/drivers/usbtty.h
+===================================================================
+--- u-boot.orig/drivers/usbtty.h       2007-03-14 20:37:15.000000000 +0100
++++ u-boot/drivers/usbtty.h    2007-03-14 20:37:41.000000000 +0100
+@@ -60,7 +60,7 @@
+ #define USBTTY_DEVICE_CLASS   COMMUNICATIONS_DEVICE_CLASS
+ 
+ #define USBTTY_BCD_DEVICE     0x00
+-#define USBTTY_MAXPOWER       0x00
++#define USBTTY_MAXPOWER       250     /* 500mA */
+ 
+ #define STR_LANG              0x00
+ #define STR_MANUFACTURER      0x01

Modified: trunk/src/target/u-boot/patches/series
===================================================================
--- trunk/src/target/u-boot/patches/series      2007-03-14 19:53:40 UTC (rev 
1363)
+++ trunk/src/target/u-boot/patches/series      2007-03-14 19:54:34 UTC (rev 
1364)
@@ -65,3 +65,5 @@
 uboot-neo1973-defaultenv.patch
 uboot-nand-markbad-reallybad.patch
 mmc-fixes.patch
+usbdcore-multiple_configs.patch
+neo1973-chargefast.patch

Added: trunk/src/target/u-boot/patches/usbdcore-multiple_configs.patch
===================================================================
--- trunk/src/target/u-boot/patches/usbdcore-multiple_configs.patch     
2007-03-14 19:53:40 UTC (rev 1363)
+++ trunk/src/target/u-boot/patches/usbdcore-multiple_configs.patch     
2007-03-14 19:54:34 UTC (rev 1364)
@@ -0,0 +1,63 @@
+This patch fixes bugs in usbdcore*.c related to the use of devices
+with multiple configurations.
+
+The original code made mistakes about the meaning of configuration value and
+configuration index, and the resulting off-by-one errors resulted in:
+
+* SET_CONFIGURATION always selected the first configuration, no matter what
+  wValue is being passed.
+* GET_DESCRIPTOR/CONFIGURATION always returned the descriptor for the first
+  configuration (index 0).
+
+Signed-off-by: Harald Welte <[EMAIL PROTECTED]>
+
+Index: u-boot/drivers/usbdcore_ep0.c
+===================================================================
+--- u-boot.orig/drivers/usbdcore_ep0.c 2007-03-14 20:29:05.000000000 +0100
++++ u-boot/drivers/usbdcore_ep0.c      2007-03-14 20:29:06.000000000 +0100
+@@ -233,8 +233,8 @@
+                               return -1;
+                       }
+                       /*dbg_ep0(2, "%d %d", index, 
device_descriptor->bNumConfigurations); */
+-                      if (index > device_descriptor->bNumConfigurations) {
+-                              dbg_ep0 (0, "index too large: %d > %d", index,
++                      if (index >= device_descriptor->bNumConfigurations) {
++                              dbg_ep0 (0, "index too large: %d >= %d", index,
+                                        device_descriptor->
+                                        bNumConfigurations);
+                               return -1;
+@@ -593,13 +593,8 @@
+ 
+               case USB_REQ_SET_CONFIGURATION:
+                       /* c.f. 9.4.7 - the top half of wValue is reserved */
+-                      /* */
+-                      if ((device->configuration =
+-                           le16_to_cpu (request->wValue) & 0x7f) != 0) {
+-                              /* c.f. 9.4.7 - zero is the default or 
addressed state, in our case this */
+-                              /* is the same is configuration zero */
+-                              device->configuration = 0;      /* TBR - ?????? 
*/
+-                      }
++                      device->configuration = le16_to_cpu(request->wValue) & 
0xff;
++
+                       /* reset interface and alternate settings */
+                       device->interface = device->alternate = 0;
+ 
+Index: u-boot/drivers/usbdcore.c
+===================================================================
+--- u-boot.orig/drivers/usbdcore.c     2007-03-14 20:29:05.000000000 +0100
++++ u-boot/drivers/usbdcore.c  2007-03-14 20:37:37.000000000 +0100
+@@ -147,12 +147,9 @@
+ static struct usb_configuration_instance *usbd_device_configuration_instance 
(struct usb_device_instance *device,
+               unsigned int port, unsigned int configuration)
+ {
+-      /* XXX */
+-      configuration = configuration ? configuration - 1 : 0;
+-
+-      if (configuration >= device->configurations) {
++      if (configuration >= device->configurations)
+               return NULL;
+-      }
++
+       return device->configuration_instance_array + configuration;
+ }
+ 




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-03-15 02:05:17 +0100 (Thu, 15 Mar 2007)
New Revision: 1365

Modified:
   trunk/src/host/devirginator/environment.in
Log:
- ${mtdparts} was missing in menu_1 bootargs
- added sd_image_name mechanism from
  http://wiki.openmoko.org/wiki/Booting_from_SD



Modified: trunk/src/host/devirginator/environment.in
===================================================================
--- trunk/src/host/devirginator/environment.in  2007-03-14 19:54:34 UTC (rev 
1364)
+++ trunk/src/host/devirginator/environment.in  2007-03-15 01:05:17 UTC (rev 
1365)
@@ -27,12 +27,15 @@
 stderr=usbtty
 stdin=usbtty
 
+sd_image_name=uImage
+
 menu_1=
   Boot from microSD:
   setenv bootargs
-    ${bootargs_base} rootfstype=ext2 rootfs=/dev/mmcblk0p1 rootdelay=5;
+    ${bootargs_base} rootfstype=ext2 rootfs=/dev/mmcblk0p1 rootdelay=5
+    ${mtdparts};
   mmcinit;
-  ext2load mmc 0 0x32000000 uImage;
+  ext2load mmc 0 0x32000000 /boot/${sd_image_name};
   bootm 0x32000000
 
 menu_2=




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

Reply via email to