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. r3873 - trunk/src/target/ipkg ([EMAIL PROTECTED])
2. r3874 - trunk/src/target/kernel/patches ([EMAIL PROTECTED])
3. r3875 - branches/src/target/kernel/2.6.24.x/patches
([EMAIL PROTECTED])
4. r3876 - in trunk/src/target/gsm: include/gsmd src/gsmd
src/libgsmd src/util ([EMAIL PROTECTED])
5. r3877 - branches/src/target/kernel/2.6.24.x/patches
([EMAIL PROTECTED])
--- Begin Message ---
Author: thomas
Date: 2008-01-17 19:07:09 +0100 (Thu, 17 Jan 2008)
New Revision: 3873
Modified:
trunk/src/target/ipkg/ipkg_download.c
Log:
ipkg: add a simple progress bar while downloading
Modified: trunk/src/target/ipkg/ipkg_download.c
===================================================================
--- trunk/src/target/ipkg/ipkg_download.c 2008-01-17 17:16:13 UTC (rev
3872)
+++ trunk/src/target/ipkg/ipkg_download.c 2008-01-17 18:07:09 UTC (rev
3873)
@@ -4,6 +4,7 @@
Carl D. Worth
Copyright (C) 2001 University of Southern California
+ Copyright (C) 2008 OpenMoko Inc
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -27,6 +28,29 @@
#include "file_util.h"
#include "str_util.h"
+
+int
+curl_progress_func (void* data,
+ double t, /* dltotal */
+ double d, /* dlnow */
+ double ultotal,
+ double ulnow)
+{
+ int i;
+ int p = d*100/t;
+ printf ("\r%3d%% |", p);
+ for (i = 1; i < 73; i++)
+ {
+ if (i <= p)
+ printf ("=");
+ else
+ printf ("-");
+ }
+ printf ("|");
+ fflush(stdout);
+ return 0;
+}
+
int ipkg_download(ipkg_conf_t *conf, const char *src, const char
*dest_file_name)
{
int err = 0;
@@ -99,12 +123,14 @@
CURL *curl;
CURLcode res;
FILE * file = fopen (tmp_file_location, "w");
-
+
curl = curl_easy_init ();
if (curl)
{
curl_easy_setopt (curl, CURLOPT_URL, src);
curl_easy_setopt (curl, CURLOPT_WRITEDATA, file);
+ curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0);
+ curl_easy_setopt (curl, CURLOPT_PROGRESSFUNCTION, curl_progress_func);
res = curl_easy_perform (curl);
curl_easy_cleanup (curl);
fclose (file);
@@ -113,6 +139,8 @@
else
return -1;
+ printf ("\n");
+
err = file_move(tmp_file_location, dest_file_name);
free(tmp_file_location);
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-01-17 19:08:02 +0100 (Thu, 17 Jan 2008)
New Revision: 3874
Added:
trunk/src/target/kernel/patches/fix-hwecc-2410.patch
Modified:
trunk/src/target/kernel/patches/series
Log:
NAND ECC error correction mis-calculated the bit position, thus turning a
correctable single-bit error into two errors. Fittingly, also reported
uncorrectable errors as success.
Note that, unlike 2.6.24, 2.6.22.5 requires ecc.correct to return -1 to signal
an uncorrectable error, not just any negative value. So this patch is not
identical to the one in the 2.6.24 tree.
series:
- added fix-hwecc-2410.patch
fix-hwecc-2410.patch:
- drivers/mtd/nand/s3c2410.c (s3c2410_nand_correct_data): use Pn bits to
calculate error position, not Pn'
- drivers/mtd/nand/s3c2410.c (s3c2410_nand_correct_data): don't report
uncorrectable errors as "no error"
Added: trunk/src/target/kernel/patches/fix-hwecc-2410.patch
===================================================================
--- trunk/src/target/kernel/patches/fix-hwecc-2410.patch 2008-01-17
18:07:09 UTC (rev 3873)
+++ trunk/src/target/kernel/patches/fix-hwecc-2410.patch 2008-01-17
18:08:02 UTC (rev 3874)
@@ -0,0 +1,59 @@
+S3C24xx ECC mis-calculates the bit to flip:
+http://lists.infradead.org/pipermail/linux-mtd/2007-October/019586.html
+If the error couldn't be corrected, we returned "no problem" :-(
+http://lists.infradead.org/pipermail/linux-mtd/2007-October/019615.html
+
+Note that, unlike 2.6.24, 2.6.22.5 requires ecc.correct to return -1 to signal
+an uncorrectable error, not just any negative value.
+
+Signed-off-by: Werner Almesberger <[EMAIL PROTECTED]>
+
+Index: linux-2.6.24-rc7/drivers/mtd/nand/s3c2410.c
+===================================================================
+--- linux-2.6.24-rc7.orig/drivers/mtd/nand/s3c2410.c
++++ linux-2.6.24-rc7/drivers/mtd/nand/s3c2410.c
+@@ -364,23 +364,21 @@
+ ((diff2 ^ (diff2 >> 1)) & 0x55) == 0x55) {
+ /* calculate the bit position of the error */
+
+- bit = (diff2 >> 2) & 1;
+- bit |= (diff2 >> 3) & 2;
+- bit |= (diff2 >> 4) & 4;
++ bit = ((diff2 >> 3) & 1) |
++ ((diff2 >> 4) & 2) |
++ ((diff2 >> 5) & 4);
+
+ /* calculate the byte position of the error */
+
+- byte = (diff1 << 1) & 0x80;
+- byte |= (diff1 << 2) & 0x40;
+- byte |= (diff1 << 3) & 0x20;
+- byte |= (diff1 << 4) & 0x10;
+-
+- byte |= (diff0 >> 3) & 0x08;
+- byte |= (diff0 >> 2) & 0x04;
+- byte |= (diff0 >> 1) & 0x02;
+- byte |= (diff0 >> 0) & 0x01;
+-
+- byte |= (diff2 << 8) & 0x100;
++ byte = ((diff2 << 7) & 0x100) |
++ ((diff1 << 0) & 0x80) |
++ ((diff1 << 1) & 0x40) |
++ ((diff1 << 2) & 0x20) |
++ ((diff1 << 3) & 0x10) |
++ ((diff0 >> 4) & 0x08) |
++ ((diff0 >> 3) & 0x04) |
++ ((diff0 >> 2) & 0x02) |
++ ((diff0 >> 1) & 0x01);
+
+ dev_dbg(info->device, "correcting error bit %d, byte %d\n",
+ bit, byte);
+@@ -399,7 +397,7 @@
+ if ((diff0 & ~(1<<fls(diff0))) == 0)
+ return 1;
+
+- return 0;
++ return -1;
+ }
+
+ /* ECC functions
Modified: trunk/src/target/kernel/patches/series
===================================================================
--- trunk/src/target/kernel/patches/series 2008-01-17 18:07:09 UTC (rev
3873)
+++ trunk/src/target/kernel/patches/series 2008-01-17 18:08:02 UTC (rev
3874)
@@ -58,3 +58,5 @@
# work in progress. hangs the kernel, if enabled.
gta02-acc.patch
gta02-leds.patch
+# bad bug
+fix-hwecc-2410.patch
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-01-17 23:40:29 +0100 (Thu, 17 Jan 2008)
New Revision: 3875
Added:
branches/src/target/kernel/2.6.24.x/patches/gta02-bt-fixes.patch
branches/src/target/kernel/2.6.24.x/patches/pcf506xx.patch
Modified:
branches/src/target/kernel/2.6.24.x/patches/series
Log:
Increase BT voltage from 2.5V to 3.2V on GTA02, enable/disable the regulator
to control BT power, and assorted build fixes.
series: added pcf506xx.patch and gta02-bt-fixes.patch
pcf506xx.patch:
- include/linux/pcf50606.h (struct pmu_voltage_rail, enum pmu_event, pmu_cb):
moved to pcf506xx.h
- include/linux/pcf50633.h (struct pmu_voltage_rail, enum pmu_event, pmu_cb):
moved to pcf506xx.h
gta02-bt-fixes.patch:
- arch/arm/mach-s3c2440/mach-gta02.c (gta02_pcf_pdata): raised maximum voltage
of LDO4 from 2.5V to 3.3V
- arch/arm/plat-s3c24xx/neo1973_pm_bt.c (bt_read, bt_write, gta01_bt_probe):
allow compilation with one of GTA01 and GTA02 or both enabled
- arch/arm/plat-s3c24xx/neo1973_pm_bt.c (bt_write): when enabling BT on the
GTA02, raise the LDO4 voltage to 3.2V and enable the regulator
- arch/arm/plat-s3c24xx/neo1973_pm_bt.c (gta01_bt_probe): don't set
GTA01_GPIO_BT_EN om the GTA02
- drivers/i2c/chips/pcf50633.c (ena_regulator_registers): regulator to enable
register mapping
- drivers/i2c/chips/pcf50633.c, include/linux/pcf50633.h
(pcf50633_ena_voltage): enable/disable a voltage regulator
Added: branches/src/target/kernel/2.6.24.x/patches/gta02-bt-fixes.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/gta02-bt-fixes.patch
2008-01-17 18:08:02 UTC (rev 3874)
+++ branches/src/target/kernel/2.6.24.x/patches/gta02-bt-fixes.patch
2008-01-17 22:40:29 UTC (rev 3875)
@@ -0,0 +1,260 @@
+Modify GTA02 power manager for bluetooth.
+
+From: Willie <[EMAIL PROTECTED]>
+
+1. Default power value isn't correct. Now we set pcf50633 LDO4 to 3.2 voltage.
+
+2. Separate GTA01 and GTA02 source code.
+
+3. Add pcf50633 API for enable register.
+---
+
+ arch/arm/mach-s3c2440/mach-gta02.c | 4 +-
+ arch/arm/plat-s3c24xx/neo1973_pm_bt.c | 42 +++++++++++++++++++++--
+ drivers/i2c/chips/pcf50633.c | 59 +++++++++++++++++++++++++++++++++
+ include/linux/pcf50633.h | 11 ++++++
+ 4 files changed, 109 insertions(+), 7 deletions(-)
+
+
+Index: linux-2.6.24-rc7/arch/arm/mach-s3c2440/mach-gta02.c
+===================================================================
+--- linux-2.6.24-rc7.orig/arch/arm/mach-s3c2440/mach-gta02.c
++++ linux-2.6.24-rc7/arch/arm/mach-s3c2440/mach-gta02.c
+@@ -209,10 +209,10 @@
+ },
+ },
+ [PCF50633_REGULATOR_LDO4] = {
+- .name = "gl_2v5",
++ .name = "bt_3v2",
+ .voltage = {
+ .init = 2500,
+- .max = 2500,
++ .max = 3300,
+ },
+ },
+ [PCF50633_REGULATOR_LDO5] = {
+Index: linux-2.6.24-rc7/arch/arm/plat-s3c24xx/neo1973_pm_bt.c
+===================================================================
+--- linux-2.6.24-rc7.orig/arch/arm/plat-s3c24xx/neo1973_pm_bt.c
++++ linux-2.6.24-rc7/arch/arm/plat-s3c24xx/neo1973_pm_bt.c
+@@ -16,12 +16,19 @@
+ #include <linux/kernel.h>
+ #include <linux/platform_device.h>
+
+-#include <linux/pcf50606.h>
+-
+ #include <asm/hardware.h>
+ #include <asm/mach-types.h>
++
++#ifdef CONFIG_MACH_NEO1973_GTA01
+ #include <asm/arch/gta01.h>
++#include <linux/pcf50606.h>
++#endif
++
++#ifdef CONFIG_MACH_NEO1973_GTA02
+ #include <asm/arch/gta02.h>
++#include <linux/pcf50633.h>
++#endif
++
+
+ #define DRVMSG "FIC Neo1973 Bluetooth Power Management"
+
+@@ -30,6 +37,8 @@
+ {
+ if (!strcmp(attr->attr.name, "power_on")) {
+ switch (machine_arch_type) {
++
++#ifdef CONFIG_MACH_NEO1973_GTA01
+ case MACH_TYPE_NEO1973_GTA01:
+ if (pcf50606_onoff_get(pcf50606_global,
+ PCF50606_REGULATOR_D1REG) &&
+@@ -37,21 +46,33 @@
+ PCF50606_REGULATOR_D1REG) ==
3100)
+ goto out_1;
+ break;
++#endif /* CONFIG_MACH_NEO1973_GTA01 */
++
++#ifdef CONFIG_MACH_NEO1973_GTA02
+ case MACH_TYPE_NEO1973_GTA02:
+ if (s3c2410_gpio_getpin(GTA02_GPIO_BT_EN))
+ goto out_1;
+ break;
++#endif /* CONFIG_MACH_NEO1973_GTA02 */
++
+ }
+ } else if (!strcmp(attr->attr.name, "reset")) {
+ switch (machine_arch_type) {
++
++#ifdef CONFIG_MACH_NEO1973_GTA01
+ case MACH_TYPE_NEO1973_GTA01:
+ if (s3c2410_gpio_getpin(GTA01_GPIO_BT_EN) == 0)
+ goto out_1;
+ break;
++#endif /* CONFIG_MACH_NEO1973_GTA01 */
++
++#ifdef CONFIG_MACH_NEO1973_GTA02
+ case MACH_TYPE_NEO1973_GTA02:
+ if (s3c2410_gpio_getpin(GTA02_GPIO_BT_EN) == 0)
+ goto out_1;
+ break;
++#endif /* CONFIG_MACH_NEO1973_GTA02 */
++
+ }
+ }
+
+@@ -64,9 +85,12 @@
+ const char *buf, size_t count)
+ {
+ unsigned long on = simple_strtoul(buf, NULL, 10);
++ unsigned int vol;
+
+ if (!strcmp(attr->attr.name, "power_on")) {
+ switch (machine_arch_type) {
++
++#ifdef CONFIG_MACH_NEO1973_GTA01
+ case MACH_TYPE_NEO1973_GTA01:
+ /* if we are powering up, assert reset, then power,
+ * then release reset */
+@@ -80,22 +104,39 @@
+ PCF50606_REGULATOR_D1REG, on);
+ s3c2410_gpio_setpin(GTA01_GPIO_BT_EN, on);
+ break;
++#endif /* CONFIG_MACH_NEO1973_GTA01 */
++
++#ifdef CONFIG_MACH_NEO1973_GTA02
+ case MACH_TYPE_NEO1973_GTA02:
++ s3c2410_gpio_setpin(GTA02_GPIO_BT_EN, on ? 0 : 1);
+ if (on)
+- s3c2410_gpio_setpin(GTA02_GPIO_BT_EN, 0);
+- else
+- s3c2410_gpio_setpin(GTA02_GPIO_BT_EN, 1);
++ pcf50633_voltage_set(pcf50633_global,
++ PCF50633_REGULATOR_LDO4, 3200);
++ pcf50633_ena_voltage(pcf50633_global,
++ PCF50633_REGULATOR_LDO4, on);
++ vol = pcf50633_voltage_get(pcf50633_global,
++ PCF50633_REGULATOR_LDO4);
++ dev_info(dev, "GTA02 Set PCF50633 LDO4 = %d\n", vol);
+ break;
++#endif /* CONFIG_MACH_NEO1973_GTA02 */
++
+ }
+ } else if (!strcmp(attr->attr.name, "reset")) {
+ /* reset is low-active, so we need to invert */
+ switch (machine_arch_type) {
++
++#ifdef CONFIG_MACH_NEO1973_GTA01
+ case MACH_TYPE_NEO1973_GTA01:
+ s3c2410_gpio_setpin(GTA01_GPIO_BT_EN, on ? 0 : 1);
+ break;
++#endif /* CONFIG_MACH_NEO1973_GTA01 */
++
++#ifdef CONFIG_MACH_NEO1973_GTA02
+ case MACH_TYPE_NEO1973_GTA02:
+ s3c2410_gpio_setpin(GTA02_GPIO_BT_EN, on ? 0 : 1);
+ break;
++#endif /* CONFIG_MACH_NEO1973_GTA02 */
++
+ }
+ }
+
+@@ -143,18 +184,25 @@
+ dev_info(&pdev->dev, DRVMSG ": starting\n");
+
+ switch (machine_arch_type) {
++
++#ifdef CONFIG_MACH_NEO1973_GTA01
+ case MACH_TYPE_NEO1973_GTA01:
+ /* we make sure that the voltage is off */
+ pcf50606_onoff_set(pcf50606_global,
+ PCF50606_REGULATOR_D1REG, 0);
++ /* we pull reset to low to make sure that the chip doesn't
++ * drain power through the reset line */
++ s3c2410_gpio_setpin(GTA01_GPIO_BT_EN, 0);
+ break;
++#endif /* CONFIG_MACH_NEO1973_GTA01 */
++
++#ifdef CONFIG_MACH_NEO1973_GTA02
+ case MACH_TYPE_NEO1973_GTA02:
+ /* FIXME: implementation */
+ break;
++#endif /* CONFIG_MACH_NEO1973_GTA02 */
++
+ }
+- /* we pull reset to low to make sure that the chip doesn't
+- * drain power through the reset line */
+- s3c2410_gpio_setpin(GTA01_GPIO_BT_EN, 0);
+
+ return sysfs_create_group(&pdev->dev.kobj, >a01_bt_attr_group);
+ }
+Index: linux-2.6.24-rc7/drivers/i2c/chips/pcf50633.c
+===================================================================
+--- linux-2.6.24-rc7.orig/drivers/i2c/chips/pcf50633.c
++++ linux-2.6.24-rc7/drivers/i2c/chips/pcf50633.c
+@@ -319,6 +319,20 @@
+ [PCF50633_REGULATOR_HCLDO] = PCF50633_REG_HCLDOOUT,
+ };
+
++static const u_int8_t ena_regulator_registers[__NUM_PCF50633_REGULATORS] = {
++ [PCF50633_REGULATOR_AUTO] = PCF50633_REG_AUTOENA,
++ [PCF50633_REGULATOR_DOWN1] = PCF50633_REG_DOWN1ENA,
++ [PCF50633_REGULATOR_DOWN2] = PCF50633_REG_DOWN2ENA,
++ [PCF50633_REGULATOR_MEMLDO] = PCF50633_REG_MEMLDOENA,
++ [PCF50633_REGULATOR_LDO1] = PCF50633_REG_LDO1ENA,
++ [PCF50633_REGULATOR_LDO2] = PCF50633_REG_LDO2ENA,
++ [PCF50633_REGULATOR_LDO3] = PCF50633_REG_LDO3ENA,
++ [PCF50633_REGULATOR_LDO4] = PCF50633_REG_LDO4ENA,
++ [PCF50633_REGULATOR_LDO5] = PCF50633_REG_LDO5ENA,
++ [PCF50633_REGULATOR_LDO6] = PCF50633_REG_LDO6ENA,
++ [PCF50633_REGULATOR_HCLDO] = PCF50633_REG_HCLDOENA,
++};
++
+ int pcf50633_onoff_set(struct pcf50633_data *pcf,
+ enum pcf50633_regulator_id reg, int on)
+ {
+@@ -401,6 +415,29 @@
+ }
+ EXPORT_SYMBOL_GPL(pcf50633_voltage_set);
+
++int pcf50633_ena_voltage(struct pcf50633_data *pcf,
++ enum pcf50633_regulator_id reg,
++ u_int8_t on)
++{
++ u_int8_t regnr;
++
++ DEBUGP("pcf=%p, reg=%d", pcf, reg);
++
++ if(reg >= __NUM_PCF50633_REGULATORS)
++ return -EINVAL;
++
++ regnr = ena_regulator_registers[reg];
++ BUG_ON(regnr); /* in case we forgot one */
++
++ if (on)
++ reg_set_bit_mask(pcf, regnr, 0x01, 0x01);
++ else
++ reg_set_bit_mask(pcf, regnr, 0x01, 0x00);
++
++ return 0;
++}
++EXPORT_SYMBOL_GPL(pcf50633_ena_voltage);
++
+ unsigned int pcf50633_voltage_get(struct pcf50633_data *pcf,
+ enum pcf50633_regulator_id reg)
+ {
+Index: linux-2.6.24-rc7/include/linux/pcf50633.h
+===================================================================
+--- linux-2.6.24-rc7.orig/include/linux/pcf50633.h
++++ linux-2.6.24-rc7/include/linux/pcf50633.h
+@@ -47,6 +47,11 @@
+ pcf50633_voltage_get(struct pcf50633_data *pcf,
+ enum pcf50633_regulator_id reg);
+ extern int
++pcf50633_ena_voltage(struct pcf50633_data *pcf,
++ enum pcf50633_regulator_id reg,
++ u_int8_t on);
++
++extern int
+ pcf50633_onoff_get(struct pcf50633_data *pcf,
+ enum pcf50633_regulator_id reg);
+
Added: branches/src/target/kernel/2.6.24.x/patches/pcf506xx.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/pcf506xx.patch 2008-01-17
18:08:02 UTC (rev 3874)
+++ branches/src/target/kernel/2.6.24.x/patches/pcf506xx.patch 2008-01-17
22:40:29 UTC (rev 3875)
@@ -0,0 +1,132 @@
+Moved shared PMU code from pcf50606.h and pcf50633.h (which prevented inclusion
+of both at the same time) to pcf506xx.h
+
+- include/linux/pcf50606.h (struct pmu_voltage_rail, enum pmu_event, pmu_cb):
+ moved to pcf506xx.h
+- include/linux/pcf50633.h (struct pmu_voltage_rail, enum pmu_event, pmu_cb):
+ moved to pcf506xx.h
+
+Signed off-by: Werner Almesberger <[EMAIL PROTECTED]>
+
+Index: linux-2.6.24-rc7/include/linux/pcf50606.h
+===================================================================
+--- linux-2.6.24-rc7.orig/include/linux/pcf50606.h
++++ linux-2.6.24-rc7/include/linux/pcf50606.h
+@@ -1,6 +1,9 @@
+ #ifndef _LINUX_PCF50606_H
+ #define _LINUX_PCF50606_H
+
++#include <linux/pcf506xx.h>
++
++
+ /* public in-kernel pcf50606 api */
+ enum pcf50606_regulator_id {
+ PCF50606_REGULATOR_DCD,
+@@ -48,26 +51,6 @@
+ extern void
+ pcf50606_charge_fast(struct pcf50606_data *pcf, int on);
+
+-#define PMU_VRAIL_F_SUSPEND_ON 0x00000001 /* Remains on during
suspend */
+-#define PMU_VRAIL_F_UNUSED 0x00000002 /* This rail is not used */
+-struct pmu_voltage_rail {
+- char *name;
+- unsigned int flags;
+- struct {
+- unsigned int init;
+- unsigned int max;
+- } voltage;
+-};
+-
+-enum pmu_event {
+- PMU_EVT_NONE,
+- PMU_EVT_INSERT,
+- PMU_EVT_REMOVE,
+- __NUM_PMU_EVTS
+-};
+-
+-typedef int pmu_cb(struct device *dev, unsigned int feature,
+- enum pmu_event event);
+
+ #define PCF50606_FEAT_EXTON 0x00000001 /* not yet supported */
+ #define PCF50606_FEAT_MBC 0x00000002
+Index: linux-2.6.24-rc7/include/linux/pcf50633.h
+===================================================================
+--- linux-2.6.24-rc7.orig/include/linux/pcf50633.h
++++ linux-2.6.24-rc7/include/linux/pcf50633.h
+@@ -1,6 +1,9 @@
+ #ifndef _LINUX_PCF50633_H
+ #define _LINUX_PCF50633_H
+
++#include <linux/pcf506xx.h>
++
++
+ /* public in-kernel pcf50633 api */
+ enum pcf50633_regulator_id {
+ PCF50633_REGULATOR_AUTO,
+@@ -57,30 +60,6 @@
+ extern void
+ pcf50633_charge_enable(struct pcf50633_data *pcf, int on);
+
+-/* FIXME: sharded with pcf50606 */
+-#define PMU_VRAIL_F_SUSPEND_ON 0x00000001 /* Remains on during
suspend */
+-#define PMU_VRAIL_F_UNUSED 0x00000002 /* This rail is not used */
+-struct pmu_voltage_rail {
+- char *name;
+- unsigned int flags;
+- struct {
+- unsigned int init;
+- unsigned int max;
+- } voltage;
+-};
+-
+-enum pmu_event {
+- PMU_EVT_NONE,
+- PMU_EVT_INSERT,
+- PMU_EVT_REMOVE,
+- PMU_EVT_USB_INSERT,
+- PMU_EVT_USB_REMOVE,
+- __NUM_PMU_EVTS
+-};
+-
+-typedef int pmu_cb(struct device *dev, unsigned int feature,
+- enum pmu_event event);
+-
+ #define PCF50633_FEAT_EXTON 0x00000001 /* not yet supported */
+ #define PCF50633_FEAT_MBC 0x00000002
+ #define PCF50633_FEAT_BBC 0x00000004 /* not yet supported */
+Index: linux-2.6.24-rc7/include/linux/pcf506xx.h
+===================================================================
+--- /dev/null
++++ linux-2.6.24-rc7/include/linux/pcf506xx.h
+@@ -0,0 +1,31 @@
++#ifndef _LINUX_PCF506XX_H
++#define _LINUX_PCF506XX_H
++
++
++#define PMU_VRAIL_F_SUSPEND_ON 0x00000001 /* Remains on during
suspend */
++#define PMU_VRAIL_F_UNUSED 0x00000002 /* This rail is not used */
++struct pmu_voltage_rail {
++ char *name;
++ unsigned int flags;
++ struct {
++ unsigned int init;
++ unsigned int max;
++ } voltage;
++};
++
++enum pmu_event {
++ PMU_EVT_NONE,
++ PMU_EVT_INSERT,
++ PMU_EVT_REMOVE,
++#ifdef CONFIG_SENSORS_PCF50633
++ PMU_EVT_USB_INSERT,
++ PMU_EVT_USB_REMOVE,
++#endif
++ __NUM_PMU_EVTS
++};
++
++typedef int pmu_cb(struct device *dev, unsigned int feature,
++ enum pmu_event event);
++
++
++#endif /* !_LINUX_PCF506XX_H */
Modified: branches/src/target/kernel/2.6.24.x/patches/series
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/series 2008-01-17 18:08:02 UTC
(rev 3874)
+++ branches/src/target/kernel/2.6.24.x/patches/series 2008-01-17 22:40:29 UTC
(rev 3875)
@@ -50,6 +50,8 @@
lis302dl.patch
gta02-leds.patch
gta02-acc.patch
+pcf506xx.patch
+gta02-bt-fixes.patch
# additional local stuff
yaffs2-20070905.patch
--- End Message ---
--- Begin Message ---
Author: erin_yueh
Date: 2008-01-18 10:15:33 +0100 (Fri, 18 Jan 2008)
New Revision: 3876
Modified:
trunk/src/target/gsm/include/gsmd/usock.h
trunk/src/target/gsm/src/gsmd/usock.c
trunk/src/target/gsm/src/libgsmd/libgsmd_network.c
trunk/src/target/gsm/src/util/shell.c
Log:
gsmd: add 'lgsm_open_n_get' to retrieve the current country code (Sean Chiang)
Modified: trunk/src/target/gsm/include/gsmd/usock.h
===================================================================
--- trunk/src/target/gsm/include/gsmd/usock.h 2008-01-17 22:40:29 UTC (rev
3875)
+++ trunk/src/target/gsm/include/gsmd/usock.h 2008-01-18 09:15:33 UTC (rev
3876)
@@ -153,14 +153,15 @@
GSMD_NETWORK_VMAIL_GET = 3,
GSMD_NETWORK_VMAIL_SET = 4,
GSMD_NETWORK_OPER_GET = 5,
- GSMD_NETWORK_OPER_LIST = 6,
- GSMD_NETWORK_CIND_GET = 7,
- GSMD_NETWORK_DEREGISTER = 8,
- GSMD_NETWORK_GET_NUMBER = 9,
- GSMD_NETWORK_PREF_LIST = 10,
- GSMD_NETWORK_PREF_DEL = 11,
- GSMD_NETWORK_PREF_ADD = 12,
- GSMD_NETWORK_PREF_SPACE = 13,
+ GSMD_NETWORK_OPER_N_GET = 6,
+ GSMD_NETWORK_OPER_LIST = 7,
+ GSMD_NETWORK_CIND_GET = 8,
+ GSMD_NETWORK_DEREGISTER = 9,
+ GSMD_NETWORK_GET_NUMBER = 10,
+ GSMD_NETWORK_PREF_LIST = 11,
+ GSMD_NETWORK_PREF_DEL = 12,
+ GSMD_NETWORK_PREF_ADD = 13,
+ GSMD_NETWORK_PREF_SPACE = 14,
};
enum gsmd_msg_sms {
Modified: trunk/src/target/gsm/src/gsmd/usock.c
===================================================================
--- trunk/src/target/gsm/src/gsmd/usock.c 2008-01-17 22:40:29 UTC (rev
3875)
+++ trunk/src/target/gsm/src/gsmd/usock.c 2008-01-18 09:15:33 UTC (rev
3876)
@@ -767,6 +767,46 @@
return ret;
}
+static int network_oper_n_cb(struct gsmd_atcmd *cmd, void *ctx, char *resp)
+{
+ struct gsmd_user *gu = ctx;
+ int format, s, ret;
+ char buf[16+1] = {'\0'};
+ struct gsm_extrsp *er;
+
+ er = extrsp_parse(cmd, resp);
+
+ if ( !er )
+ return -ENOMEM;
+
+ //extrsp_dump(er);
+
+ /* Format: <mode>[,<format>,<oper>] */
+ if ( er->num_tokens == 1 &&
+ er->tokens[0].type == GSMD_ECMD_RTT_NUMERIC ) {
+
+ /* In case we're not registered, return an empty string */
+ buf[0] = '\0';
+ }
+ else if ( er->num_tokens == 3 &&
+ er->tokens[0].type == GSMD_ECMD_RTT_NUMERIC &&
+ er->tokens[1].type == GSMD_ECMD_RTT_NUMERIC &&
+ er->tokens[2].type == GSMD_ECMD_RTT_STRING ) {
+
+
+ strcpy(buf, er->tokens[2].u.string);
+ }
+ else {
+ DEBUGP("Invalid Input : Parse error\n");
+ return -EINVAL;
+ }
+
+ talloc_free(er);
+
+ return gsmd_ucmd_submit(gu, GSMD_MSG_NETWORK, GSMD_NETWORK_OPER_N_GET,
+ cmd->id, sizeof(buf), buf);
+}
+
static int network_opers_parse(const char *str, struct gsmd_msg_oper **out)
{
int len = 0;
@@ -980,6 +1020,12 @@
&null_cmd_cb, gu, 0, NULL));
cmd = atcmd_fill("AT+COPS?", 8+1, &network_oper_cb, gu, 0,
NULL);
break;
+ case GSMD_NETWORK_OPER_N_GET:
+ /* Set numeric format */
+ atcmd_submit(gu->gsmd, atcmd_fill("AT+COPS=3,2", 11+1,
+ &null_cmd_cb, gu, 0, NULL));
+ cmd = atcmd_fill("AT+COPS?", 8+1, &network_oper_n_cb, gu, 0,
NULL);
+ break;
case GSMD_NETWORK_OPER_LIST:
cmd = atcmd_fill("AT+COPS=?", 9+1, &network_opers_cb, gu, 0,
NULL);
break;
Modified: trunk/src/target/gsm/src/libgsmd/libgsmd_network.c
===================================================================
--- trunk/src/target/gsm/src/libgsmd/libgsmd_network.c 2008-01-17 22:40:29 UTC
(rev 3875)
+++ trunk/src/target/gsm/src/libgsmd/libgsmd_network.c 2008-01-18 09:15:33 UTC
(rev 3876)
@@ -46,6 +46,11 @@
return lgsm_send_simple(lh, GSMD_MSG_NETWORK, GSMD_NETWORK_OPER_GET);
}
+int lgsm_oper_n_get(struct lgsm_handle *lh)
+{
+ return lgsm_send_simple(lh, GSMD_MSG_NETWORK, GSMD_NETWORK_OPER_N_GET);
+}
+
int lgsm_opers_get(struct lgsm_handle *lh)
{
return lgsm_send_simple(lh, GSMD_MSG_NETWORK, GSMD_NETWORK_OPER_LIST);
Modified: trunk/src/target/gsm/src/util/shell.c
===================================================================
--- trunk/src/target/gsm/src/util/shell.c 2008-01-17 22:40:29 UTC (rev
3875)
+++ trunk/src/target/gsm/src/util/shell.c 2008-01-18 09:15:33 UTC (rev
3876)
@@ -320,6 +320,7 @@
pending_responses --;
break;
case GSMD_NETWORK_OPER_GET:
+ case GSMD_NETWORK_OPER_N_GET:
if (oper[0])
printf("Our current operator is %s\n", oper);
else
@@ -500,6 +501,7 @@
"\tR\tRegister to given operator (R=number)\n"
"\tU\tUnregister from netowrk\n"
"\tP\tPrint current operator\n"
+ "\tN\tPrint current operator in numeric\n"
"\tL\tList available operators\n"
"\tQ\tRead signal quality\n"
"\tS\tSleep (S[=second], default 5)\n"
@@ -634,6 +636,10 @@
printf("Read current opername\n");
lgsm_oper_get(lgsmh);
pending_responses ++;
+ } else if (!strcmp(buf, "N")) {
+ printf("Read current opername in numeric
format\n");
+ lgsm_oper_n_get(lgsmh);
+ pending_responses ++;
} else if (!strcmp(buf, "L")) {
printf("List operators\n");
lgsm_opers_get(lgsmh);
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-01-18 11:03:14 +0100 (Fri, 18 Jan 2008)
New Revision: 3877
Modified:
branches/src/target/kernel/2.6.24.x/patches/gta02-bt-fixes.patch
Log:
Bring back initialization of BT power and enable for GTA02.
gta02-bt-fixes.patch:"
- arch/arm/plat-s3c24xx/neo1973_pm_bt.c (gta01_bt_probe): disable LDO and
assert reset also for GTA02
Modified: branches/src/target/kernel/2.6.24.x/patches/gta02-bt-fixes.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/gta02-bt-fixes.patch
2008-01-18 09:15:33 UTC (rev 3876)
+++ branches/src/target/kernel/2.6.24.x/patches/gta02-bt-fixes.patch
2008-01-18 10:03:14 UTC (rev 3877)
@@ -158,7 +158,7 @@
}
}
-@@ -143,18 +184,25 @@
+@@ -143,18 +184,30 @@
dev_info(&pdev->dev, DRVMSG ": starting\n");
switch (machine_arch_type) {
@@ -176,7 +176,13 @@
+
+#ifdef CONFIG_MACH_NEO1973_GTA02
case MACH_TYPE_NEO1973_GTA02:
- /* FIXME: implementation */
+- /* FIXME: implementation */
++ /* we make sure that the voltage is off */
++ pcf50633_ena_voltage(pcf50633_global,
++ PCF50633_REGULATOR_LDO4, 0);
++ /* we pull reset to low to make sure that the chip doesn't
++ * drain power through the reset line */
++ s3c2410_gpio_setpin(GTA02_GPIO_BT_EN, 0);
break;
+#endif /* CONFIG_MACH_NEO1973_GTA02 */
+
--- End Message ---
_______________________________________________
commitlog mailing list
commitlog@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/commitlog