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. r4128 - trunk/src/host/devirginator ([EMAIL PROTECTED])
2. r4129 - trunk/src/target/opkg/libopkg ([EMAIL PROTECTED])
3. r4130 - trunk/src/target/opkg/libopkg ([EMAIL PROTECTED])
4. r4131 - branches/src/target/kernel/2.6.24.x/patches
([EMAIL PROTECTED])
5. r4132 - trunk/src/target/gpio ([EMAIL PROTECTED])
6. r4133 - branches/src/target/kernel/2.6.24.x/patches
([EMAIL PROTECTED])
7. r4134 - branches/src/target/kernel/2.6.24.x/patches
([EMAIL PROTECTED])
--- Begin Message ---
Author: werner
Date: 2008-02-28 12:25:28 +0100 (Thu, 28 Feb 2008)
New Revision: 4128
Added:
trunk/src/host/devirginator/config.gta01bv4
Removed:
trunk/src/host/devirginator/config.phase0
Modified:
trunk/src/host/devirginator/mknor
trunk/src/host/devirginator/setup.sh
Log:
mknor: removed "under construction" warning
mknor: added usage instructions for "flashnor"
mknor: the path to the u-boot binary is no longer hard-coded by must be passed
on the command line
mknor: added option "-o outfile" to change the output file from the default
nor.bin
setup.sh: generate the NOR binary on non-GTA01
config.gta01bv4: example devirginator configuration for GTA01Bv4
config.phase0: obsolete - removed
Added: trunk/src/host/devirginator/config.gta01bv4
===================================================================
--- trunk/src/host/devirginator/config.gta01bv4 2008-02-28 10:15:47 UTC (rev
4127)
+++ trunk/src/host/devirginator/config.gta01bv4 2008-02-28 11:25:28 UTC (rev
4128)
@@ -0,0 +1,20 @@
+#
+# config.gta01bv4 - Devirginator configuration file
+#
+# This is a shell script sourced by "setup.sh".
+#
+
+OPENOCD_HOST=localhost
+PLATFORM=gta01
+BOARD=bv4
+
+stuff=http://buildhost.openmoko.org/daily/neo1973/deploy/glibc/images/neo1973/
+
+LOWLEVEL=$stuff/lowlevel-foo-$PLATFORM$BOARD-latest.bin
+UBOOT=$stuff/uboot-$PLATFORM$BOARD-latest.bin
+UIMAGE=$stuff/uImage-neo1973-latest.bin
+ROOTFS=$stuff/openmoko-devel-image-fic-$PLATFORM.jffs2
+
+DFU_UTIL=$stuff/dfu-util
+#OPENOCD=$stuff/openocd
+OPENOCD_CFG=http://people.openmoko.org/werner/openocd.cfg
Deleted: trunk/src/host/devirginator/config.phase0
===================================================================
--- trunk/src/host/devirginator/config.phase0 2008-02-28 10:15:47 UTC (rev
4127)
+++ trunk/src/host/devirginator/config.phase0 2008-02-28 11:25:28 UTC (rev
4128)
@@ -1,22 +0,0 @@
-#
-# config - devirginator configuration
-#
-# This is a shell script sourced by "setup.sh".
-#
-
-OPENOCD_HOST=localhost
-SNAPSHOT=20070301
-BOARD=bv3
-
-
-stuff=http://buildhost-old.openmoko.org/snapshots/gta01-20070301/tmp/deploy/images
-
-LOWLEVEL=$stuff/lowlevel_foo-gta01bv3-20070302200829.bin
-UBOOT=$stuff/u-boot-gta01bv3-20070302200829.bin
-UIMAGE=$stuff/uImage-2.6-200703022008-fic-gta01.bin
-ROOTFS=$stuff/openmoko-devel-image-fic-gta01-20070302115654.rootfs.jffs2
-
-DFU_UTIL=$stuff/dfu-util
-
-OPENOCD=$stuff/openocd
-OPENOCD_CFG=http://people.openmoko.org/werner/openocd-debugv2.cfg
Modified: trunk/src/host/devirginator/mknor
===================================================================
--- trunk/src/host/devirginator/mknor 2008-02-28 10:15:47 UTC (rev 4127)
+++ trunk/src/host/devirginator/mknor 2008-02-28 11:25:28 UTC (rev 4128)
@@ -8,15 +8,6 @@
#
#
-# WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING
-#
-# This isn't the final version of NOR image creation yet, and some things may
-# not work as expected.
-#
-# WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING
-#
-
-#
# Write to NOR with the following commands:
#
# flash_unlock /dev/mtd0
@@ -27,6 +18,13 @@
# flash_erase /dev/mtd0 0 13
# (or similar, depending on the image size)
#
+# Or just use the "flashnor" script:
+#
+# norwp rw
+# ifconfig usb0 192.168.0.200 up
+# scp tmp/nor.bin flashnor 192.168.0.202:
+# ssh 192.168.0.202 ./flashnor nor.bin
+#
#
# NOR map:
@@ -43,8 +41,23 @@
# 0x18 1F FFFF end of NOR (2MB)
#
-#unzip 0x18070000 0x8800000 0x96000
+usage()
+{
+ echo "usage: $0 [-o outfile ] u-boot" 1>&2
+ exit 1
+}
+
+
+out=nor.bin
+if [ "$1" = -o ]; then
+ [ ! -z "$2" ] || usage
+ out="$2"
+ shift 2
+fi
+[ ! -z "$1" -a -z "$2" ] || usage
+uboot="$1"
+
./scriptify.pl <<EOF >_script
neo backlight off
neo backlight on
@@ -61,13 +74,13 @@
./envedit.pl -D GTA02 -D NOR_ENV -f environment.in -o _env
./blink.pl \
- /home/moko/2624/u-boot/[EMAIL PROTECTED] \
+ "$1"@0 \
[EMAIL PROTECTED] \
'"autoscr 0x18050100"'@0x50000 \
[EMAIL PROTECTED] \
[EMAIL PROTECTED] \
[EMAIL PROTECTED] \
[EMAIL PROTECTED] \
- >nor.bin || { rm -rf nor.bin; exit 1; }
+ >$out || { rm -rf $out; exit 1; }
rm -f _splash _script _env
Modified: trunk/src/host/devirginator/setup.sh
===================================================================
--- trunk/src/host/devirginator/setup.sh 2008-02-28 10:15:47 UTC (rev
4127)
+++ trunk/src/host/devirginator/setup.sh 2008-02-28 11:25:28 UTC (rev
4128)
@@ -328,6 +328,15 @@
add_file tmp/splash.gz
+# --- Stage 3: the NOR --------------------------------------------------------
+
+
+if [ "$PLATFORM" != gta01 ]; then
+ ./mknor -o tmp/nor.bin "$UBOOT"
+ add_file tmp/nor.bin
+fi
+
+
# --- "devirginate" shell script ----------------------------------------------
--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2008-02-28 12:36:53 +0100 (Thu, 28 Feb 2008)
New Revision: 4129
Modified:
trunk/src/target/opkg/libopkg/pkg.c
Log:
opkg: Update the version comparision to a more recent one from dpkg. This
means it now recognises 0.0-foo > 0.0+foo as it should. Patch from Richard
Purdie <rpurdie rpsys net>
Modified: trunk/src/target/opkg/libopkg/pkg.c
===================================================================
--- trunk/src/target/opkg/libopkg/pkg.c 2008-02-28 11:25:28 UTC (rev 4128)
+++ trunk/src/target/opkg/libopkg/pkg.c 2008-02-28 11:36:53 UTC (rev 4129)
@@ -1079,43 +1079,37 @@
return r;
}
-int verrevcmp(const char *val, const char *ref)
-{
- int vc, rc;
- long vl, rl;
- const char *vp, *rp;
- const char *vsep, *rsep;
-
- if (!val) val= "";
- if (!ref) ref= "";
- for (;;) {
- vp= val; while (*vp && !isdigit(*vp)) vp++;
- rp= ref; while (*rp && !isdigit(*rp)) rp++;
- for (;;) {
- vc= (val == vp) ? 0 : *val++;
- rc= (ref == rp) ? 0 : *ref++;
- if (!rc && !vc) break;
- if (vc && !isalpha(vc)) vc += 256; /* assumes ASCII character
set */
- if (rc && !isalpha(rc)) rc += 256;
- if (vc != rc) return vc - rc;
- }
- val= vp;
- ref= rp;
- vl=0; if (isdigit(*vp)) vl= strtol(val,(char**)&val,10);
- rl=0; if (isdigit(*rp)) rl= strtol(ref,(char**)&ref,10);
- if (vl != rl) return vl - rl;
+/* assume ascii; warning: evaluates x multiple times! */
+#define order(x) ((x) == '~' ? -1 \
+ : isdigit((x)) ? 0 \
+ : !(x) ? 0 \
+ : isalpha((x)) ? (x) \
+ : (x) + 256)
- vc = *val;
- rc = *ref;
- vsep = strchr(".-", vc);
- rsep = strchr(".-", rc);
- if (vsep && !rsep) return -1;
- if (!vsep && rsep) return +1;
+static int verrevcmp(const char *val, const char *ref) {
+ if (!val) val= "";
+ if (!ref) ref= "";
- if (!*val && !*ref) return 0;
- if (!*val) return -1;
- if (!*ref) return +1;
- }
+ while (*val || *ref) {
+ int first_diff= 0;
+
+ while ( (*val && !isdigit(*val)) || (*ref && !isdigit(*ref)) ) {
+ int vc= order(*val), rc= order(*ref);
+ if (vc != rc) return vc - rc;
+ val++; ref++;
+ }
+
+ while ( *val == '0' ) val++;
+ while ( *ref == '0' ) ref++;
+ while (isdigit(*val) && isdigit(*ref)) {
+ if (!first_diff) first_diff= *val - *ref;
+ val++; ref++;
+ }
+ if (isdigit(*val)) return 1;
+ if (isdigit(*ref)) return -1;
+ if (first_diff) return first_diff;
+ }
+ return 0;
}
int pkg_version_satisfied(pkg_t *it, pkg_t *ref, const char *op)
--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2008-02-28 12:51:34 +0100 (Thu, 28 Feb 2008)
New Revision: 4130
Modified:
trunk/src/target/opkg/libopkg/pkg.c
trunk/src/target/opkg/libopkg/pkg_parse.c
Log:
opkg: Enable Debian style revision field by default and remove "familiar"
specific code. Patch from Richard Purdie <rpurdie rpsys net>
Modified: trunk/src/target/opkg/libopkg/pkg.c
===================================================================
--- trunk/src/target/opkg/libopkg/pkg.c 2008-02-28 11:36:53 UTC (rev 4129)
+++ trunk/src/target/opkg/libopkg/pkg.c 2008-02-28 11:51:34 UTC (rev 4130)
@@ -1067,15 +1067,11 @@
return r;
}
-#ifdef USE_DEBVERSION
r = verrevcmp(pkg->revision, ref_pkg->revision);
if (r) {
return r;
}
- r = verrevcmp(pkg->familiar_revision, ref_pkg->familiar_revision);
-#endif
-
return r;
}
@@ -1189,10 +1185,7 @@
{
char *complete_version;
char *epoch_str;
-#ifdef USE_DEBVERSION
char *revision_str;
- char *familiar_revision_str;
-#endif
if (pkg->epoch) {
sprintf_alloc(&epoch_str, "%d:", pkg->epoch);
@@ -1200,33 +1193,18 @@
epoch_str = strdup("");
}
-#ifdef USE_DEBVERSION
if (pkg->revision && strlen(pkg->revision)) {
sprintf_alloc(&revision_str, "-%s", pkg->revision);
} else {
revision_str = strdup("");
}
- if (pkg->familiar_revision && strlen(pkg->familiar_revision)) {
- sprintf_alloc(&familiar_revision_str, "-fam%s",
pkg->familiar_revision);
- } else {
- familiar_revision_str = strdup("");
- }
-#endif
-#ifdef USE_DEBVERSION
- sprintf_alloc(&complete_version, "%s%s%s%s",
- epoch_str, pkg->version, revision_str,
familiar_revision_str);
-#else
- sprintf_alloc(&complete_version, "%s%s",
- epoch_str, pkg->version);
-#endif
+ sprintf_alloc(&complete_version, "%s%s%s",
+ epoch_str, pkg->version, revision_str);
free(epoch_str);
-#ifdef USE_DEBVERSION
free(revision_str);
- free(familiar_revision_str);
-#endif
return complete_version;
}
Modified: trunk/src/target/opkg/libopkg/pkg_parse.c
===================================================================
--- trunk/src/target/opkg/libopkg/pkg_parse.c 2008-02-28 11:36:53 UTC (rev
4129)
+++ trunk/src/target/opkg/libopkg/pkg_parse.c 2008-02-28 11:51:34 UTC (rev
4130)
@@ -105,9 +105,7 @@
int parseVersion(pkg_t *pkg, char *raw)
{
char *colon, *eepochcolon;
-#ifdef USE_DEBVERSION
char *hyphen;
-#endif
unsigned long epoch;
if (!*raw) {
@@ -149,23 +147,12 @@
}
strcpy(pkg->version, raw);
-#ifdef USE_DEBVERSION
hyphen= strrchr(pkg->version,'-');
if (hyphen) {
*hyphen++= 0;
- if (strncmp("fam", hyphen, 3) == 0) {
- pkg->familiar_revision=hyphen+3;
- hyphen= strrchr(pkg->version,'-');
- if (hyphen) {
- *hyphen++= 0;
- pkg->revision = hyphen;
- }
- } else {
pkg->revision = hyphen;
- }
}
-#endif
/*
fprintf(stderr,"Parsed version: %lu, %s, %s, %s\n",
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-02-28 13:16:41 +0100 (Thu, 28 Feb 2008)
New Revision: 4131
Modified:
branches/src/target/kernel/2.6.24.x/patches/gta02-core.patch
branches/src/target/kernel/2.6.24.x/patches/pcf50633.patch
Log:
From: matt_hsu <[EMAIL PROTECTED]>
[PATCH] bug-889-8secs.patch
This patch introduces a power-down when the POWER button is held for
8 seconds, which fixed this bug:
http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=889
Modified: branches/src/target/kernel/2.6.24.x/patches/gta02-core.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/gta02-core.patch
2008-02-28 11:51:34 UTC (rev 4130)
+++ branches/src/target/kernel/2.6.24.x/patches/gta02-core.patch
2008-02-28 12:16:41 UTC (rev 4131)
@@ -2,7 +2,7 @@
===================================================================
--- /dev/null
+++ linux-2.6.24/arch/arm/mach-s3c2440/mach-gta02.c
-@@ -0,0 +1,822 @@
+@@ -0,0 +1,823 @@
+/*
+ * linux/arch/arm/mach-s3c2440/mach-gta02.c
+ *
@@ -155,7 +155,8 @@
+ PCF50633_FEAT_BATVOLT |
+ PCF50633_FEAT_BATTEMP |
+ PCF50633_FEAT_PWM_BL,
-+ .onkey_seconds_required = 3,
++ .onkey_seconds_sig_init = 4,
++ .onkey_seconds_shutdown = 8,
+ .cb = &pmu_callback,
+ .r_fix_batt = 10000,
+ .r_fix_batt_par = 10000,
@@ -932,7 +933,7 @@
===================================================================
--- linux-2.6.24.orig/arch/arm/mach-s3c2440/Kconfig
+++ linux-2.6.24/arch/arm/mach-s3c2440/Kconfig
-@@ -74,5 +74,20 @@
+@@ -74,5 +74,20 @@ config MACH_HXD8
help
Say Y here if you are using the FIC Neo1973 GSM Phone
@@ -957,7 +958,7 @@
===================================================================
--- linux-2.6.24.orig/arch/arm/mach-s3c2440/Makefile
+++ linux-2.6.24/arch/arm/mach-s3c2440/Makefile
-@@ -22,3 +22,4 @@
+@@ -22,3 +22,4 @@ obj-$(CONFIG_MACH_RX3715) += mach-rx3715
obj-$(CONFIG_ARCH_S3C2440) += mach-smdk2440.o
obj-$(CONFIG_MACH_NEXCODER_2440) += mach-nexcoder.o
obj-$(CONFIG_MACH_HXD8) += mach-hxd8.o
@@ -966,7 +967,7 @@
===================================================================
--- linux-2.6.24.orig/drivers/leds/leds-neo1973-vibrator.c
+++ linux-2.6.24/drivers/leds/leds-neo1973-vibrator.c
-@@ -113,7 +113,7 @@
+@@ -113,7 +113,7 @@ static int __init neo1973_vib_probe(stru
struct resource *r;
int rc;
@@ -979,7 +980,7 @@
===================================================================
--- linux-2.6.24.orig/sound/soc/s3c24xx/neo1973_wm8753.c
+++ linux-2.6.24/sound/soc/s3c24xx/neo1973_wm8753.c
-@@ -672,6 +672,12 @@
+@@ -672,6 +672,12 @@ static int __init neo1973_init(void)
{
int ret;
@@ -992,7 +993,7 @@
neo1973_snd_device = platform_device_alloc("soc-audio", -1);
if (!neo1973_snd_device)
return -ENOMEM;
-@@ -700,5 +706,5 @@
+@@ -700,5 +706,5 @@ module_exit(neo1973_exit);
/* Module information */
MODULE_AUTHOR("Graeme Gregory, [EMAIL PROTECTED], www.wolfsonmicro.com");
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-28
11:51:34 UTC (rev 4130)
+++ branches/src/target/kernel/2.6.24.x/patches/pcf50633.patch 2008-02-28
12:16:41 UTC (rev 4131)
@@ -34,7 +34,7 @@
===================================================================
--- /dev/null
+++ linux-2.6.24/drivers/i2c/chips/pcf50633.c
-@@ -0,0 +1,1958 @@
+@@ -0,0 +1,1963 @@
+/* Philips PCF50633 Power Management Unit (PMU) driver
+ *
+ * (C) 2006-2007 by OpenMoko, Inc.
@@ -494,8 +494,8 @@
+/* go into 'STANDBY' mode, i.e. power off the main CPU and peripherals */
+void pcf50633_go_standby(void)
+{
-+ reg_write(pcf50633_global, PCF50633_REG_OOCSHDWN,
-+ PCF50633_OOCSHDWN_GOSTDBY);
++ reg_set_bit_mask(pcf50633_global, PCF50633_REG_OOCSHDWN,
++ PCF50633_OOCSHDWN_GOSTDBY, PCF50633_OOCSHDWN_GOSTDBY);
+}
+EXPORT_SYMBOL_GPL(pcf50633_go_standby);
+
@@ -707,12 +707,17 @@
+ reg_read(pcf, PCF50633_REG_OOCSTAT));
+ pcf->onkey_seconds++;
+ if (pcf->onkey_seconds >=
-+ pcf->pdata->onkey_seconds_required) {
++ pcf->pdata->onkey_seconds_sig_init) {
+ /* Ask init to do 'ctrlaltdel' */
+ DEBUGPC("SIGINT(init) ");
+ kill_proc(1, SIGINT, 1);
+ /* FIXME: what if userspace doesn't shut down?
*/
+ }
++ if (pcf->onkey_seconds >=
++ pcf->pdata->onkey_seconds_shutdown) {
++ DEBUGPC("Power Off ");
++ pcf50633_go_standby();
++ }
+ }
+ }
+
@@ -1997,7 +2002,7 @@
===================================================================
--- /dev/null
+++ linux-2.6.24/include/linux/pcf50633.h
-@@ -0,0 +1,113 @@
+@@ -0,0 +1,114 @@
+#ifndef _LINUX_PCF50633_H
+#define _LINUX_PCF50633_H
+
@@ -2093,7 +2098,8 @@
+struct pcf50633_platform_data {
+ /* general */
+ unsigned int used_features;
-+ unsigned int onkey_seconds_required;
++ unsigned int onkey_seconds_sig_init;
++ unsigned int onkey_seconds_shutdown;
+
+ /* voltage regulator related */
+ struct pmu_voltage_rail rails[__NUM_PCF50633_REGULATORS];
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-02-28 14:32:35 +0100 (Thu, 28 Feb 2008)
New Revision: 4132
Added:
trunk/src/target/gpio/gpio-glamo.c
Modified:
trunk/src/target/gpio/Makefile
Log:
Quick and dirty GPIO dumper for the Glamo 3362.
Modified: trunk/src/target/gpio/Makefile
===================================================================
--- trunk/src/target/gpio/Makefile 2008-02-28 12:16:41 UTC (rev 4131)
+++ trunk/src/target/gpio/Makefile 2008-02-28 13:32:35 UTC (rev 4132)
@@ -2,4 +2,4 @@
CFLAGS=-Wall -g
-all: gpio
+all: gpio gpio-glamo
Added: trunk/src/target/gpio/gpio-glamo.c
===================================================================
--- trunk/src/target/gpio/gpio-glamo.c 2008-02-28 12:16:41 UTC (rev 4131)
+++ trunk/src/target/gpio/gpio-glamo.c 2008-02-28 13:32:35 UTC (rev 4132)
@@ -0,0 +1,145 @@
+/*
+ * gpio-glamo - Read and set GPIO pins (of the Smedia Glamo 3362)
+ *
+ * Copyright (C) 2008 by OpenMoko, Inc.
+ * Written by Werner Almesberger <[EMAIL PROTECTED]>
+ * All Rights Reserved
+ *
+ * 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.
+ */
+
+
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+
+#define BASE 0x08000000
+
+
+static volatile void *mem;
+
+
+#define CON_IN 0
+#define CON_OUT 1
+#define CON_F1 2
+#define CON_F2 3
+
+
+/* 2442 port assignment */
+
+static struct port {
+ const char *name;
+ int offset;
+ int start;
+ enum { pt_gpio, pt_dgpio } type;
+} ports[] = {
+ { "GPIO", 0x50, 0, pt_gpio },
+ { "GPIO", 0x52, 4, pt_gpio },
+ { "GPIO", 0x54, 8, pt_gpio },
+ { "GPIO", 0x56, 12, pt_gpio },
+ { "GPIO", 0x58, 16, pt_gpio },
+ { "DGPIO", 0x5c, 0, pt_dgpio },
+ { "DGPIO", 0x5e, 4, pt_dgpio },
+ { "DGPIO", 0x60, 8, pt_dgpio },
+ { "DGPIO", 0x62, 12, pt_dgpio },
+ { NULL, }
+};
+
+
+static void print_n(const char *name, int start)
+{
+ int i;
+
+ printf("%s ", name);
+ for (i = 0; i != 4; i++)
+ printf("%2d ", start+i);
+ putchar('\n');
+}
+
+
+/* ----- Read a pin -------------------------------------------------------- */
+
+
+static const char *pin(const struct port *p, int n)
+{
+ static char res[4];
+ uint16_t reg;
+
+ reg = *(uint16_t *) (mem+p->offset);
+ if (p->type == pt_dgpio || ((reg >> (n+12)) & 1))
+ res[0] = res[0] = (reg >> n) & 1 ? ' ' : '>';
+ else
+ res[0] = 'F';
+ res[1] = (reg >> (n+8)) & 1 ? '1' : '0';
+ if (res[0] == ' ')
+ res[2] = ' ';
+ else
+ res[2] = ((reg >> (n+4)) ^ (reg >> (n+8))) & 1 ? '!' : ' ';
+ return res;
+}
+
+
+/* ----- Dump all ports ---------------------------------------------------- */
+
+
+static void dump_all(void)
+{
+ const struct port *p;
+ int i;
+
+ for (p = ports; p->name; p++) {
+ print_n(p->name, p->start);
+ printf("%*s ", strlen(p->name), "");
+ for (i = 0; i != 4; i++)
+ printf("%s ", pin(p, i));
+ putchar('\n');
+ }
+}
+
+
+/* ----- Command-line parsing ---------------------------------------------- */
+
+
+static void __attribute__((noreturn)) usage(const char *name)
+{
+ fprintf(stderr,
+"usage: %s [pin[=value] ...]\n\n"
+" pin = <letter><number>, e.g., A5, b10\n"
+" value = <control><pull-down>, with\n"
+" <control> = 0 (output 0), 1 (output 1), Z (input), F (primary\n"
+" function), X (secondary function)\n"
+" <pull-down> = R (pull-down active) or nothing\n"
+" As a short-cut, ZR can be abbreviated as R.\n\n"
+" Examples: A5=ZR, b10=0\n",
+ name);
+ exit(1);
+}
+
+
+int main(int argc, char **argv)
+{
+ int fd;
+
+ fd = open("/dev/mem", O_RDWR);
+ if (fd < 0) {
+ perror("/dev/mem");
+ exit(1);
+ }
+ mem = mmap(NULL, 0x1000, PROT_READ | PROT_WRITE, MAP_SHARED, fd, BASE);
+ if (mem == MAP_FAILED) {
+ perror("mmap");
+ exit(1);
+ }
+ if (argc == 1)
+ dump_all();
+ else
+ usage(*argv);
+ return 0;
+}
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-02-29 04:07:59 +0100 (Fri, 29 Feb 2008)
New Revision: 4133
Modified:
branches/src/target/kernel/2.6.24.x/patches/fix-i2c-s3c2410-resume-race.patch
Log:
fix-i2c.patch by Tim Niemeyer
fix-i2c-s3c2410-resume-race.patch:
- drivers/i2c/busses/i2c-s3c2410.c (s3c2410_i2c_driver): add suspend callback
also to 2410 driver
- drivers/i2c/busses/i2c-s3c2410.c (s3c24xx_i2c_doxfer): print suspend count on
rejection
Modified:
branches/src/target/kernel/2.6.24.x/patches/fix-i2c-s3c2410-resume-race.patch
===================================================================
---
branches/src/target/kernel/2.6.24.x/patches/fix-i2c-s3c2410-resume-race.patch
2008-02-28 13:32:35 UTC (rev 4132)
+++
branches/src/target/kernel/2.6.24.x/patches/fix-i2c-s3c2410-resume-race.patch
2008-02-29 03:07:59 UTC (rev 4133)
@@ -52,12 +52,14 @@
goto out_ack;
case STATE_START:
-@@ -502,6 +512,12 @@ static int s3c24xx_i2c_doxfer(struct s3c
+@@ -502,6 +512,14 @@ static int s3c24xx_i2c_doxfer(struct s3c
unsigned long timeout;
int ret;
+ if (i2c->suspended) {
-+ dev_err(i2c->dev, "Hey I am still asleep, retry later\n");
++ dev_err(i2c->dev,
++ "Hey I am still asleep (suspended: %d), retry later\n",
++ i2c->suspended);
+ ret = -EAGAIN;
+ goto out;
+ }
@@ -65,7 +67,7 @@
ret = s3c24xx_i2c_set_master(i2c);
if (ret != 0) {
dev_err(i2c->dev, "cannot get bus (error %d)\n", ret);
-@@ -886,6 +902,17 @@ static int s3c24xx_i2c_remove(struct pla
+@@ -886,6 +904,17 @@ static int s3c24xx_i2c_remove(struct pla
}
#ifdef CONFIG_PM
@@ -83,7 +85,7 @@
static int s3c24xx_i2c_resume(struct platform_device *dev)
{
struct s3c24xx_i2c *i2c = platform_get_drvdata(dev);
-@@ -893,6 +920,8 @@ static int s3c24xx_i2c_resume(struct pla
+@@ -893,6 +922,8 @@ static int s3c24xx_i2c_resume(struct pla
if (i2c != NULL)
s3c24xx_i2c_init(i2c);
@@ -92,7 +94,15 @@
return 0;
}
-@@ -915,6 +944,7 @@ static struct platform_driver s3c2410_i2
+@@ -905,6 +936,7 @@ static int s3c24xx_i2c_resume(struct pla
+ static struct platform_driver s3c2410_i2c_driver = {
+ .probe = s3c24xx_i2c_probe,
+ .remove = s3c24xx_i2c_remove,
++ .suspend = s3c24xx_i2c_suspend,
+ .resume = s3c24xx_i2c_resume,
+ .driver = {
+ .owner = THIS_MODULE,
+@@ -915,6 +947,7 @@ static struct platform_driver s3c2410_i2
static struct platform_driver s3c2440_i2c_driver = {
.probe = s3c24xx_i2c_probe,
.remove = s3c24xx_i2c_remove,
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-02-29 04:14:45 +0100 (Fri, 29 Feb 2008)
New Revision: 4134
Modified:
branches/src/target/kernel/2.6.24.x/patches/gta01-inputdevice.patch
Log:
Remove wakeup on HOLD, because the functionality is questionable, and the
circuit is actually broken by design. (Suggested by Andy Green.)
gta01-inputdevice.patch:
- drivers/input/keyboard/neo1973kbd.c (neo1973kbd_probe): do not wake up on
HOLD
Modified: branches/src/target/kernel/2.6.24.x/patches/gta01-inputdevice.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/gta01-inputdevice.patch
2008-02-29 03:07:59 UTC (rev 4133)
+++ branches/src/target/kernel/2.6.24.x/patches/gta01-inputdevice.patch
2008-02-29 03:14:45 UTC (rev 4134)
@@ -39,7 +39,7 @@
===================================================================
--- /dev/null
+++ linux-2.6.24/drivers/input/keyboard/neo1973kbd.c
-@@ -0,0 +1,243 @@
+@@ -0,0 +1,242 @@
+/*
+ * Keyboard driver for FIC Neo1973 GSM phone
+ *
@@ -215,7 +215,6 @@
+ dev_err(&pdev->dev, "Can't get IRQ %u\n", irq_hold);
+ goto out_hold;
+ }
-+ enable_irq_wake(irq_hold);
+
+ if (request_irq(irq_jack, neo1973kbd_headphone_irq, IRQF_DISABLED |
+ IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog